ADDRESS temporarily or permanently changes the destination of commands.Commands are strings sent to an external environment.You can send commands by specifying clauses consisting of only an expression or by using the ADDRESS instruction.
To send a single command to a specified environment, code an environment, a literal string or a single symbol, which is taken to be a constant, followed by an expression.(The environment name is the name of an external procedure or process that can process commands.) The expression is evaluated, and the resulting string is routed to the environment to be processed as a command.(Enclose in quotation marks any part of the expression you do not want to be evaluated.) After execution of the command, environment is set back to whatever it was before, thus temporarily changing the destination for a single command.The special variable RC is set, just as it would be for other commands. Errors and failures in commands processed in this way are trapped or traced as usual.
Example:ADDRESS LINK "routine p1 p2" /* TSO/E */
If you specify only environment, a lasting change of destination occurs: all commands that follow (clauses that are neither REXX instructions nor assignment instructions) are routed to the specified command environment, until the next ADDRESS instruction is processed. The previously selected environment is saved.
Similarly, you can use the VALUE form to make a lasting change to the environment. Here expression1 (which may be simply a variable name) is evaluated, and the result forms the name of the environment. You can omit the subkeyword VALUE if expression1 does not begin with a literal string or symbol (that is, if it starts with a special character, such as an operator character or parenthesis).
Example:ADDRESS (’ENVIR’||number) /*
With no arguments, commands are routed back to the environment that was selected before the previous lasting change of environment was made, and the current environment name is saved. After changing the environment, repeated execution of ADDRESS alone, therefore, switches the command destination between two environments alternately.
The two environment names are automatically saved across internal and external subroutine and function calls.
The address setting is the currently selected environment name.You can retrieve the current address setting by using the ADDRESS built-in function.TSO/E REXX provides several host command environments that you can use with the ADDRESS instruction.
IBM-REXX Related Interview Questions
|IBM - VSAM Interview Questions||IBM DB2 Interview Questions|
|COBOL Interview Questions||IBM-JCL Interview Questions|
|IBM Mainframe Interview Questions||IBM Cloud Computing Infrastructure Architect V1 Interview Questions|
|IBM WebSphere MQ Interview Questions||IBM DataPower Interview Questions|
|Unix/Linux Interview Questions||Ibm Websphere Message Broker Interview Questions|
Rexx General Concepts
Numbers And Arithmetic
Conditions And Condition Traps
Using Rexx In Different Address Spaces
Reserved Keywords, Special Variables, And Command Names
Tso/e Rexx Commands
Tso/e Rexx Customizing Services
Language Processor Environments
Initialization And Termination Routines
Replaceable Routines And Exits
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.