SMP/E for z/OS Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Conditional JCLIN comment statements

SMP/E for z/OS Commands
SA23-2275-01

SMP/E allows a packager to provide multiple structural definitions within a single JCLIN input stream. SMP/E can then skip parts of the JCLIN input stream, based on control statements placed in the stream by the packager. The parts of the JCLIN input that are skipped are ignored by SMP/E and therefore do not contribute to the structure information derived from JCLIN processing. One use of this function is to ensure that load module information altered by a feature of a product is not downleveled by JCLIN input provided by base product service.

The function described in this topic applies to processing by the JCLIN command, which processes JCLIN input from the SMPJCLIN DD statement, and to the processing of JCLIN input within a SYSMOD by the APPLY and ACCEPT commands.

The conditional JCLIN comment statements are:

  1. //*SMPE-IF SYSMOD(sysmod_id) THEN DO
  2. //*SMPE-ELSE DO
  3. //*SMPE-END

The //*SMPE-IF SYSMOD(sysmod_id) THEN DO (or SMPE-IF for short) comment statement specifies a sysmod_id that is to have checks performed against it and a DO that starts a DO/END grouping of records within the JCLIN input stream. When SMP/E JCLIN processing encounters the SMPE-IF control statement, the sysmod_id value is saved for later checking. Additionally, SMP/E notes that a DO group has been initiated so it can match the current DO to its SMPE-END control statement.

When the SMPE-IF comment statement is within a section of the JCLIN input stream that is being fully processed (that is, not being skipped), some checks are performed on the sysmod_id specified by the SYSMOD keyword to determine if subsequent records in the JCLIN input stream should be fully processed or should be skipped until the SMPE-END for the DO/END group is found. The checks on the specified sysmod_id value are not performed when the SMPE-IF comment statement is encountered as part of the JCLIN input stream that is being skipped.
  • If the specified sysmod_id is
    • a superseded only SYSMOD in the current target or distribution zone, or
    • a SYSMOD that is in process and is not currently marked NOGO (during APPLY and ACCEPT processing), or
    • a real SYSMOD entry with the ERROR indicator OFF in the current target or distribution zone,
    SMP/E reads and fully processes subsequent records until the SMPE-END comment statement that matches the current DO (that is, the one on this SMPE-IF comment statement) is found.
  • If the specified sysmod_id
    • is a SYSMOD that is in process that has been terminated (that is, it is currently marked NOGO) during APPLY and ACCEPT processing and either
      • has no real SYSMOD entry in the current target or distribution zone  -OR-
      • has a real SYSMOD entry in the current target or distribution zone with the ERROR indicator ON

      or

    • is not in process and has a real SYSMOD entry with the ERROR indicator ON in the current target or distribution zone,
    SMP/E terminates JCLIN processing (along with the containing SYSMOD for APPLY and ACCEPT processing), because having the specified sysmod_id in error leaves the content of the current zone in question.
  • If the specified sysmod_id
    • is being deleted during the current APPLY or ACCEPT command and is not in ERROR, or
    • exists as a DELETED SYSMOD entry in the current target or distribution zone, or
    • does not exist at all in the current target or distribution zone or as a SYSMOD currently being installed.
    SMP/E skips any records in the JCLIN input stream that are contained in the DO/END group of the current SMPE-IF comment statement.
The SMPE-IF comment statement must adhere to the following syntax rules:
  • The IF must immediately follow the //*SMPE- on the JCL comment with no intervening blanks.
  • One or more blanks must separate the IF from the SYSMOD(sysmod_id) specification.
  • The SYSMOD(sysmod_id) specification
    • may have one or more blanks between SYSMOD and the opening parenthesis ((), although none are required,
    • may have one or more blanks between the opening parenthesis (() and the sysmod_id, although none are required,
    • may have one or more blanks between the sysmod_id and the closing parenthesis ()), although none are required,
    The sysmod_id must contain seven uppercase alphanumeric characters.
  • One or more blanks must separate the SYSMOD(sysmod_id) specification from the THEN.
  • One or more blanks must separate the THEN from the DO.
  • The whole SMPE-IF comment statement must be on a single record and cannot extend past column 71.
  • Conditional JCLIN comment statements cannot appear within the utility control card section of a JCLIN job step.

The SMPE-ELSE DO clause of an SMPE-IF control statement is optional. It is used to group together a portion of the JCLIN input stream that is to be fully processed only if the checks against the sysmod_id specified on the associated SMPE-IF clause cause the DO/END group of the SMPE-IF to be skipped. Conversely, the DO/END group of the SMPE-ELSE clause is skipped if the DO/END group of the associated SMPE-IF clause is fully processed.

The SMPE-ELSE comment statement must immediately follow the SMPE-END comment statement that ends the DO/END group of the associated SMPE-IF clause. If an SMPE-ELSE comment statement is encountered that does not immediately follow the SMPE-END comment statement that ends the DO/END group of the associated SMPE-IF clause, SMP/E terminates JCLIN processing (along with the containing SYSMOD for APPLY and ACCEPT processing).

The ELSE part of this comment statement must immediately follow the //*SMPE- on the JCL comment with no intervening blanks. One or more blanks must separate the DO portion of this comment statement from the ELSE. The whole SMPE-ELSE comment statement must be on a single record and cannot extend past column 71.

The SMPE-END comment statement ends a DO group started on either an SMPE-IF comment statement or an SMPE-ELSE comment statement. The SMPE-END comment statement is not optional; it must be used to end the DO group.

The END portion of this control statement must immediately follow the //*SMPE- on the JCL comment with no intervening blanks.

If an SMPE-END comment statement is encountered that does not close an open DO from an SMPE-IF or SMPE-ELSE comment statement, SMP/E terminates JCLIN processing (along with the containing SYSMOD for APPLY and ACCEPT processing).

Note that a DO/END group may be empty. This means that there might be no records in the JCLIN input stream between the SMPE-IF or SMPE-ELSE comment statement that starts the DO/END group and the SMPE-END comment statement that ends the DO/END group.

Once SMP/E has parsed one of the conditional JCLIN comment statements, SMP/E ignores the remainder of the record that contains the JCLIN comment statement. This means that users can follow the JCLIN comment statement with one or more blanks and then use the remainder of the record for their own comments.

JCLIN processing works its way through the JCLIN input stream from the first record in the stream to the last record in the stream. Once a record has been processed, it cannot be processed again.

While skipping records in the JCLIN input stream, JCLIN processing still syntax checks the conditional JCLIN comment statements that may exist in the skipped section of the JCLIN input stream. Additionally, DO/END groups and IF THEN/ELSE clauses are matched up in the skipped section of the JCLIN input stream. If an error is detected when doing this syntax checking and matching, SMP/E terminates JCLIN processing. Once a record being skipped is found not to contain one of the SMP/E comment statements, the record is not processed any further.

If SMP/E does not find an SMPE-END comment statement to close an open DO/END group before end-of-file is reached on the JCLIN input stream, SMP/E terminates JCLIN processing.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014