Declaring session variables with C and C++

You might want to declare session variables for use during the course of your session. You cannot initialize session variables in declarations. However, you can use an assignment statement or function call to initialize a session variable.

As in C, keywords can be specified in any order. Variable names up to 255 characters in length can be used. Identifiers are case-sensitive, but if you want to use the session variable when the current programming language changes from C to another HLL, the variable must have an uppercase name and compatible attributes.

To declare a hexadecimal floating-point variable called maximum, enter the following C declaration:
double maximum;

You can only declare scalars, arrays of scalars, structures, and unions in z/OS® Debugger (pointers for the above are allowed as well).

If you declare a session variable with the same name as a programming variable, the session variable hides the programming variable. To reference the programming variable, you must qualify it. For example:
main:>x for the program variable x
x for the session variable x

Session variables remain in effect for the entire debug session, unless they are cleared using the CLEAR command.

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