Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ task_attribute(1) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exception(1)

task_argument(1)

task_definition(1)

task_group(1)

workspace(1)

acmsxp_introduction(1)

task attribute(1)  —  Commands

Digital

NAME

Task attribute - defines in a task definition the characteristics of a task
 

SYNOPSIS

 
 [ [ NOT ] RESTARTABLE ; ]
 [ SEND DISPLAY [ IS <display-name> ] ; ]
 [ { WORKSPACE IS | WORKSPACES ARE }
      { [ <workspace-name> IS ]  <data-type-identifier>
          [ { SHARED [ { READ | UPDATE } ] | PRIVATE } ]
          [ [ NOT ] TRANSACTIONAL ]
          [ ... ]
      } [ ,... ] ;

PARAMETERS

 

       •display-name
 
An operating system name or an s-text-workspace field containing an operating system name giving the logical name of the device that provides input to the execution of a task, receives output from the execution of a task, or both provides input and receives output. If you specify IS with SEND DISPLAY, you must supply a display name.
 
If you use an s-text-workspace field, the field must be defined within a workspace passed to the task as INPUT or INOUT.

       •data-type-identifier
 
An unqualified external identifier that defines the data type identifier as a workspace name used in the task. See the data_type_definition man page. 

       •workspace-name
 
An unqualified internal identifier defining the workspace name to be associated with the data type identifier. If you specify a workspace name, the ACMSxp system creates a workspace with the record layout defined by the data type identifier. Specifying the workspace name allows you to define multiple workspaces with unique names within the task but with the same record layout specified by the data type identifier and possibly different storage characteristics.
 
The workspace name for a private workspace must be unique within a task definition. The workspace name for a shared workspace must be unique within a task group specification. You cannot use the same workspace name for both a private workspace and a shared workspace within a task definition.
 

DESCRIPTION

 
The following attributes of a task can be specified within the task definition:

oRestartable
 
The RESTARTABLE attribute determines whether a transaction restart can be performed.

oSend display
 
The SEND DISPLAY attribute specifies the task can perform only send exchanges in CALL PRESENTATION statements.

oWorkspace declaration
 
The WORKSPACE(S) attribute defines the names for referring to the working storage of a task.
 

RESTARTABLE

 
Restartability specifies the treatment of transient transaction exceptions. The RESTARTABLE attribute allows for the possibility of retrying a transaction with a transient transaction exception. A transient transaction exception prevents the current transaction from completing, but the transaction may be completed if the transaction is retried. For example, a resource deadlock is a transient transaction exception that may not recur if the transaction is restarted with the same data.
 
If the task is restartable, has restartability enabled, and the transaction restart limit is not exceeded, the ACMSxp system automatically restarts the transaction when it encounters a transient transaction exception. See the Transient Transaction Exception Handling in Tasks section in the exception man page. 
 
A task with the NOT RESTARTABLE attribute cannot retry the transaction. If the task is not restartable, the ACMSxp system automatically translates a transient transaction exception to a permanent transaction exception.
 
To have a restartable task process an application-defined transient transaction exception (if the transaction restart limit is not exceeded and the transaction block in which the exception is raised has no nontransactional exchanges), use the following syntax in the task code:

oRESTART TRANSACTION statement
 
Explicitly restarts the transaction. See the RESTART TRANSACTION topic for more information.

oRAISE EXCEPTION statement
 
Restarts the transaction, if the exception raised is a transient transaction exception.

 
The restartability attribute also sets the default for the WITH DEPENDENT WORK and WITH INDEPENDENT WORK syntax of a submit task or a CANCEL TASK SUBMIT statement.
 
NOT RESTARTABLE is the default task attribute. The defaults for a nonrestartable task are:

oCANCEL TASK SUBMIT and SUBMIT TASK execute WITH INDEPENDENT WORK (outside the transaction of the task). 

oWorkspace declaration is private and nontransactional. 

oAll exchange operations are nontransactional. 

 
The defaults for a restartable task are:

oCANCEL TASK SUBMIT and SUBMIT TASK execute WITH DEPENDENT WORK (within the transaction of the task).  If a transient transaction exception occurs, the transaction rolls back, and the task restarts. 

oWorkspace declaration is private and transactional. 

oSend and receive exchanges are transactional. 
 

Send Display

 
SEND DISPLAY specifies that the task can perform only send exchanges in presentation procedure calls with a send list or the display name specified.
 
When you specify SEND DISPLAY and omit a display name, the default display is used. The default display is the name of the display passed from the client program that called the task. This display name must be defined on the TPsystem under which the task executes. Define the display within the TPsystem and assign it to the task before the task runs. The TPsystem specifies the number of tasks that can be concurrently assigned to a display.
 
The ACMSxp system sets the display name once, when the task is invoked, and does not update it during task execution. When the task starts using the display, another task cannot use the display to make it unavailable to the first task. The following fields are set in SYSTEM-INFO-WORKSPACE:
 
 DISPLAY-NAME        The display name specified in SEND
                     DISPLAY.
 
 DISPLAY-TP-SYSTEM   Full namespace name of the TPsystem on
                     which the display device is available to
                     the task.
 
Specifying SEND DISPLAY overrides any language passed from the calling client program.
 

Display

 
A task accesses a display in one of the following ways.

oNormal
 
A task calls a presentation procedure to send data to and receive data from a single display in a sequence of one or more operations. Either the client program or the task (through the SEND DISPLAY task attribute) assigns the display to the task execution when the execution begins. The client can choose not to assign a display to a task. Also, the task can execute with no display assignable to the task execution. (When a display is assigned to a task through the SEND DISPLAY clause, the display is used for output only.)

oBroadcast
 
A task calls a presentation procedure for a send exchange with a broadcast list. The broadcast list is a list of displays to which a broadcast message is sent. The resulting broadcast send gives the message to the display without regard to any current operation on the display. After a message is sent to the display, any interrupted operation on the display resumes.

 
Multiple tasks can access a display simultaneously. A display is assignable to a task when the display is not currently assigned to another task, or when the display is assigned to the task that called the current task.
 

Workspace Declaration

 
Specifies working storage for a task and the characteristics of the storage. To define a workspace and its characteristics, specify a data type identifier and the related syntax. This defines the workspace name that you use to refer to the storage in the task.
 
If you want to use the same record layout for multiple workspaces, associate different workspace names with the same data type identifier. The task will have multiple uniquely addressable workspaces with the same data type definition.
 
Workspaces are either private or shared. Specify no more than one each of the following for a workspace:
 
  TRANSACTIONAL or NOT TRANSACTIONAL
  SHARED or PRIVATE
 
The defaults are:
 
   Nonrestartable task    NOT TRANSACTIONAL and PRIVATE
   Restartable task       TRANSACTIONAL and PRIVATE
 

Private Workspace

 
A private workspace is a named unit of storage containing a set of values that:

oIs a nondurable resource. 

oCan be either transactional or nontransactional, as specified in the workspace declaration. 

oCan be accessed for read and write from a single task execution only. Each task execution accesses its own private workspace. 

oIs initialized to the value specified in the data type definition before each task execution that refers to it accesses it and after system startup. 
 

Shared Workspace

 
A shared workspace is a named unit of storage containing a set of values that:

oIs a nondurable resource. 

oIs a transactional resource (committed or rolled back at the end of a transaction). 

oCan be accessed for read and write by concurrent task executions for tasks within the same task group specification. If accessed for write, the entire workspace is locked for the duration of the transaction.  Other tasks must wait to access that workspace until the transaction completes. 

oShares workspace context among all tasks that execute within the same task group on the same TP system.  Shared workspace context for read purposes consists of read access to workspaces in any task executing within the same task group on the same TP system. Shared workspace context for write purposes consists of access to previously modified or previously shared workspaces within the current transaction only. 

oSupports isolation level 3, which is a high level of data integrity. 

oIs initialized to the value specified in the data type definition before the first access by the first task invocation. 

oHas a default access mode of UPDATE. 

 
If you specify SHARED READ, ACMSxp software assumes that the task reads only the shared workspace. If a task updates the shared workspace, the results are no longer valid. If you specify SHARED UPDATE, ACMSxp software assumes that the task updates the shared workspace.
 

RELATED INFORMATION

Syntax: exception(1), task_argument(1), task_definition(1), task_group(1), workspace(1)

acmsxp_introduction(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026