Previous Topic: Control Statements

Next Topic: BREAK Statement


Syntax

The nine general rules applying to all CA JARS Wizard control statements are described next.

  1. A statement can consist of three parts: a statement name, one or more keyword parameters, and a list of one or more data field names. For example:
    LIST JOB NAME, STEP NAME, ACTIVE TIME
    

    The statement name (LIST in the sample statement) can start in any position; however, it must be the first entry in the control statement.

    Keyword parameters can appear anywhere after the statement name except in the middle of a list.

    Lists such as the string of data field names given above, can be of various lengths. Each entry except the last must be followed by a comma.

  2. CA JARS Wizard makes extensive use of suffix codes to specify optional special processing. For example, COMPUTE(T) and LIST(SUM) are special variations of the COMPUTE and LIST statements. Similarly, WK35(.4) establishes a data field with four decimal places, and ELAPS TIME(MS) converts time data from seconds to minutes and seconds for printing in a report. Suffixes must be appended to the operation code or the field name without intervening blanks.
  3. CA JARS Wizard ignores any entries after position 72 in a control record. Position 72 itself can be used only to indicate that a statement is being continued on the next control record.
  4. Blank spaces are important.

    Data field names can contain blank spaces, but never more than one at a time.

    Example:

    JOB NAME  - valid
    JOB  NAME - invalid
    

    Any number of blank spaces can be inserted before or after a data field name, statement name, or punctuation.

  5. Character literals should normally be enclosed in single quotation marks (' ') to avoid overhead and confusion with data field names. The quote marks are absolutely required only when the literal contains special characters or spaces.

    Both of the following statements are valid:

    SELECT APPL CODE EQ AB137596
    SELECT APPL CODE EQ 'AB137596'
    

    The first statement, with no quotation marks, causes CA JARS Wizard to perform the following checks:

  6. Comments

    Any control record with an * in column 1 is treated as a comment. The text is included in the listing for the run, but it has no effect on processing. One or more comments can be inserted at any point in the control statements.

  7. Continuation of Control Statements

    Any statement can be continued onto one or more additional records by two methods:

    In addition, COMPUTE, SELECT, REJECT, and EXCEPTION statements are assumed to be continued if the statement only contains the keyword and if the statement ends with an operator (for example, +,-,*,/).

  8. Reserved Words

    Certain words have special meaning to CA JARS Wizard and must not be used for anything else. For example:

    BLANK  BLANKS
    SPACE  SPACES
    

    All refer to a field of blank spaces. It can be any length. These words can be used to move a field of blanks to a data field, to compare a field with a field of blanks, or to base selection on whether a field contains blanks.

  9. No punctuation is required at the end of a control statement. A period is permitted. The rest of the record must be blank through position 72.