Error message N25G06 when using &SECCALL

Document ID : KB000004734
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

When using a NCL-statement like

&SECCALL GET USERID=<userid> FIELDS=(SEC0011,SEC0013)

there is no result, it seems that the statement is not executed.

 

Environment:
SOLVE:Access 5.0
Resolution:

First of all it is a good practice to check the Returncode for any &SECCALL statement. That can be a code like this:

&SECCALL GET USERID=<userid> FIELDS=(SEC0011,SEC0013)         

&IF .&RETCODE NE .0 &THEN &DO                                

   &WRITE LOG=YES SECCALL got RC=&RETCODE with SYSMSG=&SYSMSG

&DOEND 

 

Then you get this line in the log:

SECCALL got RC=4 with SYSMSG=N25G06 FIELD STARTING SEC0 GREATER THAN FOUR CHARACTERS 

 

The solution here is not to code the complete field names SEC0011 and SEC0013, respectively, but to code only the field numbers 0011 and 0013. Then you will not get a problem:

&SECCALL GET USERID=<userid> FIELDS=(0011,0013)

&IF .&RETCODE NE .0 &THEN &DO

   &WRITE LOG=YES SECCALL got RC=&RETCODE with SYSMSG=&SYSMSG

&DOEND

Additional Information:

If you want to use another prefix than "SEC" for the variables referred to by the FIELDS operand you can do that by specifying parameter PREFIX=xxx as a parameter of &SECCALL. Then the variables filled by &SECCALL have that prefix as the first three characters, followed by the four number long name of the Structured Fields.