Previous Topic: PARM Field ParametersNext Topic: Loading Runtime Components


Control Statements

Control statements help to establish the runtime environment for an CA ADS Batch application. Each control statement must be terminated by a period. Control statements can appear in any order.

Syntax for the control statements is shown below:

►►────┬──────────────────────────────────────────────────────┬────────────────►
      └─ PRImary pool ─┬──────┬─ primary-pool-size ──── . ───┘
                       ├─ IS ─┤
                       └─ = ──┘

 ►────┬──────────────────────────────────────────────────────────┬────────────►
      └─ SECondary pool ─┬──────┬─ secondary-pool-size ───── . ──┘
                         ├─ IS ─┤
                         └─ = ──┘

 ►────┬───────────────────────────────────────────────────────────────────────►
      └┬─ DIAlog ─┬─ STAtistics ──┬─ OFF ─────────────────────────────────────
       └─ DLG ────┘               └─ ON ─┬──────────────────────────────────┬─
                                         ├─ ALL ────────────────────────────┤
                                         │            ┌─────────/─────┐     │
                                         └─ FOR ── ( ─▼─ dialog-name ─┴─ ) ─┘

 ►──────────────────────────────────────────────────────────────────────────┬─►
  ─────────────────────────────────────────────────────────────────┬─── . ──┘
  ──┬─────────────────────────────────────────────────────────────┬┘
    └─┬─ CHEckpoint ─┬─ interval ─┬──────┬─ checkpoint-interval ──┘
      └─ CKPT ───────┘            ├─ IS ─┤
                                  └─ = ──┘

 ►────┬────────────────────────────────────────────────────────────┬──────────►
      │                               ┌──────────────┐             │
      └─ ROUting codes ─┬───────┬─ ( ─▼─ route-code ─┴─ ) ──── . ──┘
                        ├─ ARE ─┤
                        ├─ IS ──┤
                        └─ = ───┘

 ►────┬────────────────────────────────────────────────────────────────────┬──►
      │                                  ┌───────────────────┐             │
      └─ DEScriptor codes ─┬───────┬─ ( ─▼─ descriptor-code ─┴─ ) ──── . ──┘
                           ├─ ARE ─┤
                           ├─ IS ──┤
                           └─ = ───┘

 ►───┬────────────────────────────────────────────────────────────────────────►
     └┬─ DIAlog ─┬─ dialog-name has ─┬─ MAXERR ────────┬──────────────────────
      └─ DLG ────┘                   └─ MAXimum ERRor ─┘

 ►───────────────────────────────────┬────────────────────────────────────────►
  ── count of maximum-errors ─── . ──┘

 ►────┬────────────────────────────────────────────────────────┬──────────────►
      └─ OPErator SHUtdown ─┬───────┬─┬─┬─ ENAbled ─┬─┬─── . ──┘
                            ├─ IS ──┤ │ └─ YES ─────┘ │
                            └─ = ───┘ └─┬─ DISabled ─┬┘
                                        └─ NO ───────┘

 ►───┬─────────────────────────────────────────────────────┬──────────────────►
     └─ MAXimum LINks ──┬──────┬── maximum-links ──── . ───┘
                        ├─ IS ─┤
                        └─ = ──┘
 ►───┬────────────────────────────────────────────────────────────────┬───────►
     └─ COMmit when files open causes ──┬──────┬───┬─ NOACTion ─┬─ . ─┘
                                        ├─ IS ─┤   ├─ WARNing ──┤
                                        └─ =  ─┘   └─ ABEND ────┘

 ►─┬────────────────────────────────────────────────────────────────────┬─────►
   │       ┌──────────────────────────────────────────────────┐         │
   └─ LOG ─▼─┬─── FILE1 ──┬──────┬─ run-time-label ─────────┬─┴──── . ──┘
             │            ├─ IS ─┤                          │
             │            └─ = ──┘                          │
             ├─── COUNT1 ─┬──────┬─ file1-maximum-records ──┤
             │            ├─ IS ─┤                          │
             │            └─ = ──┘                          │
             ├─── FILE2 ──┬──────┬─ run-time-label ─────────┤
             │            ├─ IS ─┤                          │
             │            └─ = ──┘                          │
             ├─── COUNT2 ─┬──────┬─ file2-maximum-records ──┤
             │            ├─ IS ─┤                          │
             │            └─ = ──┘                          │
             ├─┬─ ARChive ────┬─────────────────────────────┤
             │ └─ NOARChive ──┘                             │
             ├─┬─ COMpress ───┬─────────────────────────────┤
             │ └─ NOCOMpress ─┘                             │
             └─┬─ PREfix ─────┬─────────────────────────────┘
               └─ NOPREfix ───┘

 ►─┬───────────────────────────────────────────────────────────────────────────►
   │ ┌───────────────────────────────────────────────────────────────────────┐
   └─▼─DIAlog ┬ dialog-name ┬ INput ───┬┬───────────────┬┬────┬ run-time-lbl─┘
     └ DLG ───┘             ├ OUTput ──┤├ runtime LABEL ┤├ IS ┤
                            └ SUSpense ┘├ FILe name ────┤└ = ─┘
                                        └ DDName ───────┘

 ►─── . ──────────────────────────────────────────────────────────────────────►
 ►─┬────────────────────────────────────────────────────────────────────────┬─►
   └─ DEFault print ──┬─ CLAss ──┬──────┬── print-class ────────────┬── . ──┘
                      │          ├─ IS ─┤                           │
                      │          └─ = ──┘                           │
                      └─ DEStination ─┬──────┬─ print-destination ──┘
                                      ├─ IS ─┤
                                      └─ = ──┘

 ►─┬──────────────────────────────────────────────┬───────────────────────────►
   └─ DBName ──┬──────┬── database-name ──── . ───┘
               ├─ IS ─┤
               └─ = ──┘

 ►─┬───────────────────────────────────────────────────┬──────────────────────►
   └─ DBNOde ──┬──────┬── database-node-name ──── . ───┘
               ├─ IS ─┤
               └─ = ──┘
 ►─┬──────────────────────────────────────────────────┬───────────────────────►
   └─ DICTNAme ──┬──────┬── dictionary-name ──── . ───┘
                 ├─ IS ─┤
                 └─ = ──┘
 ►─┬───────────────────────────────────────────────────────┬──────────────────►
   └─ DICTNOde ──┬──────┬── dictionary-node-name ──── . ───┘
                 ├─ IS ─┤
                 └─ = ──┘

 ►─┬──────────────────────────────────────────────┬───────────────────────────►
   └─┬─ REQuestor ──┬─┬──────┬── user-id ─── . ───┘
     └─ USEr ───────┘ ├─ IS ─┤
                      └─ = ──┘

 ►─┬──────────────────────────────────────────────────────────────────────┬───►
   └─ ENTry point ──┬─┬─ DIAlog ─┬─┬──────┬─ dialog-name ─────────┬── . ──┘
                    │ └─ DLG ────┘ ├─ IS ─┤                       │
                    │              └─ = ──┘                       │
                    └─── TASk ──┬──────┬─ application-task-code ──┘
                                ├─ IS ─┤
                                └─ = ──┘

 ►─┬────────────────────────────────────────────────────────────────────────┬─►◄
   │ ┌──────────────────────────────────────────────────────────────────┐   │
   │ │                           ┌─────────────────────────────────────┐│   │
   └─▼─ TRAce ─┬─ dialog-name ─┬─▼─┬─────────────────────────────────┬─┴┴ .─┘
               └─ ALL ─────────┘   ├─ BEFore ──┬─ MAXimum ◄ ───────┬─┤
                                   │           └─ execution-count ─┘ │
                                   ├─ AFTer ───┬─ 0 ◄ ─────────────┬─┤
                                   │           └─ execution-count ─┘ │
                                   ├─ EVEry ───┬─ 1 ◄ ─────────────┬─┤
                                   │           └─ execution-count ─┘ │
                                   ├─ SUBRoutines ───────────────────┤
                                   └─ COMmands ──────────────────────┘
