z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the CART to associate commands and their responses

z/OS TSO/E REXX Reference
SA32-0972-00

The command and response token (CART) is a keyword on the TSO/E CONSOLE command and an argument on the GETMSG external function. You can use the CART to associate MVS™ system and subsystem commands your exec issues with the corresponding responses from the commands that are routed to the user's console. To use a CART to associate commands and their responses, solicited messages that are routed to the user's console should not be displayed at the terminal. You must store solicited messages and then retrieve the messages using the GETMSG function.

When you issue an MVS system or subsystem command with a CART, the CART is associated with any messages (responses) that the command issues. When you use GETMSG to retrieve responses from the MVS command, use the same CART on the GETMSG function.

If you issue MVS commands during a console session and have never specified a CART, the default CART value is ‘0000000000000000’X. When you specify a CART, the CART remains in effect for all subsequent MVS commands you issue until you specify a different CART.

You can use a CART in different ways depending on how you issue MVS system and subsystem commands in the exec. If you use the CONSOLE command with the SYSCMD keyword to issue an MVS command, you can use the CART keyword on the CONSOLE command to specify a CART. For example:
"CONSOLE SYSCMD(system_command) CART(AP090032)"

In the example, the CART value AP090032 is used for all subsequent MVS commands until you use another CART.

If you use the CONSOLE host command environment, you can specify the CART in several ways. If you use ADDRESS CONSOLE to issue a single MVS system or subsystem command and you want to use a CART, first use ADDRESS CONSOLE and specify the word CART followed by the CART value. You must separate the word CART and the CART value with a blank. Then use ADDRESS CONSOLE and specify the command. For example:
ADDRESS CONSOLE "CART AP120349"
ADDRESS CONSOLE "system_command"

Again, the CART is used for all subsequent MVS system and subsystem commands until you use another CART value.

You can also use ADDRESS CONSOLE to change the host command environment for all subsequent commands. If you want to use a CART for specific commands, enter the word CART followed by a blank, followed by the CART value. The CART remains in effect until you use another CART value.

For example, suppose you use ADDRESS CONSOLE to issue a series of MVS commands. For the first command, you want to use a CART of APP50000. For the second command, you want to use a CART of APP50001. For the third, fourth, and fifth commands, you want to use a CART of APP522. For the remaining commands, you want to use a CART of APP5100. You could specify the CART values as follows:
/*  REXX program ....   */
⋮
ADDRESS CONSOLE
"CART APP50000"
"mvs_cmd1"
⋮
"CART APP50001"
"mvs_cmd2"
⋮
"CART APP522"
"mvs_cmd3"
"mvs_cmd4"
"mvs_cmd5"
⋮
"CART APP5100"
"mvs_cmd6"
⋮
EXIT

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014