START - IBM Mainframe

« Previous Topics
Wait Event
Post
Delay
Next Topics »
Retrieve
Cancel
Suspend

The START command starts a task, on a local or. a remote system, at a specified time. Optionally data can be passed to the to-be initiated transaction. The syntax of the START command is given below:

syntax of the START command

syntax of the START command

The various options of the START command are:

  • AFTER - This option is used in defining the elapse time prior to execution. Their exist two methods of entering the time for this option.
  • Enter a combination of at least two of the following: HOURS (0-99), MINUTES (0-59), and SECONDS (0-59)
  • Enter only one of the following: HOURS (0-99), MINUTES (0-5999), or SECONDS (0-359 999)
  • AT - Enter the exact time that the ROUTE command is to be executed. The following contains the valid values: HOURS (0-24), MINUTES (0-59), and SECONDS (0-59)
  • FMH - Indicates the data being written includes the function management header.
  • FROM (data area) - Identifies the storage location that contains the data to be stored for the task that is to be started at some future time.
  • HOURS (hh) - Fullword binary (PIC S9(8) COMP) value (0-99 range). This is a sub-option to the AFTER and AT options.
  • INTERVAL (hhmmss) - Specify the time interval to wait before issuing the START command. The expiration time is calculated by CICS by adding the specified time to the current clock when the command is executed. The default is INTERVAL(O). This command option is unsupported in the C/370 programming language. This option is used to specify when a new task should begin.
  • LENGTH (datavalue) - Halfword binary (PIC 9(4)COMP) indicating the number of bytes of storage required.
  • MINUTES (mins) - Fullword binary (PIC S9(8) COMP) value (0-5999 range). This is a suboption to the AFTER and AT options.
  • NOCHECK - Indicates that for remote systems, CICS will improve performance of the START command by providing less error checking and less functionality.
  • PROTECT - Indicates that the starting task is required to take a syncpoint prior to starting a new task. The request to start a new task is cancelled if the starting task abends prior to the syncpoint being taken. IF the REQID option is used, the request identifier should be a name defined as recoverable to temporary storage. When starting a remote transaction, PROTECT indicates that it cannot be scheduled until the local transaction has successfully completed a syncpoint.
  • QUEUE (name) - Character field (1-8 bytes) containing the name of the temporary storage queue that may be used by the started transaction.
  • REQID (name) - Character field (1-8 bytes) containing a unique name in identifying a command. This .name is used as a temporary storage identifier. This temporary storage queue having been identified must be defined as a local queue on the CICS system where the START command is executed. The START command is executed on the system identified in the SYSID option or on the local system if SYSID is omitted. When using the FROM option with this option, the data contained in the FROM option is stored in a temporary storage using the REQID name as the name oi*the temporary storage queue. This option can be used when another task is to be provided with the capability of canceling an unexpired command. When omitting this option, CICS generates a unique request identifier in the EIBREQID field of the EXEC interface block, unless the NOCHECK. option is used, in which case field EIBREQID is set to blanks and cannot be used subsequently to cancel the START command.
  • RTERMID (name) -Character field (4 bytes) containing the terminal name that can be retrieved when the transaction, specified in the TRANSID option of the START command is activated. Upon retrieval, the value may be used in the TERMID option of a subsequent START command.
  • RTRANSID (name) - Character field (4 bytes) containing the transaction name that can be retrieved when the transaction, specified in the TRANSID option of the START command is activated. Upon retrieval, the value may be used in the TRANSID option of a subsequent START command.
  • SECONDS (sees) - Fullword binary (PIC S9(8) COMP) value (0-359,999 range). This is a suboption to the AFTER and AT options.
  • SYSID (name) - Character field (4 bytes) specifying the name for the APPC connection to the required system. The name specified must be defined in the CICS terminal control table.
  • SYSID (systemname) - For remote systems only. Character field (4 bytes) specifying the name for the APPC connection where the request will be directed to for execution.
  • TERMID (name) - Character field (4 bytes) containing the symbolic identifier of the principal facility associated with a transaction to be started as a result of a START command. This principal facility can be either a terminal (usual case) or an APPC session. For an APPC session, the connection (or modeset) name is used instead of a terminal identifier. This is a required option anytime the transaction being started must communicate with a terminal, otherwise it should be omitted. The name must have been previously defined in thejocal TCT as either a local or remote terminal prior to the start of the transaction.
  • TIME (hhmmss) - Define the expiration time prior to the execution of the new task. This command option is unsupported in the C/370 programming language.
  • TRANSID (name) - Character field (1-4 bytes) containing the symbolic identifier of the transaction to be initiated as a result of the executed START command. The name must have been previously defined in the PCT or in the RDO file. When SYSID is used, the transaction is directed to the remote system regardless of what is defined in the local PCT for the transaction. Otherwise the PCT entry is used to find out where the transaction resides (local or remote). Handle Conditions:
  • INVREQ - Condition is set for any of the following reasons: o Invalid START command for CICS processing o REQID name specified in the command already exists o Hours out of range o Minutes out of range o Seconds out of range The default action is the abnormal termination of the task
  • IOERR - Is set when an I/O error occurs during the START. This condition is also set when an attempt is made to write to temporary storage when temporary storage is full or the command specifies a REQID that already exists. The default action is the abnormal termination of the task
  • ISCINVREQ - Is set when the remote system indicates a failure that is not covered by an existing CICS condition. The default action is the abnormal termination of the task
  • LENCERR - Condition is set when LENGTH is not greater than zero. The default action is the abnormal termination of the task
  • NOTAUTH - Resource security check failure has occurred on TRANSID (name). The default action is the abnormal termination of the task
  • SYSIDERR - The SYSID specified cannot be found in the intersystem table, (defined in CICS by defining a CONNECTION), or if the link to the remote system is unavailable or closed. The default action is the abnormal termination of the task
  • TERMIDERR - Generated when the specified TERMID is not located in the CICS TCT. The default action is the abnormal termination of the task
  • TRANSIDERR - Generated when the specified TRANSID is not located in the CICS PCT. The default action is the abnormal termination of the task.