PRIMARY POOL IS primary-pool-size

Specifies the size, in bytes, of the primary buffer pool. Primary-pool-size is an integer in the range 0 through 2,147,483,647. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is set at system generation.

Note: For more information about specifying primary pools, see the discussion of the ADSO statement in the CA IDMS System Generation Guide.

SECONDARY POOL IS secondary-pool-size

Specifies the size, in bytes, of the secondary buffer pool. The secondary pool is allocated from the system storage pool when the primary buffer pool becomes full. Secondary-pool-size is an integer in the range 0 through 2,147,483,647. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is set at system generation.

DIALOG STATISTICS OFF/ON

Specifies whether dialog statistics are to be collected during application execution.

OFF specifies that statistics are not to be collected.

ON specifies that statistics are to be collected. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is OFF.

Parameters included in the ON clause are as follows.

ALL/FOR (dialog-name)

Specifies whether dialog statistics are maintained for all dialogs (ALL) or for only selected dialogs in an application. Multiple dialogs must be separated by commas.

The default is determined by specifications made using ADSOBSYS. ADSOBSYS allows you to specify ALL or SELECTED. If you specify SELECTED, you must list the selected dialogs in the DIALOG STATISTICS control statement at runtime.

CHECKPOINT INTERVAL IS checkpoint-interval

