The host command environment replaceable routine is called to process all host commands for a specific host command environment . A REXX exec may contain host commands to be processed. When the language processor processes an expression that it does not recognize as a keyword instruction or function, it evaluates the expression and then passes the string to the active host command environment. A specific environment is in effect when the command is processed. The host command environment table (SUBCOMTB table) is searched for the name of the active host command environment. The corresponding routine specified in the table is then called to process the string. For each valid host command environment, there is a corresponding routine that processes the command.
In an exec, you can use the ADDRESS instruction to route a command string to a specific host command environment and therefore to a specific host command environment replaceable routine.The names of the routines that are called for each host command environment are specified in the ROUTINE field of the host command environment table.
You can provide your own replaceable routine for any one of the default environments provided. You can also define your own host command environment that handles certain types of “host commands” and provide a routine that processes the commands for that environment.
For a host command environment routine, the contents of the registers on entry are described below.
Register 0 Address of the current environment block
Register 1 Address of the parameter list I/O
RoutineRegisters 2-12 Unpredictable
Register 13 Address of a register save area
Register 14 Return address
Register 15 Entry point address
Register 1 contains the address of a parameter list, which consists of a list of addresses. Each address in the parameter list points to a parameter. All parameters are passed on the call. The high-order bit of the last address in the parameter list must be set to 1 to indicate the end of the parameter list. The describes the parameters for a host command environment replaceable routine.
Parameters for a Host Command Environment Routine
When the host command environment routine is called, an error recovery routine (ESTAE) is in effect. The one exception is if the language processor environment was initialized with the NOESTAE flag set on. In this case, an ESTAE is not in effect unless the host command environment replaceable routine establishes its own ESTAE.
Unless the replaceable routine establishes its own ESTAE, REXX traps all abends that occur. This includes abends that occur in any routines that are loaded by the host command environment replaceable routine to process the command to be executed. If an abend occurs and the host command environment routine has not established a new level of ESTAE, REXX:
The language processor is restarted with a FAILURE condition.
For a host command environment routine, the contents of the registers on return are:
Registers 0-14 Same as on entry
Register 15 Return code
This shows the return codes for the host command environment routine. These are the return codes from the replaceable routine itself, not from the command that the routine processed.
Return Codes for the Host Command Environment Routine
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|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.