Understanding parsing errors
When you are diagnosing multiple parsing error return codes, the first code returned is usually the most informative.
Keywords
The CHNG
and SETO
calls have two types of keywords. The type of
keyword determines what type of keyword validation IMS should
perform. The keyword types are:
- Keywords valid for the calls (for example, IAFP, PRTO, TXTU, and OUTN)
- Keywords valid as operands of the PRTO keyword (for example CLASS and FORMS).
Incorrectly specified length fields can cause errors when IMS checks for valid keywords. When IMS is checking the
validity of keywords on the CHNG
and SETO
calls, one set of
keywords is valid. When IMS is checking the validity of
keywords on the PRTO keyword, another set of keywords is valid. For this reason, incorrectly
specified length fields can cause a scan to terminate prematurely, and keywords that appear to be
valid are actually invalid because of where they occur in the call list. IMS might report that a valid keyword is invalid if it detects a keyword with
an incorrect length field or a keyword that occurs in the wrong place in the call list.
Status codes
The status code returned for the call can also suggest the location of the error. Although exceptions exist, generally, an AR status code is returned when the keyword is invalid for the call. An AS status code is returned when the keyword is invalid as a PRTO option.
Error codes
Diagnosis examplescontains examples of errors and the resulting error codes provided to the application program.
- Error Code
- Reason
- (0002)
- Unrecognized option keyword.
Possible reasons for this error are:
- The keyword is misspelled.
- The keyword is spelled correctly but is followed by an invalid delimiter.
- The length specified field representing the PRTO is shorter than the actual length of the options.
- A keyword is not valid for the indicated call.
- (0004)
- Either too few or too many characters were specified in the option variable. An option variable following a keyword in the options list for the call is not within the length limits for the option.
- (0006)
- The length field (LL) in the option variable is too large to be contained in the options list. The options list length field (LL) indicates that the options list ends before the end of the specified option variable.
- (0008)
- The option variable contains an invalid character or does not begin with an alphabetic character.
- (000A)
- A required option keyword was not specified.
Possible reasons for this error are:
- One or more additional keywords are required because one or more keywords were specified in the options list.
- The specified length of the options list is more than zero but the list does not contain any options.
- (000C)
- The specified combination of option keywords is invalid. Possible causes for this error are:
- The keyword is not allowed because of other keywords specified in the options list.
- The option keyword is specified more than once.
- (000E)
- IMS found an error in one or more operands while it was
parsing the print data set descriptors. IMS usually uses z/OS® services (SJF) to validate the print descriptors (PRTO=
option variable). When IMS calls SJF, it requests the same
validation as for the TSO OUTDES command. Therefore, IMS is
insensitive to changes in output descriptors. Valid descriptors for your system are a function of
the MVS release level. For a list of valid descriptors and
proper syntax, use the TSO HELP OUTDES command.
IMS must first establish that the format of the PRTO options is in a format that allows the use of SJF services. If it is not, IMS returns the status code AS, the error code (000E), and a descriptive error message. If the error is detected during the SJF process, the error message from SJF will include information of the form (R.C.=xxxx,REAS.=yyyyyyyy), and an error message indicating the error.
Related reading: For more information on SJF return and reason codes, see z/OS MVS Programming: Authorized Assembler Services Guide .
The range of some variables is controlled by the initialization parameters. Values for the maximum number of copies, allowable remote destination, classes, and form names are examples of variables influenced by the initialization parameters.