Working with files or members containing JCL

When using the DSC or FCH utility with a file that contains JCL and the JCL Source format option has been selected, there are two methods used to maintain integrity.

The choice of method can be specified using the JCL installation option or the SET JCL function.

Important:
  1. The following rules only apply to cards that are changed. If a card is not changed the syntax is not checked.
  2. Any JCL file that is referenced is assumed to have valid syntax. The integrity checking performed by File Manager should not be seen as a method of remedying invalid JCL.

JCL=COMPAT

When a JCL statement has been continued over multiple lines, File Manager reformats the physical JCL records into a single logical JCL statement for processing and then builds a new set of physical JCL records.

  • The rules only apply to legitimate JCL cards (// cards but not //*):
    • When a change would cause truncation due to the insertion of characters, the card is split at a suitable position. If possible, File Manager inserts the part that was cut into the next card; otherwise, an extra card is created.
    • When a change causes the removal of data, the card is changed to a comment card.
    • In both of the above, File Manager attempts to maintain the integrity of matching quotation marks, matching brackets, and commas between parameters.
  • The rules do not apply to:
    • Comment (//*) cards.
    • Embedded comments at the end of a legitimate JCL card
    • Non-JCL cards. For example, data cards.
    • JCL cards contained within a DD DATA construct as these are considered to be data cards.
When reformatting JCL cards, File Manager takes into account the following:
  • The first card of a logical JCL statement contains one of the following statement types:

    CNTL
    COMMAND
    DD
    ENDCNTL
    EXEC
    IF
    THEN
    ELSE
    ENDIF
    INCLUDE
    JCLLIB
    JOB
    OUTPUT
    PEND
    PROC
    SET
    XMIT

  • Each logical JCL card may consist of one or more physical JCL cards.
  • Comment (//*) cards are not candidates for reformatting.
  • Data cards (no // in columns 1-2) are not candidates for reformatting.
  • Each logical JCL card can have embedded comment (//*) cards which are also not candidates for reformatting.
  • The logical JCL statement line consists of the logical JCL statement itself (name, operation, and parameter fields), with continuation syntax removed. The logical JCL statement is delimited with a x'FF'. Any comments are then appended, with each comment being separated by a x'FF' delimiter.
  • Each physical JCL card consists of 4 parts:
    Name part
    Contains the contents of column 1 up to the last character before the parameter part, including the card type. For example, DD, JOB, and so on. This part may also only contain // as in the case of a continuation line.
    Parameter part
    Contains the contents of the first character after the name part, including any blanks after the last character of the parameter part.
    Embedded comment part
    This part is optional. It contains the contents of the first non-blank character after the parameter part up to column 71 inclusive. Column 72 is a special column and as such is not considered a candidate for reformatting.
    Sequence number part (including continuation character)
    Contains the contents of columns 72 to 80.
When building a new set of physical JCL cards from a logical JCL statement, the following processing takes place:
  • If the logical JCL statement line is unchanged, File Manager does not change any part of the associated physical records.
  • If the logical JCL statement line content changes in any way, then File Manager reflows the logical JCL contents into the associated physical records.
    Note: It is possible for a logical JCL statement change to require reflowing even if the old and new strings are identical in length-- the changed logical JCL statement might need to be broken into physical records differently.
    • File Manager attempts to maintain the contents of the existing physical line (columns 73–80) and the existing JCL statement comment fields. However:
      • File Manager does not attempt to associate any part of a logical JCL statement with the related physical line columns (columns 73–80), or with the JCL statement comment fields. The physical columns (columns 73–80), the JCL statement comment fields, and logical lines are treated independently of each other.
      • JCL statement comment fields may be truncated.
      • File Manager may remove redundant blanks from, and otherwise reformat, the physical JCL lines.
      • If a logical JCL statement is changed and it requires fewer physical records, File Manager turns the "extra" physical records at the end into JCL comment statements, which start with //* and contain blanks in the JCL statement area. Data in the comment record columns 73–80 remains unchanged from the original non-comment record data.
    • If an entire sub-parameter is removed as a result of a change, and this was the only information on a card, the card is changed to be a comment card.

// JCL statements passed to a REXX procedure

The following additional rules apply to JCL statements (those starting with //) that are passed to a REXX procedure.

  • The REXX input and output buffers (INREC and OUTREC) contain the logical JCL statement, including the // at the front.
  • The REXX procedure processing can only access and affect the logical JCL statement.
  • File Manager ignores any changes made to the // characters in bytes 1 and 2 of a logical JCL statement in an output buffer (OUTREC).

JCL=RECORD

File Manager processes each physical JCL record as is, unless it contains a parameter field enclosed in apostrophes. If this parameter continues across multiple records, the records are flowed together to join the parameter before processing.

When a record is changed, and the total length exceeds 71 columns, the fields are continued onto one or more new records. If it is not possible to interrupt the statement the change fails.

When a change removes all parameter data from a record:
  • If it contains embedded comment data the record is changed to a JCL comment statement.
  • If it does not contain any other JCL field data the record is deleted.
These rules do not apply to:
  • Non-JCL cards. For example, data cards.
  • JCL cards contained within a DD DATA construct, as these are considered to be data cards.
  • Data in columns 73-80.