Access to Task Attributes in COBOL

A COBOL program can access task attributes by using a task variable. A COBOL program can create a task variable by declaring a data item with a USAGE of TASK, CP, or CONTROLPOINT in the DATA DESCRIPTION entry.

The MYSELF and MYJOB task variables are available in COBOL and enable a COBOL program to access its own task attributes or those of its job.

A COBOL program can read task attribute values by using the MOVE statement, and can set task attributes using the CHANGE statement.

COBOL programs can use all types of task attributes, including event-valued and task-valued task attributes.