Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $GETOPT

$GETOPT
Returns the value of a session parameter or option. (F)
Invocation
value = $GETOPT(option_name)
 
On return, contains the value. Its syntax is C (fixed-length character string) with length 16.
The parameter or option from which to return the value. Its syntax is C with length 16. Valid values for option_name are shown below.
Available Parameters and Options
Only the parameters and options identified are accepted by this tool.
Parameter or Option Name
Open Systems
All parameters that can be set with $SETOPT, except LANGUAGE, can be retrieved with $GETOPT. The following can also be retrieved:
The Execution Environment type: BATCH, CICS, CLI, IMS TM, NATIVE, NT, TSO, or UNIX.
The name of the logical terminal defined to IMS TM.
The IDPREFIX, that is, the IMS TM Control Region used by the present TIBCO Object Service Broker session.
The maximum transaction stream level.
Usage Notes
If the parameter name is not supported, the following message is written to the system log, and the exception RANGERROR is signaled: Invalid argument OPTION-NAME ===> (xyz) <=== for $GETOPT
On Open Systems, the parameters TRANCODE, TRANDATE, and TRANTIME always return an empty string.
See Also
TIBCO Object Service Broker for z/OS External Environments or TIBCO Object Service Broker for Open Systems External Environments for information about using TIBCO Object Service Broker with external environments.
Example
The following rule returns the Execution Environment type for the present session:

 
RULE EDITOR ===> SCROLL: P
GETOPT_1;
_ LOCAL KERNEL;
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ KERNEL = $GETOPT('KERNEL'); | 1
_ CALL ENDMSG('THE EXECUTION ENVIRONMENT TYPE IS ' || KERNEL | 2
_ ); |
_ ---------------------------------------------------------------------------

 
After it is executed, ENDMSG returns the following message if the session is run under TSO: THE EXECUTION ENVIRONMENT TYPE IS TSO

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved