POST - IBM Mainframe

« Previous Topics
Delay
Formattime
Asktime
Next Topics »
Wait Event
Start
Retrieve

The execution of the POST command allows an application program to be notified when a specific time has expired. CICS in response to the command provides a timer-event control area available for testing. The control area (4 bytes) is initialized to binary zeros, with the pointer reference specified in the SET option set to its address. Upon the timer expiration, the timer-event control area is posted; (first byte set to X'40' and the third byte to X'80'). Testing of the posting can be accomplished in one of two ways:

  • At intervals, checking the timer-event control area. CICS requires an opportunity to post the area, and this is accomplished by relinquishing control of CICS before you test the area. The condition is satisfied as a result of other commands being issued; or if a task is performing a long internal function, you can force control to be relinquished by issuing a SUSPEND command.
  • Suspension of task activity through the WAIT EVENT or WAIT EXTERNAL command until the timer-event control area is posted. This is the same as issuing a DELAY command but with the POST and WAIT EVENT or WAIT EXTERNAL commands sequence, other processing may take place. The DELAY command however will suspend the task activity at once. The POST command is only valid with the task issuing the command. If the timer event control area is released for any reason, the result of any other task issuing a WAIT command on the event set up by the POST command is unpredictable. But another task can cancel the event if access to the REQID associated with the POST command is established. A timer event control area for a task can not be released or altered until one of the following events occurs:
  • The task issues a subsequent DELAY, POST, or START command
  • The task issues a CANCEL command to cancel the POST command
  • The task is terminated, normally or abnormally
  • Any other task issues a CANCEL command for the event set up by the POST command Only one POST command may be active at a time per task. Any DELAY, POST, or START command supersedes a POST command previously issued by the task.

There are two ways to enter the time under AFTER and AT.

  • A combination of at least two of HOURS (0-99), MINUTES(0-59),nd SECONDS(0-59). HOURS (1) SECONDS(3) would mean one hour and three seconds (the minutes default to zero).
  • As one of HOURS (0-99), MINUTES (0-5999),,or SECONDS (0-359 999). HOURS (2) means two hours. MINUTES (75) means one hour §nd 15 minutes; SECONDS (3723) means one hour, two minutes, and three seconds.

The syntax of the POST command is given below:

syntax of the POST command

syntax of the POST command

The various options of the POST command are given below:

  • AFTER - Defines the amount of time before expiration.
  • AT - Defines the exact time of expiration.
  • HOURS (hh) - Fullword binary value (PIC S9(8) COMP) in the range 0-99.
  • INTERVAL (hhmmss) - Defines the elapse time interval from the time that the POST command is issued. The time specified in the command is added to the current clock time by CICS at command execution time to calculate the expiration time. The option specifies when the posting of the timer-event control area should occur, with the default being INTERVAL (0). The C/370 language does not support this option.
  • MINUTES (mins) - Fullword binary value (PIC S9(8) COMP) in the range 0-59, or 0-5999.
  • REQID (name) - Character field (1-8 bytes) containing a unique name to identify a command. The name is used as a temporary-storage identifier. This option is used when another task is used in canceling an unexpired command. If this option is omitted, then the POST command can only be canceled from the same task, and CICS generates a unique request identifier in the EIBREQID field of the EXEC interface block.
  • SECONDS (sees) - Fullword binary value (PIC S9(8) COMP) in the range 0-59, or 0-359,999.
  • SET (ptrjref) - Contains a pointer reference, which will be set to the address of the 4 byte timer event area generated by CICS. Initialization of the area is set to binary zeros and on expiration of the timer, the first byte is set to X'40', and the third byte to X'80. The timer event control area always resides below the 16MB line in a user-key DSX.
  • TIME (hhmmss) - Specifies the time of day for the expiration of the event timer. The C/370 language does not support this option.
    Handle Conditions:
  • EXPIRED - Condition is triggered when command execution specifies a time that already has expired. By default the condition is ignored.
  • INVREQ - Occurs for any of the following reasons:
    1. The POST command is invalid for processing by CICS
    2. Hours are out of range
    3. Minutes are out of range
    4. Seconds are out of range
  • The default action is the abnormal termination of the task.
« Previous Topics
Delay
Formattime
Asktime
Next Topics »
Wait Event
Start
Retrieve

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

IBM Mainframe Topics