Execution of the START Command

We have seen that the START command is used to start a task. The starting task may pass data to the started task and may also specify a terminal to be used by the started task as its principal facility. Please note that CEDF is not a valid transaction for this command and therefore no attempt to start CEDF should be done by this command. The options RTRANSID, RTERMID, and QUEUE can be used to pass further data to the started task. These options contain data values that are determined on what was specified in the started and starting tasks. One example of using this is as follows:

One task can start a second task, passing it a transaction name and a terminal name to be used when the second task starts a third task. The first task may also pass the name of a queue to be accessed by the second task. If you use QUEUE to pass the name of a temporary storage queue on which to store data to a started transaction, it must not be the same as the name you specified in REQID, if used.

When passing data by interval control (using the FROM option), it's queued on a temporary storage queue with the name specified in the REQID option when the option is provided. This identifier should be recoverable (in temporary storage terms) when the PROTECT option is also used, or non-recoverable if the PROTECT option is omitted. When the PROTECT option is omitted, unpredictable results can occur. Such problems cannot occur if REQID is not used.

The NOCHECK option indicates that there will be no expected response by the starting transaction to the execution of the START command. When starting tasks on a local system, error conditions are returned, but when starting tasks on a remote system, error conditions are not returned. The NOCHECK option allows CICS to improve performance when the START command is shipped to a remote system; this is also a prerequisite if the shipping of the START command is queued pending the establishment of links to the remote system.