Specifies the frequency with which dialog statistics are to be written to the log file. Statistics are written to the log file once every checkpoint-interval time that statistics are accumulated. CA ADS Batch accumulates statistics every time a dialog issues a control command. The default checkpoint interval is determined by specifications made using ADSOBSYS; the ADSOBSYS default is set at system generation.

ROUTING CODES ARE (route-code)

(z/OS only) specifies the z/OS operator-message routing codes, as described in the applicable operating system supervisor services and macro instructions. This parameter supplies the value of the ROUTCDE parameter for WTO (write-to-operator) macros issued by the system. Route-code is an integer in the range 1 through 16. Multiple routing codes must be separated by commas. The default routing codes are determined by specifications made using ADSOBSYS; the ADSOBSYS default is 11.

DESCRIPTOR CODES ARE (descriptor-code)

(z/OS only) specifies the z/OS operator-message description code, as described in the applicable operating system supervisor services and macro instructions. This parameter supplies the descriptor code to the DESC parameter for WTO (write-to-operator) macros issued by the system. Descriptor-code is an integer in the range 1 through 16. The default descriptor codes are determined by specifications made using ADSOBSYS; the ADSOBSYS default is 7.

DIALOG dialog-name HAS MAXERR COUNT OF maximum-errors

Specifies the maximum number of error records that can be sent to the suspense file of the specified dialog. If this number is exceeded at runtime, the runtime system terminates the application. For example, if the maximum error count is 1, the runtime system terminates the application when the second error record is to be written. If the maximum error count is 0, the runtime system allows an unlimited number of error records to be sent to a suspense file. Maximum-errors is an integer in the range 0 through 32,767. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is 0.

OPERATOR SHUTDOWN IS ENABLED/DISABLED

Specifies whether the operator can send a request to the runtime system to terminate an application. If operator shutdown is enabled, the runtime system begins application execution by issuing a WTOR (write-to-operator with reply) macro. At any time during application execution, the operator can issue a SHUTDOWN command, as described earlier in this chapter. The SHUTDOWN command causes the runtime system to terminate the application with an optional dump. If shutdown is disabled, the operator can terminate the application only by canceling the job. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is DISABLED.

COMMIT WHEN FILES OPEN CAUSES NOACTION/WARNING/ABEND

Specifies the action to be taken when a run unit is committed before all files used in the application have been closed, as follows:

The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is ABEND.

Committing a run unit when files are open can jeopardize application restartability after an abend, as described under Application Restartability.

LOG

LOG parameters specify defaults for the log file; all LOG parameters are optional.

FILE1 IS run-time-label

Specifies the runtime label (z/OS ddname, z/VSE filename) of the primary log file. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is ADSLOGA.

COUNT1 IS file1-maximum-records

Specifies the number of log records that are written to the primary log file before the file is considered full. This parameter is meaningless for spool or tape log files.

If file1-maximum-records is reached at runtime, the runtime system switches to the secondary log file or, if no secondary log file is allocated, wraps around to the beginning of the primary log file.

If 0 is specified, no predefined limit is placed on the number of records written to the primary log file. If space for a disk log file is exceeded at runtime, the runtime system abnormally terminates the application.

File1-maximum-records is an integer in the range 1 through 99999. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is 0.

FILE2 IS run-time-label

Specifies the runtime label of the secondary log file. The default is determined by specifications made using ADSOBSYS.

COUNT2 IS file2-maximum-records

Specifies the number of log records that are written to the secondary log file before the file is considered full.

If file2-maximum-records is reached at runtime, the runtime system switches back to the primary log file.

If 0 is specified, no predefined limit is placed on the number of records written to the secondary log file. If space for a disk log file is exceeded at runtime, the runtime system abnormally terminates the application.

File2-maximum-records is an integer in the range 1 through 99999. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is 0.

ARCHIVE/NOARCHIVE

(z/OS only) specifies whether log file archiving is to be performed at runtime when a log file is full. For more information about log file archiving, see "Log files" in CA ADS Batch Concepts. The default is determined by specifications made using ADSOBSYS; the ADSOBSYS default is NOARCHIVE.

COMPRESS/NOCOMPRESS

Specifies whether log records are compressed in the log file to save space at runtime. The default is determined by specifications made using ADSOBSYS. If neither ADSOBSYS nor a runtime control statement specifies COMPRESS or NOCOMPRESS, the runtime system uses the z/OS, or z/VSE device-type assignment to determine whether to compress the records:

  • In z/OS, records are not compressed if the assignment is SYSOUT; otherwise, records are compressed.
  • In z/VSE, records are not compressed if the device type is PRINTER (as specified at system generation using ADSOBSYS or at runtime); otherwise, records are compressed.
PREFIX/NOPREFIX

Specifies whether a prefix is to precede each log record. Prefixes are used by the print log utility to select records. The default is determined by specifications made using ADSOBSYS. If neither ADSOBSYS nor a runtime control statement specify PREFIX or NOPREFIX, the runtime system uses the z/OS or z/VSE device type assignment to determine whether to include a prefix:

  • In z/OS, a prefix is not included if the assignment is SYSOUT; otherwise, a prefix is included.
  • In z/VSE, a prefix is not included if the device type is PRINTER (as specified at system generation using ADSOBSYS or at runtime); otherwise, a prefix is included.
DIALOG

The DIALOG statement associates a dialog's input, output, and suspense files with runtime labels (z/OS ddnames, z/VSE filenames). Each input, output, and suspense file of each dialog must be associated with a runtime label.

Note: You can associate a file with a runtime label during dialog definition as well. In such a case, you do not have to specify a runtime label in a control statement at runtime. If a runtime label is specified in both places, the control statement specification takes precedence.

DIALOG statement parameters are described below.

dialog-name

The name of the dialog.

INPUT/OUTPUT/SUSPENSE

Specifies whether the file identification information that follows pertains to the dialog's input, output, or suspense file.

RUNTIME LABEL/FILE NAME/DDNAME IS run-time-label

Specifies the runtime label input, output, or suspense file. RUNTIME LABEL, FILE NAME, and DDNAME are synonymous.

Note: To request that a suspense file not be allocated for the input file, even though a suspense file runtime label was specified during dialog definition, specify blanks within single quotation marks, as in the example below:

DIALOG XXX INPUT RUNTIME LABEL INFILE
           SUSPENSE RUNTIME LABEL ' '.

