Diagnosis examples
The following examples illustrate mistakes that can generate the various spool API error codes, and diagnosis of the problems.
Some length fields are omitted when they are not necessary to illustrate the example. The feedback and options lists that are shown on multiple lines are contiguous.
Error code (0002)
Two examples of the error code 0002 are shown in this topic.
For the first example the options list contains both the keywords PRTO and TXTU. The keyword,
TXTU, is invalid for the SETO
call.
CALL = SETO
OPTIONS LIST = PRTO=04DEST(018),CLASS(A),TXTU=SET1
FEEDBACK = TXTU(0002)
STATUS CODE = AR
For the second example, the length field of the PRTO options is too short to contain all of the
options. This means that IMS finds the COPIES and FORMS
keywords outside the PRTO options list area and indicates that they are invalid on the
CHNG
call.
CALL = CHNG
OPTIONS LIST = IAFP=N0M,PRTO=0FDEST(018),LINECT(200),CLASS(A),
COPIES(80),FORMS(ANS)
FEEDBACK = COPIES(0002),FORMS(0002)
STATUS CODE = AR
Error code (0004)
For this example, the operand for the OUTN keyword is 9 bytes long and exceeds the maximum value for the OUTPUT JCL statement.
CALL = CHNG
OPTIONS LIST = IAFP=N0M,OUTN=OUTPUTDD1
FEEDBACK = OUTN(0004)
STATUS CODE = AR
Error code (0006)
The length of the options list for this call is too short to contain all of the operands of the PRTO keyword.
This example shows an options list that is X'48' bytes long and is the correct length. The length field of the PRTO keyword incorrectly indicates a length of X'5A'. The length of the PRTO options exceeds the length of the entire options list so IMS ignores the PRTO keyword and scans the rest of the options list for valid keywords. The feedback area contains the PRTO(0006) code (indicating a length error) and the (0002) code (indicating that the PRTO keywords are in error). This is because the keywords beyond the first PRTO keyword, up to the length specified in the options list length field, have been scanned in search of valid keywords for the call. The status code of AR indicates that the keywords are considered invalid for the call and not the PRTO keyword.
CALL = CHNG
0400 05
OPTIONS LIST = 0800IAFP=N0M,PRTO=0ADEST(018),LINECT(200),CLASS(A),
COPIES(3),FORMS(ANS)
FEEDBACK = PRTO(0006),LINECT(0002),CLASS(0002),COPIES(0002),
FORMS(0002)
STATUS CODE = AR
Error code (0008)
In this example, the message option of the IAFP keyword is incorrectly specified as Z
.
CALL = CHNG
00
OPTIONS LIST = IAFP=N0Z,PRTO=0BDEST(018)
FEEDBACK = IAFP(0008) INVALID VARIABLE
STATUS CODE = AR
Error code (000A)
In this example, the valid keyword TXTU is specified, but the call also requires that the IAFP keyword be specified if the TXTU keyword is used.
CALL = CHNG
OPTIONS LIST = TXTU=SET1
FEEDBACK = TXTU(000A)
STATUS CODE = AR
Error code (000C)
The AR status code is returned with the (000C) error code. This implies that the problem is with the call options and not with the PRTO options.
The call options list contains the PRTO and TXTU keywords. These options cannot be used in the same options call list.
CALL = CHNG
00
OPTIONS LIST = IAFP=A00,PRTO=0BCOPIES(3),TXTU=SET1
FEEDBACK = TXTU(000C)
STATUS CODE = AR
Error code (000E)
In this example, the COPIES parameter has the incorrect value RG
specified as one of its
operands. The error message indicates that the values for these operands must be numeric.
CALL = CHNG
01
OPTIONS LIST = IAFP=A00,PRTO=0BCOPIES((3),(8,RG,18,80))
FEEDBACK = PRTO(000E) (R.C.=0004,REAS.=00000204) COPIES/RG VALUE
MUST BE NUMERIC CHARACTERS
STATUS CODE = AS
This example includes an invalid PRTO operand. The resulting reason code of X'000000D0' indicates that the XYZ operand is invalid.
CALL = CHNG
00
OPTIONS LIST = IAFP=A00,PRTO=0AXYZ(018)
FEEDBACK = PRTO(000E) (R.C.=0004,REAS.=000000D0) XYZ
STATUS CODE = AS