The schedule flag word

The schedule flag word is a fullword indicator that the task-related user exit program uses to control its own invocation. It is also used by CICS® to schedule the first invocation of a task-related user exit program.

The schedule flag word is accessed by the address parameter UEPFLAGS of DFHUEPAR. There is a unique schedule flag word for each association between a CICS task and the ENTRYNAME specified when a task-related user exit program is enabled.

The default setting of the schedule flag word is for application program requests (that is, the last two bytes are set to X'0004').

Table 1. Format of the schedule flag word
Byte Setting EXEC CICS ENABLE option Comments
0 Reserved
1 Reserved
2
UEFDCON
UEFDSWAE
UEFDFEDF
UEFDCTER
UEFDTASK
 
UEFMCON (X'40')
UEFMSWAE (X'20')
UEFMFEDF (X'10')
UEFMCTER (X'04')
UEFMTASK (X'01')
 


FORMATEDF
SHUTDOWN
TASKSTART
 
Bit mask for context management
Bit mask for switch application environment
Bit mask for EDF invocation
Bit mask for termination manager
Bit mask for task manager
3
UEFDSYNC
UEFDAPPL
UEFDSPI
 
UEFMSYNC (X'10')
UEFMAPPL (X'04')
UEFMSPI  (X'02')
 


SPI
 
Bit mask for syncpoint manager
Bit mask for application program
Bit mask for SPI

The bit settings of the schedule flag word specify which programs invoke your task-related user exit program. For example, if an exit program is to be invoked by the CICS task manager, the CICS syncpoint manager, and an application program, the last two bytes of the schedule flag word should be set to X'0114'. If an exit program is to be called by the CICS task manager and an application program only, the last two bytes of the flag word should be set to X'0104'. Before the exit program is first called by a task, CICS sets the API flag bit on.

The third column of the table shows the option of the EXEC CICS ENABLE command, if any, that can be used to set the bit for each type of invocation. (How to use options of the EXEC CICS ENABLE command to cause a task-related user exit program to be invoked for specific types of call is described in Enabling for specific invocation-types.)

Before returning from any call, the task-related user exit can change the bit settings of the flag word to register its need to be invoked by a different CICS management service, or to register lack of interest in a service by setting the relevant flag bit to zero.

For example, a task-related user exit may be called by an application program that needs to access a non-CICS recoverable resource. When the exit program is first called, the API bit is set on by CICS. If the calling program then issues a request to update a record, the exit program sets the syncpoint manager bit on in the schedule flag word. When the calling application program subsequently issues a syncpoint command, or when end-of-task is reached, the CICS syncpoint manager calls the exit program.

Note: CICS sets the syncpoint manager bit off after every call to the syncpoint manager. This is to avoid the CICS syncpoint manager invoking the task-related user exit program for a unit of recovery during which the exit program did no recoverable work. The syncpoint manager bit must therefore be set on whenever the exit program performs any recoverable work.

If you set the task manager bit in the schedule flag word on, CICS invokes your task-related exit program at the end of this task. (Note that, if you want your exit program to be called at the start as well as at the end of a task, you must specify TASKSTART on the EXEC CICS ENABLE command for the TRUE. This causes the TRUE to be invoked at the start and end of every task.)

If the last two bytes of the schedule flag word are set to X'1000', this indicates that the task-related user exit is interested in being invoked by EDF to format requests for display. This schedule flag bit UEFDFEDF is set on either by the EXEC CICS ENABLE FORMATEDF command, or by the task-related user exit. Unlike other schedule flag bits, there are restrictions on when the task-related user exit can register a lack of interest in EDF (that is, restrictions on when UEFEDFDF can be set off). Once a task-related user exit has formatted the initial screen for EDF to display on About to Execute or “Command Execution Complete”, CICS does not allow it to set the EDF bit UEFDFEDF off until the screen build cycle is complete.