ADDRESS AND ASSIGN COMMANDS - IBM Mainframe

The ADDRESS command is used to access information in the CICS system areas. The syntax of the ADDRESS command is given below:

The following are the most commonly used options of the ADDRESS command:

  • CSA - To access the Common System area
  • CWA - To access the Common Work area
  • TCTUA - To access the Terminal Control Table User area, which is a work area associated with a terminal and will be defined in the TCT as one per terminal
  • TWA - To access the Transaction Work area, which is a work area associated with a task and will be defined in the PCT as one per task The following example shows how the ADDRESS command is used:

ADDRESS AND ASSIGN COMMANDS

ADDRESS AND ASSIGN COMMANDS

After the command is executed the special address registers assigned to the fields of CSA-LAYOUT, TCTUA-LAYOUT and TWA-LAYOUT will contain the address of these fields respectively. Therefore, after the ADDRESS command the fields CSA-LAYOUT, TCTUA-LAYOUT, and TWA-LAYOUT are directly pointing to the respective fields, so that the application program can use these fields. This is an improvement in VS COBOL 11.

Earlier the BLL (Base locator for linkage) cells have to be declared in the linkage section for using the ADDRESS command. Now with VS COBOL II the program becomes much simpler as the BLL cells are no longer required. The reserved word ADDRESS should be used for each 01 level field definitions as shown in the example.

The ASSIGN command is used to access the system value outside of the application program. The syntax of this command is as follows:

syntax of this command

The commonly used options are:

  • CWALENC - To access the length of the CWA
  • TCTUALENC - To access the length of the TCTUA
  • TWALENC - To access the length of TWA
  • USERID - To access the user-id (8 character field)
  • ABCODE - To access the ABEND Code (4 character field)

Consider the following example where the ASSIGN command is used to get the user-id, which initiated the transaction.

ASSIGN command


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

IBM Mainframe Topics