Introducing NetMaster REXX › Keyword Instructions › PARSE
PARSE
The PARSE instruction is fully supported by NetMaster REXX with the following differences:
- PARSE EXTERNAL is not presently supported. (This is a TSO/E REXX extension.) You can emulate PARSE EXTERNAL with PARSE PULL when the stack is empty.
- PARSE PULL reads from the stack (per TSO/E REXX). If the stack is empty, a message is sent to the environment (the terminal) requesting input. The GO command can be used to supply input to the waiting procedure. (This is similar to the implementation of PARSE PULL in Tivoli NetView.)
- PARSE NUMERIC is not supported. The three values used as input to the parsing template are the current settings of NUMERIC DIGITS, NUMERIC FUZZ, and NUMERIC FORM. The first two (DIGITS and FUZZ) can be obtained through built-in functions. The last will always be SCIENTIFIC in NetMaster REXX.
- PARSE SOURCE provides, as input to the parsing template, a string in the following format:
GREXX COMMAND PMTGREXX COMMANDS ? PMTGREXX NM NM NM
TSO/E REXX provides a string of the format:
TSO COMMAND PMTGREXX SYS00271 AUDE0.LIB.NCL ? TSO ISPF ?
- PARSE VERSION provides, as input to the parsing template, a string in the following format:
REXX/CA 3.92 18 Oct 1995
TSO/E REXX provides a string in the format:
REXX370 3.48 01 May 1992
The string provided by PARSE SOURCE consists of the following tokens:
- The string GREXX (IBM provides TSO).
- The string COMMAND, FUNCTION, SUBROUTINE, or SERVER indicating how the procedure was invoked. (Currently, NetMaster REXX always uses SUBROUTINE for a called procedure. It does not distinguish function calls.)
- The name of the procedure in uppercase.
- The library ddname (normally COMMANDS).
- A question mark (in TSO/E REXX, possibly the data set name that the procedure was loaded from).
- The procedure name again.
- Initial (default) command environment (normally NM).
- Address Space name (normally NM).
- Parsetok (normally NM).
Copyright © 2009 CA.
All rights reserved.