Appendix E. Mainframe Extended Functions
This appendix provides a reference to the extended functions of VM/CMS and OS TSO/E Rexx. It excludes the dozen or so Double-Byte Character Set (DBCS) functions. This appendix as intended as a quick reference guide for developers, so please see the IBM mainframe Rexx manuals for full details: REXX/VM Reference, SC24-6113 (V5R1) and TSO/E REXX Reference SA22-7790 (V1R6) or TSO/E REXX Reference SC28-1975-05 (V2R10).
Each entry is identified by the name of the function. Entries contain a template of the function, showing its arguments, if any. Optional arguments are enclosed in brackets ([ ]). The template is followed by a description of the function and its use, the function's arguments, and possible return codes. Coding examples show how to code each function. We have noted where the functions differ under VM/CMS versus TSO/E Rexx.
EXTERNALS
EXTERNALS()
For VM, returns the number of lines (or elements) in the terminal input buffer. This is the number of logical typed-ahead lines.
Example
externals() == 0 /* if no lines are present */
For OS TSO/E, this function has no meaning since there is no terminal input buffer. Under OS TSO/E, this function always returns 0.
Example
externals() == 0 /* Under OS/TSO, 0 is ALWAYS returned */
FIND
FIND(string, phrase)
Returns the word number of the first occurrence of phrase in string. Returns 0 if phrase is not found. Multiple blanks between words are treated as one in comparisons. The ANSI-1996 standard function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access