The following example specifies information about a z/OS dialog's input, output, and suspense files:

DIALOG DIALOG1
  INPUT DDNAME IS INPUT1
OUTPUT DDNAME IS OUTPUT1
  SUSPENSE DDNAME IS SUS1.
DEFAULT PRINT CLASS IS print-class/DESTINATION IS print-destination

Specifies the default print class to which a report is assigned or the default print destination to which a report is routed. A report is created using WRITE PRINTER commands. Print-class must be an integer in the range 1 through 64. Print-destination is a 1- to 8-character destination not enclosed in quotation marks.

DBNAME IS database-name

Optionally specifies the CA IDMS/DB database to be accessed by the application.

DBNODE IS database-node-name

Optionally specifies the DDS node that controls the CA IDMS/DB database to be accessed by the application.

DICTNAME IS dictionary-name

Optionally specifies the data dictionary in which the definitions and load modules for the requested application are stored.

DICTNODE IS dictionary-node-name

Optionally specifies the DDS node that controls the data dictionary in which the definitions and load modules for the requested application are stored.

REQUESTOR IS user-id

Specifies the 1- to 32-character id of a user. The user id can be accepted into dialog variable storage by issuing an ACCEPT USER ID command, and is automatically moved to the prefix of all log file records written during the application. User-id is not enclosed in quotation marks.

ENTRY POINT

Specifies the entry point into the application.

If the ENTRY POINT statement is not included, an entry point must be specified as an input parameter, as discussed earlier in this chapter. The ENTRY POINT statement overrides the input parameter.

DIALOG IS dialog-name

Specifies the name of a mainline dialog.

TASK IS application-task-code

Specifies a task code associated with an application function. The function must be associated with a mainline dialog.

TRACE

Activates the CA ADS Batch trace facility for a dialog.

For a detailed discussion of the trace facility, see CA ADS Batch Trace Facility.

TRACE statement parameters are described below.

dialog-name/ALL

Specifies the dialog for which tracing is activated; the parameters BEFORE, AFTER, EVERY, COMMANDS, and SUBROUTINES apply to the named dialog. ALL specifies that tracing is performed for all dialogs; the parameters BEFORE, AFTER, EVERY, COMMANDS, and SUBROUTINES apply to all dialogs that have not been named explicitly in the TRACE statement.

To selectively activate tracing for several dialogs, repeat the parameters of the TRACE statement for each dialog.

BEFORE MAXIMUM/execution-count

Specifies that tracing is to be performed each time the dialog becomes operative, up to but not including the execution-countth time. MAXIMUM (default) specifies tracing is to be performed every time the dialog becomes operative, unless restricted by AFTER and EVERY specifications.

AFTER 0/execution-count

Specifies that tracing is to be performed each time the dialog becomes operative beyond the execution-count time. Zero (default) specifies tracing is to be performed every time the dialog becomes operative, unless restricted by BEFORE and EVERY specifications.

EVERY 1/execution-count

Specifies that tracing is to be performed each time the execution count for the dialog reaches a multiple of execution-count. One (default) specifies tracing is to be performed every time the dialog becomes operative, unless restricted by AFTER and BEFORE specifications. specifies that tracing is to be performed only every execution-countth time that the dialog becomes operative. One (default) specifies that tracing is performed each time the dialog becomes operative, unless restricted by BEFORE and AFTER specifications.

SUBROUTINES

Specifies that subroutine entry points are to be documented, in addition to dialog and process entry points.

COMMANDS

Specifies that process commands are to be documented, in addition to dialog, process, and subroutine entry points.

If neither SUBROUTINES nor COMMANDS is specified, only dialog and process entry points are documented for the specified dialog.

Multiple TRACE statements can be specified for the same dialog. The last BEFORE, AFTER, and EVERY specifications coded for a dialog apply to that dialog for the entire execution of the application. The most detailed level of documentation coded applies to the dialog for the entire execution; COMMANDS is more detailed than SUBROUTINES, which is more detailed than no specification at all.