Error code examples
These examples describe errors and the resulting error codes.
Some length fields are omitted from the examples when they are unnecessary to the example. Feedback and options lists that are shown on multiple lines are contiguous, as they are in the working storage of an application.
Subsections:
- Error code (0002)
- Error code (0004)
- Error code (0006)
- Error code (0008)
- Error code (000A)
- Error code (000C)
- Error code (000E)
Error code (0002)
CALL = SETO
01
OPTIONS LIST = PRTO=04DEST(018),CLASS(A),TXTU=SET1
FEEDBACK = TXTU(0002)
STATUS CODE = AR
In this example, the options list contains both the keywords PRTO and TXTU. The TXTU keyword is not valid for the SETO call.
CALL = CHNG
01
OPTIONS LIST = IAFP=N0M,PRTO=0FDEST(018),LINECT(200),CLASS(A),
COPIES(80),FORMS(ANS)
FEEDBACK = COPIES(0002),FORMS(0002)
STATUS CODE = AR
In this example, the length field of the PRTO options (001F) is too short to contain all the options. As a result, IMS finds the keywords COPIES and FORMS outside the PRTO options list area and indicates that these keywords are not allowed as keywords on the CHNG call.
Error code (0004)
CALL = CHNG
OPTIONS LIST = IAFP=N0M,OUTN=OUTPUTDD1
FEEDBACK = OUTN(0004)
STATUS CODE = AR
The operand for the OUTN keyword is 9 bytes and exceeds the maximum value.
Error code (0006)
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
This example provides an options list that is hexadecimal, 48 (decimal 72) bytes long and the correct length for the options list. The length field of the PRTO keyword incorrectly indicates a length of hexadecimal 5A. The length of the PRTO options exceeds the length of the entire options list so the PRTO keyword is ignored and the rest of the options list scanned for valid keywords. The feedback area contains the PRTO(0006) as we would expect to indicate a length error for this keyword, but we also find that the PRTO keywords are reported to be in error (0002). 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 tells us that the keywords are considered invalid for the call and not the PRTO keyword.
Error code (0008)
CALL = CHNG
00
OPTIONS LIST = IAFP=N0Z,PRTO=0BDEST(018)
FEEDBACK = IAFP(0008) INVALID VARIABLE
STATUS CODE = AR
The message option of the IAFP keyword has been incorrectly specified as 'Z'. This results in the error code (0008).
Error code (000A)
CALL = CHNG
OPTIONS LIST = TXTU=SET1
FEEDBACK = TXTU(000A)
STATUS CODE = AR
For this call, a valid keyword of TXTU was specified but the call also requires that the IAFP keyword be specified if the TXTU keyword is used. Since the IAFP keyword is missing, the error code of (000A) is returned when the TXTU keyword is found.
Error code (000C)
CALL = CHNG
00
OPTIONS LIST = IAFP=A00,PRTO=0BCOPIES(3),TXTU=SET1
FEEDBACK = TXTU(000C)
STATUS CODE = AR
In this case, the call options list contains both the keywords of PRTO and TXTU. These options are mutually exclusive and cannot be used in the same options call list. The result is error code of (000C) returned along with status code of AR.
Error code (000E)
This error code indicates that while parsing the actual print data set descriptors, an error was detected with one or more of the operands. For the most part, IMS does not do any checking for these print descriptors. Instead IMS uses z/OS® services (SJF) to do the validation of the print descriptors. When SJF is called, the validation requested is the same as for the TSO OUTDES command. For this reason, IMS is insensitive to changes in output descriptors and the valid descriptors for your system are a function of the z/OS release level.
You can obtain a list of the valid descriptors and the proper syntax by using the TSO HELP OUTDES command.
IMS must first establish that the format of the PRTO options is in a format such that SJF services can be requested. If not, IMS returns status code AS and error code of (000E) and a descriptive error message. If the error has been detected during the SJF process, the error message from SJF includes information of the form, (R.C.=xxxx,REAS.=yyyyyyyy) and an error message indicating the error. The return codes and reason are further identified in the z/OS MVS Programming: Authorized Assembler Services Reference Vol 1.
The range of some variables are controlled by the JES initialization parameters. Values for the maximum number of copies, allowable remote destination, classes, and form names are examples of variables influenced by the JES initialization parameters.
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
CALL = CHNG
00
OPTIONS LIST = IAFP=A00,PRTO=0AXYZ(018)
FEEDBACK = PRTO(000E) (R.C.=0004,REAS.=000000D0) XYZ
STATUS CODE = AS
This example includes an invalid PRTO operand. The resulting reason code of X'000000D0' indicates that the operand shown (XYZ) is invalid.