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)

This code indicates that an invalid keyword was discovered within the call options. The error code of (0002) indicates that the keyword scan being performed is associated with keywords that are valid for the call. For example:
  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.

Another example of an error code of (0002) in the feedback is created when the length field that represents the PRTO options is specified as shorter than the actual length of the options. For example:
  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)

This error code indicates that an option variable that follows a keyword in the options list for the CALL is not within the length limits for the option. An example of this type of error is the OUTN keyword. The name of the OUTPUT JCL statement must be from 1- to 8-characters. For example:
  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)

This error occurs when IMS is scanning for valid keywords that are associated with the call and encounters the PRTO keyword. On interrogation of the length field associated with the PRTO keyword, IMS discovers that the total length of the options list for the call is too short to contain all of the operands within the PRTO keyword. For example:
  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)

This error is returned when IMS finds that one of the options for the IAFP keyword has not been specified correctly. For example:
  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)

This error indicates that not all of the necessary keywords have been specified for this call. For example:
  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)

The error code is reporting a condition in which a set of mutually exclusive keywords are used in the same call options list. A clue to the problem being with the call options and not the PRTO options is given by issuing of the status code of AR and not the status code of AS. For example:
  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.

The following examples show parsing errors and the resulting error messages:
  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
For 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
                               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.