Defining variables
When the command might exceed the line length of the command input area because of the values of the options, or you want to connect two commands through option values, you can define variables.
To display the list of variables, press PF5. For each variable associated with the current interpreter session, the name, length, and value are displayed. CECI creates the first three variables and they are always displayed, unless you explicitly delete them. They are intended to provide examples and help you create command lists.
READ FILE('FILEA') RID('009000') INTO(&REC)The &REC is
displayed as a variable.EXEC CICS READ UPDATE INTO(&REC)
FILE('FILEA') RID('009000')EXEC CICS REWRITE FROM(&REC) FILE('FILEA')The ampersand in the first position tells CECI that you are specifying a variable.
- Name the variable in a receiver. The variable is created when the command is processed. The data type and length are implied by the option.
- Add new entries to the list of variables already defined. To create a new variable, type its
name and length in the appropriate columns on the first unused line of the variables display, and
then press ENTER.
- For character variables, use the length with which the variable has been defined.
- For doublewords, type FD.
- For fullwords, type F.
- For halfwords, type H.
- For packed variables with a length of 4 bytes, type P.
- For packed variables with a length of 8 bytes, type D.
Character variables are initialized to blanks. The others are initialized to zero in the appropriate form. After a variable is created, you can change the value by modifying the data field on the variables display.
- Use the NAME field on the status line when you have produced an expanded area display of a specific option. To do this, position the cursor under the option on a syntax display and press ENTER. To assign the variable name you want associated with the displayed option value, type it into the NAME field and press ENTER again.
- Copy an existing variable. To do this, obtain an expanded area display of the variable to copy, type over the name displayed with the name of the new variable, and press ENTER.
- Use the NAME field directly on a syntax display. This creates a character variable whose contents are the character string on the command line, for use in command lists, as explained in Saving commands.
You can also delete a variable, although CECI discards all variables at session end. To delete a variable before session end, position the cursor under the ampersand that starts the name, press ERASE EOF, then press ENTER.