Declaring session variables in COBOL

You might want to declare session variables during your z/OS® Debugger session. The relevant variable assignment commands are similar to their counterparts in the COBOL language. The rules used for forming variable names in COBOL also apply to the declaration of session variables during a z/OS Debugger session.

The following declarations are for a string variable, a decimal variable, a pointer variable, and a floating-point variable. To declare a string named description, enter:
77 description      PIC X(25)
To declare a variable named numbers, enter:
77 numbers          PIC 9(4) COMP
To declare a pointer variable named pinkie, enter:
77 pinkie           POINTER
To declare a floating-point variable named shortfp, enter:
77 shortfp          COMP-1

Session variables remain in effect for the entire debug session.

Refer to the following topics for more information related to the material discussed in this topic.

  • Related references
  • Enterprise COBOL for z/OS Language Reference