Escolar Documentos
Profissional Documentos
Cultura Documentos
Rexx Programming
INTRODUCTION
What is REXX ?
Simple Programming Language Can run Inside / Outside of a TSO/E Address Space
Rexx Programming
Features of REXX
Ease to Use
Free Format Convenient Built - in Functions Debugging Capabilities Interpreted Language Extensive Parsing capabilities
Rexx Programming
Components of REXX
Instructions
Rexx Programming
Rexx Programming
Rexx Programming
Rexx Programming
Operators
Rexx Programming
Looping Instruction
Repetitive Loops
LEAVE ITERATE
Conditional Loops
Interrupt Instruction
EXIT SIGNAL CALL / RETURN
Rexx Programming
10
Rexx Programming
11
BuiltBuilt-In Functions
Arithmetic Functions
ABS - Returns the Absolute value of the input number MAX - Returns the largest number from the list specified MIN - Returns the smallest number from the list specified RANDOM - Returns a quasi-random, non-negative whole number in the range Specified
Rexx Programming
12
Rexx Programming
13
Formatting Functions:
CENTER / CENTRE Returns a String of a specified length with the input string centered in it. COPIES Returns the specified number of concatenated copies of the input string. LEFT / RIGHT Returns a String of the specified length truncated or padded on the Right / Left as needed.
Rexx Programming
14
Rexx Programming
16
Rexx Programming
17
Passing Information
SAY
Passing Information to the Terminal
PULL
Getting Information from the Terminal
ARG
Specifying the inputs while invoking the execs Periods (.) will act as the dummy variables
PARSE
Preventing the translation of Uppercase
Rexx Programming
18
Rexx Programming
19
Rexx Programming
20
Rexx Programming
21
Rexx Programming
22
Rexx Programming
23
Rexx Programming
24
Stems
First variable name and the first period of a compound variable Every compound variable begins with a stem
Rexx Programming
25
Rexx Programming
26
Rexx Programming
27
Parsing Data
PARSE UPPER PULL PARSE UPPER ARG PARSE UPPER VAR
For Example quote = Knowledge is power PARSE UPPER VAR quote word1 word2 word3
Rexx Programming
29
Rexx Programming
30
Rexx Programming
31
Rexx Programming
32
Rexx Programming
33
Rexx Programming
34
Rexx Programming
35
Rexx Programming
36
Rexx Programming
37
Data Stack
Expandable data structure to store the information STACK - Last In First Out (LIFO) QUEUE First In First Out (FIFO) PUSH Puts one item of data on the top of the Data Stack QUEUE - puts one item of data on the bottom of the Data Stack QUEUED() Total number of elements in a Data Stack PARSE EXTERNAL Gets the input directly from the terminal and by pass the data stack.
Rexx Programming
38
Rexx Programming
39
Rexx Programming
40
Rexx Programming
41
Rexx Programming
42
Rexx Programming
43
Rexx Programming
44
Rexx Programming
45
Rexx Programming
46
Rexx Programming
47
Rexx Programming
48
Rexx Programming
49
Rexx Programming
50
Rexx Programming
51
Rexx Programming
52
Rexx Programming
53
Rexx Programming
54
Rexx Programming
55
Rexx Programming
56
Rexx Programming
57
Rexx Programming
58
Rexx Programming
59
Rexx Programming
60
Rexx Programming
61
Rexx Programming
62
Rexx Programming
63
Rexx Programming
64
Rexx Programming
65
QUEUE Used to queue a null line at the bottom of the stack to indicate the end of the information
Rexx Programming
66
EXECIO .. Contd
Return Codes from EXECIO Command
0 1 2 4 20 Normal Completion Data was truncated during the DISKW operation. End of file Reached before the number of lines were read during DISKR / DISKRU operation. An empty dataset was found during the DISKR / DISKRU operation. Severe error .
Rexx Programming
67
Rexx Programming
68
Rexx Programming
69
SYSEXEC
Is a system file whose dataset can contain only the EXECs.
If both the system files are available, SYSEXEC will be searched first.
Rexx Programming
70
Rexx Programming
71
Rexx Programming
72
Rexx Programming
73
Rexx Programming
74
Rexx Programming
75
Rexx Programming
76
Rexx Programming
77
Rexx Programming
78
Rexx Programming
79
Rexx Programming
80
Rexx Programming
81
Rexx Programming
82
Rexx Programming
83
Rexx Programming
84
Rexx Programming
85
Rexx Programming
86
Rexx Programming
87
Rexx Programming
88
Rexx Programming
89
Rexx Programming
90
Rexx Programming
91
Thank You..
Rexx Programming
92