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


The LINK and ATTACH host command environments

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

For the LINK and ATTACH environments, you can pass only a single character string to the program. Enclose the name of the program and the character string in either single or double quotation marks to prevent the language processor from performing variable substitution. For example:
ADDRESS ATTACH 'TESTPGMA varid'
If you want to pass the value of a variable, then it should not be enclosed in quotation marks. In this case the interpreter will perform the variable substitution before passing the string to the host command environment. The following excerpt from a REXX program would have identical results as the previous example:
parm_value = 'varid'
ADDRESS ATTACH 'TESTPGMA' parm_value

The host command environment routines for LINK and ATTACH do not evaluate the character string you specify. The routine simply passes the character string to the program that it links to or attaches. The program can use the character string it receives. However, the program cannot return an updated string to the exec.

Figure 1 shows how the LINK or ATTACH host command environment routine passes a character string to a program. Register 0 points to the ENVBLOCK under which the REXX exec issuing the ADDRESS LINK or ADDRESS ATTACH is running. Register 1 points to a list that consists of two addresses. The first address points to a fullword that contains the address of the character string. The second address points to a fullword that contains the length of the character string. The high- order bit of the last address in the parameter list is set to 1 to indicate the end of the parameter list.
Figure 1. Parameters for LINK and ATTACH environmentsikja3gc1 ikja3gc1
For example, suppose you use the following instruction:
ADDRESS LINK 'TESMODA numberid payid'
When the LINK host command environment routine links to the TESMODA program, the address of the character string points to the string:
numberid payid

The length of the character string is 14. In this example, if numberid and payid were REXX variables, no substitution is performed by the LINK host command environment.

You can use the LINK or ATTACH environments and not specify a character string. For example:
ADDRESS ATTACH "proga"

In this case, the address of the character string is 0 and the length of the string is 0.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014