There exist several constraints, which need to be satisfied prior to the transaction being executed. They are as follows:

  • The specified interval must have elapsed or the specified expiration time must have been reached. For transactions to be executed on a remote system the INTERVAL option should be used which will avoid complications arising when the local and remote systems are in different time zones.
  • When using the TERMID option, the named terminal must be available and exist in CICS, otherwise the START is discarded when the INTERVAL expires.
  • When using the PROTECT option, the starting task must have successfully taken a syncpoint. This option, coupled to extensions to system tables, reduces the exposure to lost or duplicated data caused by failure of a starting task.
  • When executing a transaction on a remote system, the data format must be declared the same as that on the local system. This is accomplished by using the RDO options DATASTREAM and RECORDFORMAT, or DATASTR and RECFM in the TCT TYPE=SYSTEM. For CICS-CICS, these are always the default values. For CICS-IMS/VS, care should be taken to specify the correct values. When execution of a START command uses a transaction name on the local system, it cancels any outstanding POST commands executed by the starting task.

Starting Tasks without Terminals

Starting a non-terminal task results in a separate task being started for each START command. This happens regardless of whether or not data is passed to the started task. The two following examples show how to start a specified task, not associated with a terminal, in one hour:

Starting Tasks without Terminals

Starting Tasks with Terminalsbut without Data

If several START commands containing the same transaction and terminal name expire at the same time prior to terminal availability, then only ONE task is started. The following two examples show how to request initiation of a task associated with a terminal. Because no request identifier is specified in this example, CICS assigns one and returns it to the application program in the E1BREQID field in the EIB.

Starting Tasks with Terminalsbut without Data

Starting Tasks with Terminals and Data

If one or more of the options, FROM, RTRANSID, RTERMID, and QUEUE are used, then data is passed to the started task, and can be accessed by using a RETRIEVE command. It is possible to pass many data records to a new task by issuing several START commands, with each using the same transaction and terminal identifiers. The first START command will cause the new task to start and allow the retrieval of data specified in the command. This new task is then able to retrieve data specified on subsequently executed START commands that expire prior to the new task being terminated. If the task expires prior to the data being retrieved, then another new task is started which is then able to retrieve all outstanding data. If this new task fails to retrieve all outstanding data, then another new task is started and this continues up to five times, at which point no new tasks are sta/ted and any outstanding data is lost. The following two examples show how to start a task associated with a terminal and pass data to it:

Starting Tasks with Terminals and Data

START Failures without Exception Conditions

There are no return codes when the function or program is disabled. To inquire on the status of either, issue the INQUIRE TRANSACTION command prior to executing the START command to ensure the function or program is available for use.

  • Starting tasks without errors but task is not executed At the time CICS attempts to create the task from the START command the transaction code or the initial program to be executed is disabled
  • The START command specifies a terminal and an expiration time, but at expiration time the terminal is not defined and cannot be located by the X1CTENF or XALTENF exits.
  • The START command specifies a terminal that is not defined and cannot be located by the XICTENF or XALTENF exits when CICS attempts to create the task.

These errors can occur as a result from the delay between command execution and the time of task creation. Even specifying an immediate START is no guarantee, for CICS may delay the task creation for a number of reasons (e.g., required terminal not available, or other system constraints). Use the INQUIRE commands to verify that the transaction and program are enabled when issuing the START command. However, either may become disabled after the START command is issued but prior to task creation.

Scheduled Transaction Initiation (STI)

A special application of the START command is the Scheduled Transaction Initiation (STI), by which certain CICS transactions can be initiated automatically at the scheduled time or interval. STI is achieved in conjunction with the Program List Table (PLT). The PI (Post-initialization) entry of the DFHPLT specifies which are the transactions that have to be started by CICS immediately after start-up. For achieving this there should be an entry in the System Initialization Table (SIT) also. So for a program to be initiated there should be an entry in the PLT, SIT and PPT. An example is given to show how these entries are made. Consider that you want to start a program PCBT031 at the CICS start up time.

Scheduled Transaction Initiation (STI)

Immediately after start-up CICS will initiate the program PCBT031. If you want to initiate a program at a scheduled time automatically, that can be achieved by giving a START command with the TIME option. If you want to start a transaction automatically and repeatedly at scheduled interval (for example every 1 hour) this can be achieved by using the START command with INTERVAL option as described above under the START command.

« Previous Topics
Wait Event
Post
Delay
Next Topics »
Retrieve
Cancel
Suspend

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics