Entering Commands from an Exe Page - Issuing Other Types of Commands from an Page Page Page Page - Chapter 9. Diagnosing Problems Within an Storing Information in the D Page - Part 3. Appendixes Page Page - Appendix A. Page - Checklist 3: Writing an Exec that Sets Page - Checklist 4: Writing an Exec that Sets Page Page Page - Appendix B. Specifying Alternate Librari Table of Contents. Chapters Table Of Contents 5 Chapter 1.
Introduction 21 Chapter 2. Using Variables and Expressions 43 Chapter 4. Controlling The Flow Within An Writing Subroutines and Functions 87 Chapter 7. Manipulating Data Chapter 8.
Diagnosing Problems Within An Storing Information In The Data Publications are not stocked at the address below. IBM welcomes your comments. Page 6 Receiving Information from a Function Page 7 Chapter 7.
Manipulating Data Page 8 Appendix C. Page 9 Controlling Program Flow Page 10 V1R1. Page 12 V1R1. Page 14 V1R1.
Page 18 V1R1. Page Part 1. Page 20 V1R1. Page Chapter 1.
Page Convenient Built-in Functions Languages that are not interpreted must be compiled into machine language and possibly link-edited before they are run. With this option in effect, a warning message is issued for each non-SAA item found in a program. Page Chapter 2. Writing And Running A Rexx Exec To create a PDS, allocate a data set with your prefix usually your user ID as the first qualifier, any name as the second qualifier, and preferably "exec" as the third qualifier.
When you type a number, for example 42, and press the Enter key, the variable number1 is assigned the value You then see another sentence on the screen.
Now enter a number to add to the first number. When you enter another number, for example 21, the variable number2 is assigned the value In the first example, the comma at the end of line 1 adds a space when the two lines are concatenated for display.
In the second example, the space between the two separate strings is preserved when the line is displayed. Continuing a literal string without adding a space If you need to continue an instruction to a second or more lines but do not want REXX to add spaces when the line appears on the screen, use the concatenation Page Types Of Rexx Instructions A description of each type of instruction appears after the example.
In most of the descriptions, you will see an edit line number without the prefixed zeroes to help you locate the instruction in the example.
Failure to do so can lead to unexpected or unintended results in your REXX exec.
Then run the example execs implicitly. Which way is easier? Page Interpreting Error Messages Interpreting Error Messages Interpreting Error Messages When you run an exec that contains an error, an error message often displays the line on which the error occurred and gives an explanation of the error. Error messages can result from syntax errors and from computational errors. For example, the following exec has a syntax error.
For example, you pass three numbers to "add". The second variable gets both '21 10'. In this situation, the exec ends with an error when it tries to add the two variables. Page Chapter 3. The following variable big represents the value one million or 1,, More about special variables appears later in this book. Examples of whole numbers are: 0 Page Comparison Operators Expressions that use comparison operators do not return a number value as do arithmetic expressions.
Page Logical boolean Operators Logical expressions, like comparison expressions, return a true 1 or false 0 value when processed.
Ibm tso rexx reference pdf in html
Logical operators combine two comparisons and return the true 1 or false 0 value depending on the results of the comparisons. Page Concatenation Operators One way to format output is to use variables and concatenation operators as in the following example. A more sophisticated way to format information is with parsing and templates. Page Chapter 4. Controlling The Flow Within An Exec Looping instructions, which tell the language processor to repeat a set of instructions.
A loop can repeat a specified number of times or it can use a condition to control repeating.
When either clause has no instructions, it is good programming practice to include NOP no operation next to the clause. Then have the exec reply with the number of days.
For month "2", the reply can be "28 or 29". Note: HE does not alter the halt condition, which is raised by HI. If you entered HI The flight has 8 passengers and 4 window seats. The following loop is set to repeat 10 times while a certain condition is met, at which point it stops.
Page Signal Instruction In the following example, if the expression is true, then the language processor goes to the label Emergency: and skips all instructions in between. It should not be used as a convenient way to move from one place in an exec to another.
Page 78 V1R1. Page Chapter 5. Using Functions A function call can contain up to 20 arguments separated by commas.
Each argument can be one or more of the following. Page Built-in Functions Miscellaneous functions These functions do not clearly fit into any of the other categories. The following tables briefly describe the functions in each category. Arithmetic Functions Function Description Returns the absolute value of the input number.
How to embed PDFs in HTML?
Page Conversion Functions Returns a string indicating if one string is equal to the specified number of leading characters of another string. DELSTR Returns a string after deleting a specified number of characters, starting at a specified point in the input string.
IBM TSO/E REXX User Manual
Page 85 Built-In Functions the user a message indicating the shortened name. Page Chapter 6.
Writing Subroutines And Functions There can be no space between the function name and the parentheses.