IBM SC34-5764-01 Bedienungsanleitung

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481

Zur Seite of

Richtige Gebrauchsanleitung

Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung IBM SC34-5764-01 an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von IBM SC34-5764-01, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.

Was ist eine Gebrauchsanleitung?

Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung IBM SC34-5764-01 die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.

Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung IBM SC34-5764-01. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.

Was sollte also eine ideale Gebrauchsanleitung beinhalten?

Die Gebrauchsanleitung IBM SC34-5764-01 sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts IBM SC34-5764-01
- Den Namen des Produzenten und das Produktionsjahr des Geräts IBM SC34-5764-01
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts IBM SC34-5764-01
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen

Warum lesen wir keine Gebrauchsanleitungen?

Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von IBM SC34-5764-01 zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von IBM SC34-5764-01 und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service IBM finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von IBM SC34-5764-01 zu überspringen, wie es bei der Papierform passiert.

Warum sollte man Gebrauchsanleitungen lesen?

In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts IBM SC34-5764-01, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.

Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von IBM SC34-5764-01 widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.

Inhaltsverzeichnis der Gebrauchsanleitungen

  • Seite 1

    CIC S T ransa ct i o n Serv er f o r V SE/E S A R EXX G ui d e SC34-5764-01 [...]

  • Seite 2

    [...]

  • Seite 3

    CIC S T ransa ct i o n Serv er f o r V SE/E S A R EXX G ui d e SC34-5764-01 [...]

  • Seite 4

    Note! Before using this information and the product it supports, be sure to read the general information under “Notices” on page 443. Second edition (September 2000) This edition applies to Release 1 of CICS T ransaction Server for VSE/ESA, program number 5648-054, and to all subsequent versions, releases, and modifications until otherwise indi[...]

  • Seite 5

    Contents Preface .................................... x i x What this book is about .............................. x i x Who this book is for ............................... x i x What you need to know to understand this book ..................... x i x Prerequisites ................................. x i x Part 1. User's Guide ................[...]

  • Seite 6

    T racing Results ................................ 3 0 Exercises - Using the TRACE Instruction ....................... 3 0 Chapter 4. Controlling the Flow within a program ................... 3 3 Conditional, Looping, and Interrupt Instructions ..................... 3 3 Using Conditional Instructions ............................ 3 3 IF ...THEN...ELS[...]

  • Seite 7

    What is a Host Command Environment? ....................... 8 2 How Is a Command Passed to the Host Environment? .................. 8 3 Changing the Host Command Environment ...................... 8 3 Chapter 9. Diagnosing Problems within a program ................... 8 5 Debugging Programs ............................... 8 5 T racing Commands with[...]

  • Seite 8

    Operators .................................. 1 1 5 Parentheses and Operator Precedence ....................... 1 1 8 Clauses and Instructions ............................. 1 2 0 Null Clauses ................................. 1 2 0 Labels ................................... 1 2 0 Instructions ................................. 1 2 0 Assignments .....[...]

  • Seite 9

    OPTIONS ................................... 1 5 1 P ARSE .................................... 1 5 2 PROCEDURE ................................. 1 5 5 PULL .................................... 1 5 8 PUSH .................................... 1 5 9 QUEUE ................................... 1 6 0 RETURN ................................... 1 6 1 S A Y .[...]

  • Seite 10

    OVERLA Y .................................. 1 8 9 POS (Position) ................................ 1 8 9 QUEUED .................................. 1 9 0 RANDOM .................................. 1 9 0 REVERSE ................................. 1 9 1 RIGHT ................................... 1 9 1 SIGN ................................... 1 9 1 SOURCEL[...]

  • Seite 11

    Arithmetic Operation Rules—Additional Operators ................... 2 2 0 Numeric Comparisons ............................. 2 2 2 Exponential Notation .............................. 2 2 2 Numeric Information .............................. 2 2 4 Whole Numbers ............................... 2 2 4 Numbers Used Directly by REXX .....................[...]

  • Seite 12

    QQUIT ................................... 2 4 9 QUERY .................................. 2 4 9 QUIT ................................... 2 5 0 RESERVED ................................. 2 5 1 RESET ................................... 2 5 1 RIGHT ................................... 2 5 1 S A V E................................... 2 5 2 S O R T ......[...]

  • Seite 13

    Security ................................... 2 7 4 RLS commands ................................ 2 7 5 CKDIR ................................... 2 7 5 DELETE .................................. 2 7 5 LPULL ................................... 2 7 5 LPUSH ................................... 2 7 6 LQUEUE .................................. 2 7 7 MKDIR .[...]

  • Seite 14

    Options ................................... 3 0 4 P ANEL V ariables ............................... 3 0 5 Panel Facility Return Code Information ....................... 3 0 6 Return Codes ................................ 3 0 7 System Error Reason Codes ........................... 3 0 7 Programmer Introduced W arning/Error Reason Codes .............[...]

  • Seite 15

    Example .................................. 3 3 1 Notes ................................... 3 3 1 DEFCMD ................................... 3 3 2 Operands .................................. 3 3 2 Return Codes ................................ 3 3 3 Example .................................. 3 3 3 Notes ................................... 3 3 3 DEFSC[...]

  • Seite 16

    Return Codes ................................ 3 5 0 Example .................................. 3 5 1 Note .................................... 3 5 1 FLST .................................... 3 5 2 Operands .................................. 3 5 2 Return Codes ................................ 3 5 2 Example .................................. 3 5 2 No[...]

  • Seite 17

    Return Codes ................................ 3 6 8 Example .................................. 3 6 8 Notes ................................... 3 6 8 S E T ..................................... 3 6 9 Operands .................................. 3 6 9 Return Codes ................................ 3 7 0 Example .................................. 3 7 0 [...]

  • Seite 18

    LISTPOOL .................................. 3 9 1 LISTTRNID .................................. 3 9 2 C 2 S ..................................... 3 9 2 PSEUDO ................................... 3 9 2 AUTHUSER .................................. 3 9 2 SETSYS ................................... 3 9 2 S 2 C ..................................... 3 9 2 T[...]

  • Seite 19

    System Profile Exec ............................... 4 1 7 Authorized REXX/CICS VSE Librarian sublibraries .................... 4 1 7 Defining Authorized Users ............................. 4 1 7 Setting System Options .............................. 4 1 8 Defining and Initializing a REXX File System (RFS) File Pool ................ 4 1 8 Adding File[...]

  • Seite 20

    Screen Definition Facility II (SDF II) ........................ 4 4 1 Notices ................................... 4 4 3 T rademarks .................................. 4 4 5 Index .................................... 4 4 7 Sending your comments to IBM .......................... 4 5 5 xviii CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 21

    Preface What this book is about This book describes REXX/CICS or REXX for CICS T ransaction Server for VSE/ESA. This IBM program product provides a native REXX-based application development, customization, prototyping, and procedures language environment for REXX/CICS, along with associated runtime facilities. Who this book is for This book is for [...]

  • Seite 22

    xx CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 23

    Part 1. User's Guide © Copyright IBM Corp. 1992, 2009 1[...]

  • Seite 24

    2 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 25

    Chapter 1. Introduction This chapter describes the REXX programming language and some of its features. What is REXX? REXX is an extremely versatile programming language. Common programming structure, readability , and free format make it a good language for beginners and general users. REXX is also suitable for more experienced computer professiona[...]

  • Seite 26

    Components of REXX The various components of REXX make it a powerful tool for programmers. REXX is made up of: v Clauses, which can be instructions, null clauses, or labels. Instructions can be: – Keyword instructions – Assignments – Commands (REXX/CICS and CICS commands and SQL). The language processor processes keyword instructions and assi[...]

  • Seite 27

    Chapter 2. Writing and Running a REXX Program This chapter introduces programs and their syntax, describes the steps involved in writing and running programs, and explains concepts you need to understand to avoid common problems. What you need to run a REXX Program? Before you can run a REXX Program, you must configure the REXX support. Go through [...]

  • Seite 28

    When you run the example program, the first PULL instruction assigns the variable number1 the value 42 . The second PULL instruction assigns the variable number2 the value 21 . The next line contains an assignment. The language processor adds the values in number1 and number2 and assigns the result, 63 , to sum . Finally , the SA Y instruction disp[...]

  • Seite 29

    SAY 'This is a REXX literal string.' /* Using single quotation marks */ SAY "This is a REXX literal string." /* Using double quotation marks */ Do not enclose a literal string with one each of the two different types of quotation marks. For example, the following is incorrect : SAY 'This is a REXX literal string." /* U[...]

  • Seite 30

    SAY 'This is' 'a string.' The space between the two separate strings is preserved: This is a string. 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 in the line, use the concatenation operand (two single OR bars, ||). SAY &apo[...]

  • Seite 31

    T ypes of REXX Clauses REXX clauses can be: instructions, null clauses, and labels. Instructions can be keyword instructions, assignments, or commands. The following example shows a program with these types of clauses. A description of each type of clause follows the example. Keyword Instructions A keyword instruction tells the language processor t[...]

  • Seite 32

    Label A label, such as sub: is a symbolic name followed by a colon. A label can contain either single- or double-byte characters or a combination of single- and double-byte characters. (Double-byte characters are valid only if OPTIONS ETMODE is the first instruction in your program.) A label identifies a portion of the program and is commonly used [...]

  • Seite 33

    character is X'0F') The SO and SI characters are non-printable. In the following example, the less than (<) and greater than (>) symbols represent shift-out (SO) and shift-in (SI), respectively . For example, <.S.Y .M.D> and <.D.B.C.S.R.T .N> represent DBCS symbols in the following example. Example The following is an ex[...]

  • Seite 34

    rexx hello Hello! What is your name? sam Hello SAM Here is what happens: 1. The SA Y instruction displays Hello! What is your name? 2. The PULL instruction pauses the program, waiting for a reply . 3. Y ou type sam on the command line and then press Enter . 4. The PULL instruction puts the word SAM into the variable (the place in the computer'[...]

  • Seite 35

    When the program runs, the language processor sends the following lines of output. 7 +++ PULL who /* Get the person's name.IF who = '' THEN SAY 'Hello, stranger'ELSE SAY 'Hello,' who CICREX453E Error 6 running HELLO EXEC, line 7: Unmatched "/*" or quote The program runs until the language processor detec[...]

  • Seite 36

    Quotation marks ensure that information in a program is processed exactly as typed. This is important in the following situations: v For output that must be lowercase or a mixture of uppercase and lowercase. v T o ensure that commands are processed correctly . For example, if a variable name in a program is the same as a command name, the program c[...]

  • Seite 37

    The PULL instruction can extract more than one value at a time from the terminal by separating a line of input. The following variation of the example shows this. REXX addtwo 42 21 The PULL instruction extracts the numbers 42 and 21 from the terminal. Specifying V alues When Calling a program Another way for a program to receive input is through va[...]

  • Seite 38

    REXX add 42 21 10 The language processor assigns the value 42 to number1 , the first variable following ARG. It assigns the value 21 10 to number2 , the second variable. In this situation, the program ends with an error when it tries to add the two variables. In other situations, the program might not end in error . T o prevent the last variable fr[...]

  • Seite 39

    4. lastname = WEBER, firstname = JOE, score = 91 5. lastname = Baker , firstname = Amanda, score = Marie 95 6. lastname = Callahan, firstname = Eunice, score = 88 Passing Arguments V alues passed to a program are usually called arguments. An argument can consist of one word or a string of words. Blanks separate words within an argument from each ot[...]

  • Seite 40

    18 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 41

    Chapter 3. Using V ariables and Expressions This chapter describes variables, expressions, and operators, and explains how to use them in REXX programs. Program V ariables One of the most powerful aspects of computer programming is the ability to process variable data to achieve a result. Regardless of the complexity of a process, when data is unkn[...]

  • Seite 42

    v The first character cannot be 0 through 9 or a period (.) v The variable name cannot exceed 250 bytes. For names containing DBCS characters, count each DBCS character as 2 bytes, and count the shift-out (SO) and shift-in (SI) as 1 byte each. v SO (X'0E') and SI (X'0F') must delimit DBCS characters within a DBCS name. Also note[...]

  • Seite 43

    ANSWERS 1. Incorrect, because the first character is a number . 2. Incorrect, because the first character is a “£”. 3. V alid 4. V alid 5. V alid, but it is a special variable name that you should use only to receive results from a subroutine. Using Expressions An expression is something that needs to be evaluated and consists of numbers, vari[...]

  • Seite 44

    ** Raise a number to a whole number power − number (Prefix −) Same as the subtraction 0 - number + number (Prefix +) Same as the addition 0 + number Using numeric constants and arithmetic operators, you can write arithmetic expressions such as: 7 + 2 /* result is 9 */ 7 - 2 /* result is 5 */ 7 * 2 /* result is 14 */ 7 ** 2 /* result is 49 */ 7 [...]

  • Seite 45

    7+2*3-1 ___/ 6 3. Addition and subtraction from left to right 7+6-1=1 2 Using Arithmetic Expressions Y ou can use arithmetic expressions in a program many different ways. The following example uses several arithmetic operators to round and remove extra decimal places from a dollar and cents value. Exercises—Calculating Arithmetic Expressions 1. [...]

  • Seite 46

    For example, if A=4 and Z=3 , then the results of the previous comparison questions are: ( A=Z ) D o e s4=3 ? 0 (False) ( A>Z ) I s4>3 ? 1 (T rue) ( A<Z ) I s4<3 ? 0 (False) The more commonly used comparison operators are as follows: Operator Meaning = Equal == Strictly Equal = Not equal = = Not strictly equal > Greater than < L[...]

  • Seite 47

    Exercises - Using Comparison Expressions 1. Based on the preceding example of using a comparison expression, what result does the language processor produce from the following lunch costs? Y esterday's Lunch T oday's Lunch 4.42 3.75 3.50 3.50 3.75 4.42 2. What is the result ( 0 or 1 ) of the following expressions? a. "Apples" = [...]

  • Seite 48

    Operator Meaning & AND Returns 1 if both comparisons are true. For example: (4 > 2) & (a = a) /* true, so result is 1 */ (2 > 4) & (a = a) /* false, so result is 0 */ | Inclusive OR Returns 1 if at least one comparison is true. For example: (4 > 2) | (5 = 3) /* at least one is true, so result is 1 */ (2 > 4) | (5 = 3) /* nei[...]

  • Seite 49

    ___________________/ / true / _____________________________/ true As a result, when you run the program, it produces the result: Go skiing. Exercises - Using Logical Expressions A student applying to colleges has decided to evaluate them according to the following specifications: IF (inexpensive | scholarship) & (reputable | nearby) THEN SAY [...]

  • Seite 50

    The result of this example is: baseball £ 5 A more sophisticated way to format information is with parsing and templates. Information about parsing appears in section “Parsing Data” on page 73. Priority of Operators When more than one type of operator appears in an expression, what operation does the language processor do first? IF (A > 7**[...]

  • Seite 51

    3. Evaluate 0&1 is 0 Exercises - Priority of Operators 1. What are the answers to the following examples? a. 22 + (12 * 1) b . - 6/- 2>( 4 5%7/2 )-1 c . 1 0*2-( 5+1 )/ /5*2+1 5-1 2. In the example of the student and the college from the previous exercise on page “Exercises - Using Logical Expressions” on page 27, if the parentheses were [...]

  • Seite 52

    When you run the example, the SA Y instruction produces: 9* - *I Fa+1>5*y >V> "9" >L> "1" >O> "10" >L> "5" >V> "2" >O> "10" >O> "0" The 9 is the line number . The *-* indicates that what follows is the data from the program, I Fa+1<[...]

  • Seite 53

    When you run this program, it produces: 1 2* - *I F( a>z )|( c<2*d ) >V> "1" >V> "2" >O> "0" >V> "3" >L> "2" >V> "4" >O> "8" >O> "1" >O> "1" *-* THEN 13 *-* SAY 'At least one expression was true.[...]

  • Seite 54

    Using V ariables and Expressions 32 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 55

    Chapter 4. Controlling the Flow within a program This chapter introduces instructions that alter the sequential execution of a program and demonstrates how to use those instructions. Conditional, Looping, and Interrupt Instructions Generally , when a program runs, one instruction after another executes, starting with the first and ending with the l[...]

  • Seite 56

    As a REXX instruction, the flowchart example looks like: IF expression THEN instruction ELSE instruction Y ou can also arrange the clauses in one of the following ways to enhance readability: IF expression THEN instruction ELSE instruction or IF expression THEN instruction ELSE instruction When you put the entire instruction on one line, you must u[...]

  • Seite 57

    Looking at the program you might assume the ELSE belongs to the first IF . However , the language processor associates an ELSE with the nearest unpaired IF . The outcome is as follows: What a lovely day! We should take our raincoats! /******************************** REXX *******************************/ /* This program demonstrates what can happen[...]

  • Seite 58

    Exercise - Using the IF ...THEN...ELSE Instruction Write the REXX instructions for the following flowchart: ANSWER I Fa=0 THEN I Fc=2 THEN z=1 ELSE NOP ELSE I Fz=2 THEN I Fc=3 THEN a=1 ELSE a=3 ELSE NOP A=0 A=3 A=1 Z=1 Z=2 C=3 C=2 Tr u e F alse Tr u e F alse Tr u e F alse Tr u e F alse Control Flow within a Program 36 CICS TS for VSE/ESA: REXX Guid[...]

  • Seite 59

    SELECT WHEN...OTHER WISE...END Instruction T o select one of any number of choices, use the SELECT WHEN...OTHERWISE...END instruction. In a flowchart it appears as follows: F alse F alse THEN WHEN WHEN WHEN O THER WISE END Tr u e instruction THEN Tr u e instruction THEN Tr u e instruction instruction(s) SELECT e xpression e xpression e xpression As[...]

  • Seite 60

    Each SELECT must end with an END. Indenting each WHEN makes a program easier to read. Exercises - Using SELECT WHEN...OTHERWISE...END "Thirty days hath September , April, June, and November; all the rest have thirty-one, save February alone ..." Write a program that uses the input of a number from 1 to 12, representing the month, and prod[...]

  • Seite 61

    Using Looping Instructions There are two types of looping instructions, repetitive loops and conditional loops . Repetitive loops let you repeat instructions a certain number of times. Conditional loops use a condition to control repeating. All loops, regardless of the type, begin with the DO keyword and end with the END keyword. Repetitive Loops T[...]

  • Seite 62

    DO numbe r=1T O5 SAY 'Loop' number SAY 'Hello!' END SAY 'Dropped out of the loop when number reached' number This example results in five lines of Hello! preceded by the number of the loop. The number increases at the bottom of the loop and is tested at the top. Loop 1 Hello! Loop 2 Hello! Loop 3 Hello! Loop 4 Hello! L[...]

  • Seite 63

    This example sends strings to a user-written function for processing and then issues a message that the processing completed successfully or failed. When the input string is a blank, the loop ends and so does the program. Y ou can also end the loop without ending the program by using the LEA VE instruction. The following topic describes this. LEA V[...]

  • Seite 64

    Number 1 Number 2 Number 3 Number 4 Number 5 Number 6 Number 7 Number 9 Number 10 Exercises - Using Loops 1. What are the results of the following loops? a. DO digi t=1T O3 SAY digit END SAY 'Digit is now' digit b. DO count = 10 BY -2 TO 6 SAY count END SAY 'Count is now' count c. DO index = 10 TO 8 SAY 'Hup! Hup! Hup!&apos[...]

  • Seite 65

    DO WHILE Loops DO WHILE loops in a flowchart appear as follows: DO WHILE Tr u e instruction(s) e xpression F alse END As REXX instructions, the flowchart example looks like: DO WHILE expression /* expression must be true */ instruction(s) END Use a DO WHILE loop when you want to execute the loop while a condition is true. DO WHILE tests the conditi[...]

  • Seite 66

    DO UNTIL Loops DO UNTIL loops in a flowchart appear as follows: F alse DO UNTIL Tr u e instruction(s) e xpression END As REXX instructions, the flowchart example looks like: DO UNTIL expression /* expression must be false */ instruction(s) END Use DO UNTIL loops when a condition is not true and you want to execute the loop until the condition is tr[...]

  • Seite 67

    Exercise - Using a DO UNTIL Loop Change the program in the previous exercise on page “Exercise - Using a DO WHILE Loop” on page 43 from a DO WHILE to a DO UNTIL loop and achieve the same results. Remember that DO WHILE loops check for true expressions and DO UNTIL loops check for false expressions, which means their logical operators are often [...]

  • Seite 68

    ANSWER Combining T ypes of Loops Y ou can combine repetitive and conditional loops to create a compound loop. The following loop is set to repeat 10 times while the quantity is less than 50, at which point it stops. quantity = 20 DO numbe r=1T O1 0 WHILE quantity < 50 quantity = quantity + number SAY 'Quantity = 'quantity ' (Loop [...]

  • Seite 69

    DO oute r=1T O2 DO inne r=1T O2 SAY 'HIP' END SAY 'HURRAH' END The output from this example is: HIP HIP HURRAH HIP HIP HURRAH If you need to leave a loop when a certain condition arises, use the LEA VE instruction followed by the name of the control variable of the loop. If the LEA VE instruction is for the inner loop, processin[...]

  • Seite 70

    Outer 1 Inner 1 Outer 1 Inner 2 Outer 1 Inner 3 Outer 2 Inner 1 Outer 2 Inner 2 Outer 2 Inner 3 Outer 3 Inner 1 Outer 3 Inner 2 Outer 3 Inner 3 2. The result is one line of output for each of the inner loops. Outer 1 Inner 1 Outer 2 Inner 1 Outer 3 Inner 1 Using Interrupt Instructions Instructions that interrupt the flow of a program can cause the [...]

  • Seite 71

    CALL and RETURN Instructions The CALL instruction interrupts the flow of a program by passing control to an internal or external subroutine. An internal subroutine is part of the calling program. An external subroutine is another program. The RETURN instruction returns control from a subroutine back to the calling program and optionally returns a v[...]

  • Seite 72

    SIGNAL Instruction The SIGNAL instruction, like CALL, interrupts the usual flow of a program and causes control to pass to a specified label. The label to which control passes can be before or after the SIGNAL instruction. Unlike CALL, SIGNAL does not return to a specific instruction to resume execution. When you use SIGNAL from within a loop, the [...]

  • Seite 73

    Chapter 5. Using Functions This chapter defines what a function is and describes how to use the built-in functions. What is a Function? A function is a sequence of instructions that can receive data, process it, and return a value. In REXX, there are several kinds of functions: v Built-in functions are built into the language processor . More about[...]

  • Seite 74

    Rather than writing multiple instructions every time you want to find the maximum of a group of three numbers, you can use a built-in function that does the calculation for you and returns the maximum number . The function is called MAX, and you can use it as follows: MAX(number1,number2,number3,....) T o find the maximum of 45, -2, number , and 19[...]

  • Seite 75

    Arithmetic Functions Function Description ABS Returns the absolute value of the input number . DIGITS Returns the current setting of NUMERIC DIGITS. FORM Returns the current setting of NUMERIC FORM. FUZZ Returns the current setting of NUMERIC FUZZ. MAX Returns the largest number from the list specified, formatted according to the current NUMERIC se[...]

  • Seite 76

    Formatting Functions Function Description CENTER or CENTRE Returns a string of a specified length with the input string centered in it, with pad characters added as necessary to make up the length. COPIES Returns the specified number of concatenated copies of the input string. FORMA T Returns the input number , rounded and formatted. JUSTIFY 1 Retu[...]

  • Seite 77

    Function Description WORDPOS Returns the word number of the first word of a specified phrase in the input string. WORDS Returns the number of words in the input string. Miscellaneous Functions Function Description ADDRESS Returns the name of the environment to which commands are currently being sent. ARG Returns an argument string or information ab[...]

  • Seite 78

    Other useful built-in functions to test input are WORDS, VERIFY , LENGTH, and SIGN. Exercise - Writing a program with Built-In Functions Write a program that checks a file name for a length of 8 characters. If the name is longer than 8 characters, the program truncates it to 8 and sends a message indicating the shortened name. Use the built-in func[...]

  • Seite 79

    Chapter 6. Writing Subroutines and Functions This chapter shows how to write subroutines and functions and discusses their differences and similarities. What are Subroutines and Functions? Subroutines and functions are routines made up of a sequence of instructions that can receive data, process it, and return a value. The routines can be: Internal[...]

  • Seite 80

    CALL SUBSTR 'verylongword', 1, 8 a = RESULT /* a is set to 'verylong' */ When deciding whether to write a subroutine or a function, ask yourself the following questions: v Is a returned value optional? If so, write a subroutine. v Do I need a value returned as an expression within an instruction? If so, write a function. The res[...]

  • Seite 81

    instruction(s) EXIT instruction(s) instruction(s) RETURN z=func1(arg1, arg2) Both subroutines and functions can be internal (designated by a label) or external (designated by the subroutine or function in the REXX File System/VSE Librarian sublibrary member name). The two preceding examples illustrate an internal subroutine named sub1 and an intern[...]

  • Seite 82

    FUNC2 ARG v ar1 instruction(s) RETURN v alue MAIN instruction(s) z=func2(arg1) instruction(s) … … … e xit When to Use Internal V ersus External Subroutines or Functions T o determine whether to make a subroutine or function internal or external, you might consider factors, such as: v Size of the subroutine or function. V ery large subroutines[...]

  • Seite 83

    The next example is the same, except it passes information to a function rather than a subroutine. The subroutine includes the variable answer on the RETURN instruction. The language processor replaces the function call with the value in answer . Using the same variables in a program and its internal subroutine or function can sometimes create prob[...]

  • Seite 84

    The next example is the same, except it passes information using a function instead of a subroutine. T o avoid this kind of problem in an internal subroutine or function, you can use: v The PROCEDURE instruction, as the next topic describes. v Different variable names in a subroutine or function than in the main part of the program. For a subroutin[...]

  • Seite 85

    The following examples show how results differ when a subroutine or function uses or does not use PROCEDURE. The next two examples are the same, except they use functions rather than subroutines. /******************************* REXX ********************************/ /* This program uses a PROCEDURE instruction to protect the */ /* variables within[...]

  • Seite 86

    Exposing V ariables with PROCEDURE EXPOSE: T o protect all but specific variables, use the EXPOSE option with the PROCEDURE instruction, followed by the variables that are to remain exposed to the subroutine or function. The next example uses PROCEDURE EXPOSE in a subroutine. The next example is the same except PROCEDURE EXPOSE is in a function ins[...]

  • Seite 87

    In a function call, you can pass up to 20 arguments separated by commas. function(argument1,argument2,argument3,...) Using the ARG Instruction: A subroutine or function can receive the arguments with the ARG instruction. In the ARG instruction, commas also separate arguments. ARG arg1, arg2, arg3, ... The names of the arguments that are passed do n[...]

  • Seite 88

    In the two preceding examples, notice the positional relationships between long and length , and wide and width . Also notice how information is received from variable perim . Both programs include perim on a RETURN instruction. For the program with a subroutine, the language processor assigns the value in perim to the special variable RESUL T . Fo[...]

  • Seite 89

    Exercise - Writing an Internal and an External Subroutine Write a program that plays a simulated coin toss game and produces the accumulated scores. There should be four possible inputs: v 'HEADS' v 'T AILS' v '' (Null—to quit the game) v None of these three (incorrect response). Write an internal subroutine without [...]

  • Seite 90

    Exercise - Writing a Function Write a function named A VG that receives a list of numbers separated by blanks and computes their average. The final answer can be a decimal number . T o call this function, you would use: AVG(number1 number2 number3...) Use the WORDS (see section “WORDS” on page 198) and WORD (see section “WORD” on page 197) [...]

  • Seite 91

    /******************************* REXX ********************************/ /* This function receives a list of numbers, adds them, computes */ /* their average, and returns the average to the calling program. */ /*********************************************************************/ ARG numlist /* receive the numbers in a single variable */ sum = 0 /*[...]

  • Seite 92

    Subroutines and Functions—Similarities and Differences The following tables highlight similarities and differences between subroutines and functions: Similarities between Subroutines and Functions Can be internal or external. Internal – Can pass information by using common variables – Can protect variables with the PROCEDURE instruction – C[...]

  • Seite 93

    Chapter 7. Manipulating Data This chapter describes how to use compound variables and stems and explains parsing. Using Compound V ariables and Stems Sometimes it is useful to store groups of related data in a way that makes data retrieval easy . For example, you could store a list of employee names in an array and retrieve them by number . An arra[...]

  • Seite 94

    D Oi=1T O6 PARSE PULL employee.i END If you use the same names used in the example of the employee array , you have a group of compound variables as follows: employee.1 = 'Adams, Joe' employee.2 = 'Crandall, Amy' employee.3 = 'Devon, David' employee.4 = 'Garrison, Donna' employee.5 = 'Leone, Mary' e[...]

  • Seite 95

    h. SA Y a.first i. SA Y z.a.4 2. After these assignment instructions, what output do the SA Y instructions produce? hole.1 = 'full' hole. = 'empty' hole.s = 'full' a. SA Y hole.1 b. SA Y hole.s c. SA Y hole.mouse ANSWERS 1. a. 3 b. 4 c. last d. A.3 e. 2 f. D.last g. C.3 h. A.FIRST i. cv3d 2. a. empty b. full c. empty P[...]

  • Seite 96

    /* This REXX program parses the string: "Knowledge is power." */ PARSE PULL word1 word2 word3 /* word1 contains 'Knowledge' */ /* word2 contains 'is' */ /* word3 contains 'power.' */ Y ou can include the optional keyword UPPER on any variant of the P ARSE instruction.This causes the language processor to uppe[...]

  • Seite 97

    quote = 'Knowledge is power.' PARSE VAR quote word1 word2 word3 /* word1 contains 'Knowledge' */ /* word2 contains 'is' */ /* word3 contains 'power.' */ P ARSE V AR does not uppercase character information before assigning it into variables. If you want uppercase translation, use P ARSE UPPER V AR. More about[...]

  • Seite 98

    String If you use a string in a template, parsing checks the input data for a matching string. When assigning data into variables, parsing generally skips over the part of the input string that matches the string in the template. phrase = 'To be, or not to be?' /* phrase containing comma */ PARSE VAR phrase part1 ',' part2 /* te[...]

  • Seite 99

    /* part1 contains 'Igno' */ /* part2 contains 'rance' */ /* part3 contains ' is bliss.' */ /* part4 contains 'Ignorance is bliss.' */ When each variable in a template has column numbers both before and after it, the two numbers indicate the beginning and the end of the data for the variable. quote = 'Ign[...]

  • Seite 100

    (Without + , − ,o r = before the left parenthesis, the language processor would consider the variable to be a string pattern.) The following example uses the variable numeric pattern movex . quote = 'Ignorance is bliss.' ....+....1....+....2 movex = 3 /* variable position */ PARSE VAR quote part5 +10 part6 +3 part7 -(movex) part8 /* par[...]

  • Seite 101

    c) word3 = 4. PARSE VALUE 'Experience is the best teacher.' WITH v1 5 v2 ....+....1....+....2....+....3. a) v1 = b) v2 = 5. quote = 'Experience is the best teacher.' ....+....1....+....2....+....3. PARSE VAR quote v1 v2 15 v3 3 v4 a) v1 = b) v2 = c) v3 = d) v4 = 6. quote = 'Experience is the best teacher.' ....+....1..[...]

  • Seite 102

    f) word6 = '' 3. a) word1 = Experience b) word2 = is c) word3 = teacher . 4. a) v1 = Expe b) v2 = rience is the best teacher . 5. a) v1 = Experience b) v2 = is (Note that v2 contains 'is ' .) c) v3 = the best teacher . d) v4 = perience is the best teacher . 6. a) v1 = THE BEST TEACHER b) v2 = IS c) v3 = EXPERIENCE 7. a) v1 = &ap[...]

  • Seite 103

    Chapter 8. Using Commands from a program This chapter describes how to use commands in a REXX program. T ypes of Commands A REXX program can issue several types of commands. The main categories of commands are: REXX/CICS commands These commands provide access to miscellaneous REXX/CICS facilities. See Chapter 25, “REXX/CICS Commands,” on page 3[...]

  • Seite 104

    Calling Another REXX Program as a Command Previously , this book discussed how to call another program as an external routine (Chapter 6, “Writing Subroutines and Functions,” on page 57). Y ou can also call a program from another program explicitly with the EXEC command. Like an external routine, a program called explicitly or implicitly can re[...]

  • Seite 105

    RFS This is an optional environment that executes commands for the REXX File System. RLS This is an optional environment that executes commands for the REXX List System. Note: It is recommended that the default environment of REXXCICS be used for all commands (that is, the ADDRESS instruction should not be specified). How Is a Command Passed to the[...]

  • Seite 106

    84 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 107

    Chapter 9. Diagnosing Problems within a program This chapter describes how to trace command output and other debugging techniques. Debugging Programs When you encounter an error in a program, there are several ways to locate the error . v The TRACE instruction shows how the language processor evaluates each operation. For information about using th[...]

  • Seite 108

    SIGL The language processor sets the SIGL special variable in connection with a transfer of control within a program because of a function, a SIGNAL or a CALL instruction. When the language processor transfers control to another routine or another part of the program, it sets the SIGL special variable to the line number from which the transfer occu[...]

  • Seite 109

    instruction2 END ELSE instructionA If the command ends with a nonzero return code, the ELSE path is taken. T o force taking the first path, the input during interactive debug could be: R C=0 Ending Interactive Debug Y ou can end interactive debug in one of the following ways: v Use the TRACE OFF instruction as input. The TRACE OFF instruction ends [...]

  • Seite 110

    88 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 111

    Chapter 10. Programming Style and T echniques The method you use for constructing your programs is just as important as the language you use to write them. Consider the Data When you are faced with the task of writing a program, the first thing to consider is the data you are required to process. Make a list of the input data—what are the items a[...]

  • Seite 112

    Answer: Happy Hour Here is a chance to have some fun. This is a very simple arcade game. T ype it in and play it with your friends. Later in this chapter , you may want to improve it. /* CON EXEC */ /* Tossing a coin. The machine is lucky, not the user */ do forever say "Let's play a game! Type 'Heads', 'Tails'", [...]

  • Seite 113

    /* CATMOUSE EXEC */ /* The user says where the mouse is to go. But where */ /* will the cat jump? */ say "This is the mouse ----------> @" say "These are the cat's paws ---> ( )" say "This is the mousehole ------> O" say "This is a wall -------------> |" say say "You are the mouse. You w[...]

  • Seite 114

    Good job! Now , take a while to put your new skills into action, or continue reading. Designing a Program Still thinking about method , which is just as important as language , let us take another look at CA TMOUSE EXEC. The program is about a cat and a mouse and their positions in a corridor . At some stage their positions will have to be pictured[...]

  • Seite 115

    Do forever call Display Mouse's move Cat's move end Conclusion Methods for Designing Loops The method for designing loops is to ask two questions: v Will it always end? v Whenever it terminates, will the data meet the conditions required? Well, the loop terminates (and the game ends) when: 1. The mouse runs to the hole. 2. The mouse runs [...]

  • Seite 116

    What Do W e Have So Far? Putting all this together , we have: The method that we have just discussed is sometimes called stepwise refinement . Y ou start with a specification (which may be incomplete). Then you divide the proposed program into routines, such that each routine will be easier to code than the program as a whole. Then you repeat the p[...]

  • Seite 117

    At this stage, look at the specification again. A sailor might need to put on the pullover in the dark, quickly , without worrying about the front or back. Therefore, the front should be the same as the back; and the two sleeves should also be the same. This could be programmed: do 2 CALL Knit_body_panel end do 2 CALL Knit_sleeve end CALL sew_piece[...]

  • Seite 118

    This gives the trace: rotate 6 *-* wheel: 8 *-* cog: 10 *-* true: 8 *-* cog: 10 *-* true: 8 *-* cog: 10 *-* true: 6 *-* wheel: 8 *-* cog: 13 *-* false: 8 *-* cog: 13 *-* false: 8 *-* cog: 13 *-* false: 17 *-* done: v T o see how the language processor is computing expressions, use TRACE Intermediates. v T o find out whether you are passing the righ[...]

  • Seite 119

    This next example is easier to read. It is divided into segments, each with its own heading. The comments on the right are sometimes called remarks . They can help the reader get a general idea of what is going on. /********************************************************/ /* SAMPLE #1: A portion of CATMOUSE EXEC */ /* not divided into segments and[...]

  • Seite 120

    This next example has additional features that are popular with some programmers. Keywords written in uppercase and a different indentation style highlight the structure of the code; the abundant comments recall the detail of the specification. /********************************************************/ /* SAMPLE #2: A portion of CATMOUSE EXEC */ /*[...]

  • Seite 121

    Congratulations! Now you know the best ways to program your REXX execs. Have fun writing programs that will make your life easier! /********************************************************/ /* SAMPLE #3: A portion of CATMOUSE EXEC */ /* divided into segments and written with 'more' */ /* indentation and 'more' comments. */ /* No[...]

  • Seite 122

    100 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 123

    Part 2. Reference © Copyright IBM Corp. 1992, 2009 101[...]

  • Seite 124

    102 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 125

    Chapter 1 1. Introduction This introductory section: v Identifies the reference's purpose and audience v Explains how to use the reference v Gives an overview of product features v Explains how to read a syntax diagram. Who Should Read This Reference This reference describes the CICS T ransaction Server for VSE/ESA REXX Guide and Reference Int[...]

  • Seite 126

    Overview of Product Features The following list is the product features of REXX/CICS described in this section. v SAA Level 2 REXX Language Support Under REXX/CICS v Support for the Interpretive Execution of REXX Execs v CICS-Based T ext Editor for REXX Execs and Data v VSAM-Based File System for REXX Execs and Data v Dynamic Support for EXEC CICS [...]

  • Seite 127

    Dynamic Support for EXEC CICS Commands Support for most EXEC CICS API commands is included in REXX/CICS. This is a dynamic interface (no EXEC CICS command translation pre-processing step is needed). This support is provided through the addition of an ADDRESS CICS command environment. REXX Interface to CEDA and CEMT T ransaction Programs This allows[...]

  • Seite 128

    SQL Interface REXX programs may contain SQL statements. These statements are interpreted and executed dynamically . The results of the SQL statements are placed into REXX variables for use within the REXX program. Programming Considerations T o embed SQL statements withn a REXX exec, the host command environment must be changed, The ADDRESS instruc[...]

  • Seite 129

    v Required items appear on the horizontal line (the main path).  STATEMENT required_item  v Optional items appear below the main path.  STATEMENT optional_item  v If you can choose from two or more items, they appear vertically , in a stack. If you must choose one of the items, one item of the stack appears on the main path.[...]

  • Seite 130

    Introduction 108 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 131

    Chapter 12. REXX General Concepts The REstructured eXtended eXecutor (REXX) language is particularly suitable for: v Command procedures v Application front ends v User-defined macros (such as editor subcommands) v User-defined XEDIT subcommands v Prototyping v Personal computing. REXX is a general purpose programming language like PL/I. REXX has th[...]

  • Seite 132

    v Zero or more blanks (which are ignored) v A sequence of tokens (see section “T okens” on page 1 1 1) v Zero or more blanks (again ignored) v A semicolon (;) delimiter that may be implied by line-end, certain keywords, or the colon (:). Conceptually , each clause is scanned from left to right before processing, and the tokens composing it are [...]

  • Seite 133

    Y ou can avoid this type of problem by using concatenation for literal strings containing /* or */ ; line 2 would be: if substr(input,1,5) = '/' || '*123' Y ou could comment out lines 2 and 3 correctly as follows: 01 parse pull input 02 /* if substr(input,1,5) = '/' || '*123' 03 then call process 04 */ dept =[...]

  • Seite 134

    Note: A hexadecimal string is not a representation of a number . Rather , it is an escape mechanism that lets a user describe a character in terms of its encoding (and, therefore, is machine-dependent). In EBCDIC, '40'X is the encoding for a blank. In every case, a string of the form '.....'x is simply an alternative to a straig[...]

  • Seite 135

    If a symbol does not begin with a digit or a period, you can use it as a variable and can assign it a value. If you have not assigned it a value, its value is the characters of the symbol itself, translated to uppercase (that is, lowercase a – z to uppercase A – Z ). Symbols that begin with a number or a period are constant symbols and cannot b[...]

  • Seite 136

    345>=123 345 >=123 345 >= 123 345 > = 123 Some of these characters may not be available in all character sets, and, if this is the case, appropriate translations may be used. In particular , the vertical bar (|) or character is often shown as a split vertical bar . Throughout the language, the not character , ¬ , is synonymous with the[...]

  • Seite 137

    Continuations One way to continue a clause onto the next line is to use the comma, which is referred to as the continuation character . The comma is functionally replaced by a blank, and, thus, no semicolon is implied. One or more comments can follow the continuation character before the end of the line. The continuation character cannot be used in[...]

  • Seite 138

    blanks and comments. In addition, one or more blanks, where they occur in expressions but are not adjacent to another operator , also act as an operator . There are four types of operators: v Concatenation v Arithmetic v Comparison v Logical String Concatenation The concatenation operators combine two strings to form one string by appending the sec[...]

  • Seite 139

    Prefix − Same as the subtraction: 0 - number Prefix + Same as the addition: 0 + number . See Chapter 16, “Numbers and Arithmetic,” on page 217 for details about precision, the format of valid numbers, and the operation rules for arithmetic. Note that if an arithmetic result is shown in exponential notation, it is likely that rounding has occu[...]

  • Seite 140

    >>= Strictly greater than or equal to <<, ¬ << Strictly NOT less than <<= Strictly less than or equal to >>, ¬ >> Strictly NOT greater than Note: Throughout the language, the not character , ¬ , is synonymous with the backslash ( ). Y ou can use the two characters interchangeably , according to availabilit[...]

  • Seite 141

    =>< (comparison operators) == >> << = ¬ = >< <> > ¬ > < ¬ < == ¬ == >> ¬ >> << ¬ << >= >>= <= <<= /= /== & (and) |& & (or , exclusive or) Examples : Suppose the symbol A is a variable whose value is 3 , DAY is a variable whose value is Monday[...]

  • Seite 142

    Clauses and Instructions Clauses can be subdivided into the following types: Null Clauses A clause consisting only of blanks or comments or both is a null clause . It is completely ignored (except that if it includes a comment it is traced, if appropriate). Note: A null clause is not an instruction; for example, putting an extra semicolon after the[...]

  • Seite 143

    Assignments and Symbols A variable is an object whose value can change during the running of a REXX program. The process of changing the value of a variable is called assigning a new value to it. The value of a variable is a single character string, of any length, that may contain any characters. Y ou can assign a new value to a variable with the A[...]

  • Seite 144

    Simple Symbols A simple symbol does not contain any periods and does not start with a digit ( 0 – 9 ). By default, its value is the characters of the symbol (that is, translated to uppercase). If the symbol has been assigned a value, it names a variable and its value is the value of that variable. These are simple symbols: FRED Whatagoodidea? /* [...]

  • Seite 145

    where d0 is the uppercase form of the symbol s0 , and v1 to vn are the values of the constant or simple symbols s1 through sn . Any of the symbols s1 - sn can be null. The values v1 - vn can also be null and can contain any characters (in particular , lowercase characters are not translated to uppercase, blanks are not removed, and periods have no [...]

  • Seite 146

    pull amount name if datatype(amount)='CHAR' then leave total.name = total.name + amount end Note: Y ou can always obtain the value that has been assigned to the whole collection of variables by using the stem. However , this is not the same as using a compound variable whose derived name is the same as the stem. For example: total. = 0 nu[...]

  • Seite 147

    The expression is evaluated, resulting in a character string (which may be the null string), which is then prepared as appropriate and submitted to the underlying system. Any part of the expression not to be evaluated should be enclosed in quotation marks. The environment then processes the command, which may have side-effects. It eventually return[...]

  • Seite 148

    argument to the exec. For example: EDIT TEST .EXEC causes the REXX/CICS editor exec, CICEDIT , to start and TEST .EXEC, the argument, names the file to edit or create. All REXX/CICS transaction identifiers must have CICS definitions which associate them with the REXX/CICS main module, CICREXD. v Execs started using a CICS ST ART command REXX/CICS e[...]

  • Seite 149

    REXX File System Execs can be stored as members in the VSAM-based REXX File System (RFS), provided with REXX/CICS, or in VSE librarian members with a member type of PROC. Note: If the file identifier you specified for invoking an exec does not include a file type extension, then only RFS file identifiers with a file type of EXEC are searched when y[...]

  • Seite 150

    v The USERID function return sa1t o8 character CICS user ID if the user is signed on. If the CICS user has not signed on and a default user has been specified for the CICS region (by the CICS Systems Programmer specifying DFL TUSER in the CICS startup parameters) then that value is used. Note: The default user shares REXX File System and REXX List [...]

  • Seite 151

    Pseudo-conversational T ransaction Support CICS pseudo-conversational support for REXX execs is supported though the use of the CICS RETURN TRANSID() command, by the REXX/CICS PSEUDO command (see section “PSEUDO” on page 362), and the SETSYS PSEUDO command (see section “SETSYS” on page 371). Interfaces to Other Programming Languages REXX/CI[...]

  • Seite 152

    REXX General Concepts 130 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 153

    Chapter 13. Keyword Instructions A keyword instruction is one or more clauses, the first of which starts with a keyword that identifies the instruction. Some keyword instructions affect the flow of control, while others provide services to the programmer . Some keyword instructions, like DO, can include nested instructions. In the syntax diagrams o[...]

  • Seite 154

    ADDRESS Purpose  ADDRESS environment expression expression1 VALUE ;  ADDRESS temporarily or permanently changes the destination of commands. Commands are strings sent to an external environment. Y ou can send commands by specifying clauses consisting of only an expression or by using the ADDRESS instruction. The concept of alternative s[...]

  • Seite 155

    The two environment names are automatically saved across internal and external subroutine and function calls. See the CALL instruction (page “Purpose” on page 135) for more details. The address setting is the currently selected environment name. Y ou can retrieve the current address setting by using the ADDRESS built-in function (see page 175).[...]

  • Seite 156

    ARG Purpose  ARG template_list ;  ARG retrieves the argument strings provided to a program or internal routine and assigns them to variables. It is a short form of the instruction:  PARSE UPPER ARG template_list ;  The template_list is often a single template but can be several templates separated by commas. If specified, ea[...]

  • Seite 157

    CALL Purpose  CALL  , name expression OFF ERROR FAILURE HALT ON ERROR FAILURE NAME trapname HALT ;  CALL calls a routine (if you specify name ) or controls the trapping of certain conditions (if you specify ON or OFF). T o control trapping, you specify OFF or ON and the condition you want to trap. OFF turns off the specified conditio[...]

  • Seite 158

    The CALL then causes a branch to the routine called name , using exactly the same mechanism as function calls, see Chapter 14, “Functions,” on page 171. The search order is in the section on functions but briefly is as follows: Internal routines: These are sequences of instructions inside the same program, starting at the label that matches nam[...]

  • Seite 159

    v The status of DO loops and other structures : Executing a SIGNAL while within a subroutine is safe because DO loops, and so forth, that were active when the subroutine was called are not ended. (But those currently active within the subroutine are ended.) v T race action : After a subroutine is debugged, you can insert a TRACE Off at the beginnin[...]

  • Seite 160

    DO Purpose DO groups instructions together and optionally processes them repetitively . During repetitive execution, a control variable ( name ) can be stepped through some range of values. Syntax Notes: v The exprr , expri , exprb , exprt , and exprf options (if present) are any expressions that evaluate to a number . The exprr and exprf options a[...]

  • Seite 161

    Repetitive DO Loops If a DO instruction has a repetitor phrase or a conditional phrase or both, the group of instructions forms a repetitive DO loop . The instructions are processed according to the repetitor phrase, optionally modified by the conditional phrase. (See section “Conditional Phrases (WHILE and UNTIL)” on page 140). Simple Repetiti[...]

  • Seite 162

    end /* 1.7 */ /* 2.4 */ /* 3.1 */ /* 3.8 */ The control variable can be altered within the loop, and this may affect the iteration of the loop. Altering the value of the control variable is not usually considered good programming practice, though it may be appropriate in certain circumstances. Note that the end condition is tested at the start of e[...]

  • Seite 163

    Note: Using the LEA VE or ITERA TE instructions can also modify the execution of repetitive loops. Evaluate e xprr + 0 e valuate e xpr i + 0 e xpr t + 0, exprb + 0, e xprf + 0 in order written or and and Assign star t value to control variab le Use T O value (e xpr) to test control variab le for termination Discontinue e xecution of DO group if T O[...]

  • Seite 164

    DROP Purpose  DROP  name ( name ) ;  DROP “unassigns” variables, that is, restores them to their original uninitialized state. If name is not enclosed in parentheses, it identifies a variable you want to drop and must be a symbol that is a valid variable name, separated from any other name by one or more blanks or comments. If pa[...]

  • Seite 165

    EXIT Purpose  EXIT expression ;  EXIT leaves a program unconditionally . Optionally EXIT returns a character string to the caller . The program is stopped immediately , even if an internal routine is currently being run. If no internal routine is active, RETURN (see page “Purpose” on page 161) and EXIT are identical in their ef fect[...]

  • Seite 166

    IF Purpose  IF expression ; THEN instruction ; ELSE instruction ;  IF conditionally processes an instruction or group of instructions depending on the evaluation of the expression . The expression is evaluated and must result in 0 or 1 . The instruction after the THEN is processed only if the result is 1 (true). If you specify an ELSE, [...]

  • Seite 167

    INTERPRET Purpose  INTERPRET expression ;  INTERPRET processes instructions that have been built dynamically by evaluating expression . The expression is evaluated and is then processed (interpreted) just as though the resulting string were a line inserted into the program (and bracketed by a DO; and an END;). Any instructions (includin[...]

  • Seite 168

    >O> "Hello Kitty" >L> "!" >O> "Hello Kitty!" Hello Kitty! Here, lines 3 and 4 set the variables used in line 5. Execution of line 5 then proceeds in two stages. First the string to be interpreted is built up, using a literal string, a variable ( INDIRECT ), and another literal string. The resulting pu[...]

  • Seite 169

    ITERA TE Purpose  ITERATE name ;  ITERA TE alters the flow within a repetitive DO loop (that is, any DO construct other than that with a simple DO). Execution of the group of instructions stops, and control is passed to the DO instruction just as though the END clause had been encountered. The control variable (if any) is incremented an[...]

  • Seite 170

    LEA VE Purpose  LEAVE name ;  LEA VE causes an immediate exit from one or more repetitive DO loops (that is, any DO construct other than a simple DO). Processing of the group of instructions is ended, and control is passed to the instruction following the END clause, just as though the END clause had been encountered and the termination[...]

  • Seite 171

    NOP Purpose  NOP ;  NOP is a dummy instruction that has no ef fect. It can be useful as the target of a THEN or ELSE clause: Example: Select when a=c then nop /* Do nothing */ when a>c then say 'A > C' otherwise say 'A < C' end Note: Putting an extra semicolon instead of the NOP would merely insert a null cl[...]

  • Seite 172

    NUMERIC Purpose  NUMERIC DIGITS expression1 SCIENTIFIC FORM ENGINEERING expression2 VALUE FUZZ expression3 ;  NUMERIC changes the way in which a program carries out arithmetic operations. The options of this instruction are described in detail on pages 217-224, but in summary: NUMERIC DIGITS controls the precision to which arithmetic op[...]

  • Seite 173

    OPTIONS Purpose  OPTIONS expression ;  OPTIONS passes special requests or parameters to the language processor . For example, these may be language processor options or perhaps define a special character set. The expression is evaluated, and the result is examined one word at a time. The language processor converts the words to uppercas[...]

  • Seite 174

    P ARSE Purpose  PARSE UPPER ARG EXTERNAL LINEIN NUMERIC PULL SOURCE VALUE WITH expression VAR name VERSION template_list ;  P ARSE assigns data (from various sources) to one or more variables according to the rules of parsing. (See Chapter 15, “Parsing,” on page 203.) The template_list is often a single template but may be several t[...]

  • Seite 175

    Example : Parse Numeric Var1 After this instruction, Var1 would be equal to: 9 0 SCIENTIFIC. See section “NUMERIC” on page 150 and the built-in functions in section “DIGITS” on page 183, and section “FORM” on page 185, and section “FUZZ” on page 186. P ARSE PULL parses the next string from the external data queue. If the external da[...]

  • Seite 176

    P ARSE VERSION parses information describing the language level and the date of the language processor . This information consists of five words delimited by blanks: 1. The string REXX370 , signifying the 370 implementation. 2. The language level description (for example, 3.48 ). 3. The language processor release date (for example, 05 April 2000 ).[...]

  • Seite 177

    PROCEDURE Purpose  PROCEDURE  EXPOSE name ( name ) ;  PROCEDURE, within an internal routine (subroutine or function), protects variables by making them unknown to the instructions that follow it. After a RETURN instruction is processed, the original variables environment is restored and any variables used in the routine (that were no[...]

  • Seite 178

    Example: /* This is the main REXX program */ j=1; z.1='a' call toft s a yjkm / * Displays "1 7 M" */ exit /* This is a subroutine */ toft: procedure expos ejkz . j say j k z.j /* Displays "1 K a" */ k=7; m=3 /* Note: M is not exposed */ return Note that if Z.J in the EXPOSE list had been placed before J , the caller&ap[...]

  • Seite 179

    Example: /* This is the main REXX program */ a.=11; i=13; j=15 i=i+1 C.5 = 'FRED' call lucky7 s a ya .a . 1ijc .c . 5 say 'You should see 11 7 14 15 C. FRED' exit lucky7:Procedure Expos eija .c . /* This exposes I, J, and all variables whose */ /* names start with A. or C. */ A.1='7' /* This sets A.1 in the caller&apos[...]

  • Seite 180

    PULL Purpose  PULL template_list ;  PULL reads a string from the program stack. If the program stack is empty , PULL then tries reading a line from the current terminal input device. It is just a short form of the instruction:  PARSE UPPER PULL template_list ;  The current head-of-queue is read as one string. Without a templ[...]

  • Seite 181

    PUSH Purpose  PUSH expression ;  PUSH stacks the string resulting from the evaluation of expression LIFO (Last In, First Out) onto the external data queue. If you do not specify expression , a null string is stacked. Note: The REXX/CICS implementation of the external data queue is the program stack. The language processor reads a line f[...]

  • Seite 182

    QUEUE Purpose  QUEUE expression ;  QUEUE appends the string resulting from expression to the tail of the external data queue. That is, it is added FIFO (First In, First Out). If you do not specify expression , a null string is queued. Note: The REXX/CICS implementation of the external data queue is the program stack. The language proces[...]

  • Seite 183

    RETURN Purpose  RETURN expression ;  RETURN returns control (and possibly a result) from a REXX program or internal routine to the point of its invocation. If no internal routine (subroutine or function) is active, RETURN and EXIT are identical in their ef fect on the program that is being run, (see page “Purpose” on page 143.) I fa[...]

  • Seite 184

    SA Y Purpose  SAY expression ;  SA Y writes a line to the default output stream (the terminal) so the user sees it displayed. The result of expression may be of any length. If you omit expression , the null string is written. Y ou can use the SET TERMOUT command to redirect SA Y output. Example: data=100 Say data 'divided by 4 =>[...]

  • Seite 185

    SELECT Purpose  SELECT;  WHEN expression THEN instruction ;;  OTHERWISE instruction   ; END ;  SELECT conditionally calls one of several alternative instructions. Each expression after a WHEN is evaluated in turn and must result in 0 or 1 . If the result is 1 , the instruction following the associated THEN (which may be a co[...]

  • Seite 186

    SIGNAL Purpose  SIGNAL labelname expression VALUE OFF ERROR FAILURE HALT NOVALUE SYNTAX ON ERROR FAILURE NAME trapname HALT NOVALUE SYNTAX ;  SIGNAL causes an unusual change in the flow of control (if you specify labelname or V ALUE expression ), or controls the trapping of certain conditions (if you specify ON or OFF). T o control trap[...]

  • Seite 187

    The V ALUE form of the SIGNAL instruction allows a branch to a label whose name is determined at the time of execution. This can safely ef fect a multi-way CALL (or function call) to internal routines because any DO loops, and so forth, in the calling routine are protected against termination by the call mechanism. Example: fred='PETE' ca[...]

  • Seite 188

    TRACE Purpose TRACE controls the tracing action (that is, how much is displayed to the user) during processing of a REXX program. (T racing describes some or all of the clauses in a program, producing descriptions of clauses as they are processed.) TRACE is mainly used for debugging. Its syntax is more concise than that of other REXX instructions b[...]

  • Seite 189

    All T races (that is, displays) all clauses before execution. Commands T races all commands before execution. If the command results in an error or failure 4 ,tracing also displays the return code from the command. Error T races any command resulting in an error or failure 4 after execution, together with the return code from the command. Failure T[...]

  • Seite 190

    Using the ? prefix, therefore, switches you alternately in or out of interactive debug. (Because the language processor ignores any further TRACE statements in your program after you are in interactive debug, use CALL TRACE '?' to turn off interactive debug.) ! Inhibits host command execution. During regular execution, a TRACE instruction[...]

  • Seite 191

    message when interactive debug is entered, an indication of a syntax error when in interactive debug, or the traceback clauses after a syntax error in the program (see below). >>> Identifies the result of an expression (for TRACE R ) or the value assigned to a variable during parsing, or the value returned from a subroutine call. >.>[...]

  • Seite 192

    UPPER Purpose This is a non-SAA instruction provided in REXX/CICS.  UPPER  variable ;  UPPER translates the contents of one or more variables to uppercase. The variables are translated in sequence from left to right. The variable is a symbol, separated from any other variable s by one or more blanks or comments. Specify only simple s[...]

  • Seite 193

    Chapter 14. Functions A function is an internal, built-in, or external routine that returns a single result string. (A subroutine is a function that is an internal, built-in, or external routine that may or may not return a result and that is called with the CALL instruction.) Syntax A function call is a term in an expression that calls a routine t[...]

  • Seite 194

    instruction, various other status information (TRACE and NUMERIC settings and so forth) is saved too. See the CALL instruction (page “Purpose” on page 135) for details about this. Y ou can use SIGNAL and CALL together to call an internal routine whose name is determined at the time of execution; this is known as a multi-way call (see page 165).[...]

  • Seite 195

    Internal routines are not used if the function name is given as a literal string (that is, specified in quotation marks); in this case the function must be built-in or external. This lets you usurp the name of, say , a built-in function to extend its capabilities, yet still be able to call the built-in function when needed. Example: /* This interna[...]

  • Seite 196

    Built-in Functions REXX provides a rich set of built-in functions, including character manipulation, conversion, and information functions. Other built-in and external functions are generally available—see section “External Functions Provided in REXX/CICS” on page 200. The following are general notes on the built-in functions: v The parenthes[...]

  • Seite 197

    ABBREV (Abbreviation)  ABBREV( information , info , length )  returns 1 if info is equal to the leading characters of information and the length of info is not less than length . Returns 0 if either of these conditions is not met. If you specify length , it must be a positive whole number or zero. The default for length is the number of[...]

  • Seite 198

    returns an argument string or information about the argument strings to a program or internal routine. If you do not specify n , the number of arguments passed to the program or internal routine is returned. If you specify only n , the n th argument string is returned. If the argument string does not exist, the null string is returned. The n must b[...]

  • Seite 199

    BITAND('12'x) -> '12'x BITAND('73'x,'27'x) -> '23'x BITAND('13'x,'5555'x) -> '1155'x BITAND('13'x,'5555'x,'74'x) -> '1154'x BITAND('pQrS',,'BF'x) -> 'pqrs' /* EBCDIC */ BIT OR (Bit by B[...]

  • Seite 200

    If binary_string is the null string, B2X returns a null string. If the number of binary digits in binary_string is not a multiple of four , then up to three 0 digits are added on the left before the conversion to make a total that is a multiple of four . Here are some examples: B2X('11000011') -> 'C3' B2X('10111') -[...]

  • Seite 201

    v The instruction processed as a result of the condition trap (CALL or SIGNAL) v The status of the trapped condition. T o select the information to return, use the following option s. (Only the capitalized and highlighted letter is needed; all characters following it are ignored.) Condition name returns the name of the current trapped condition. De[...]

  • Seite 202

    If string is null, returns 0 . Here are some examples: C2D('09'X) -> 9 C2D('81'X) -> 129 C2D('FF81'X) -> 65409 C2D('') -> 0 C2D('a') -> 129 /* EBCDIC */ If you specify n , the string is taken as a signed number expressed in n characters. The number is positive if the leftmost bit is o[...]

  • Seite 203

    Binary returns 1 if string contains only the characters 0 or 1 or both. C returns 1 if string is a mixed SBCS/DBCS string. Dbcs returns 1 if string is a DBCS-only string enclosed by SO and SI bytes. Lowercase returns 1 if string contains only characters from the range a – z . Mixed case returns 1 if string contains only characters from the ranges[...]

  • Seite 204

    base date, 1 January 0001, in the format: dddddd (no leading zeros or blanks). The expression DATE('B')//7 returns a number in the range 0 – 6 that corresponds to the current day of the week, where 0 is Monday and 6 is Sunday . Thus, this function can be used to determine the day of the week independent of the national language in which[...]

  • Seite 205

    DBCS (Double-Byte Character Set Functions) The following are all part of DBCS processing functions. DBADJUST DBRIGHT DBUNBRACKET DBBRACKET DBRLEFT DBV ALIDA TE DBCENTER DBRRIGHT DBWIDTH DBCJUSTIFY DBTODBCS DBLEFT DBTOSBCS DELSTR (Delete String)  DELSTR( string , n , length )  returns string after deleting the substring that begins at th[...]

  • Seite 206

    If you specify n , it is the length of the final result in characters; after conversion, the input string is sign-extended to the required length. If the number is too big to fit into n characters, then the result is truncated on the left. The n must be a positive whole number or zero. If you omit n , wholenumber must be a positive whole number or [...]

  • Seite 207

    returns the REXX error message associated with error number n . The n must be in the range 0 – 99 , and any other value is an error . Returns the null string if n is in the allowed range but is not a defined REXX error number . See Appendix A, “Error Numbers and Messages,” on page 379 for a complete description of error numbers and messages. [...]

  • Seite 208

    The number is first rounded according to standard REXX rules, just as though the operation number+0 had been carried out. The result is precisely that of this operation if you specify only number . If you specify any other options, the number is formatted as follows. The before and after options describe how many characters are used for the integer[...]

  • Seite 209

    INDEX POS is the preferred built-in function for obtaining the position of one string in another . See page 189 for a complete description.  INDEX( haystack , needle , start )  returns the character position of one string, needle , in another , haystack , or returns 0 if the string needle is not found or is a null string. By default the[...]

  • Seite 210

    LASTPOS (Last Position)  LASTPOS( needle , haystack , start )  returns the position of the last occurrence of one string, needle , in another , haystack . (See also the POS function.) Returns 0 if needle is the null string or is not found. By default the search starts at the last character of haystack and scans backward. Y ou can overri[...]

  • Seite 211

     MAX(  , number )  returns the largest number from the list specified, formatted according to the current NUMERIC settings. Here are some examples: MAX(12,6,7,9) -> 12 MAX(17.3,19,17.03) -> 19 MAX(-7,-3,-4.3) -> -3 MAX(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,MAX(20,21)) -> 21 Implementation maximum: Y ou can speci[...]

  • Seite 212

    haystack . By default the search starts at the first character of haystack (that is, the value of start is 1 ). Y ou can override this by specifying start (which must be a positive whole number), the point at which the search starts. Here are some examples: POS('day','Saturday') -> 6 POS('x','abc def ghi')[...]

  • Seite 213

    REVERSE  REVERSE( string )  returns string , swapped end for end. Here are some examples: REVERSE('ABc.') -> '.cBA' REVERSE('XYZ ') -> ' ZYX' RIGHT  RIGHT( string , length , pad )  returns a string of length length containing the rightmost length characters of string . The string[...]

  • Seite 214

    Here are some examples: SPACE('abc def ') -> 'abc def' SPACE(' abc def',3) -> 'abc def' SPACE('abc def ',1) -> 'abc def' SPACE('abc def ',0) -> 'abcdef' SPACE('abc def ',2,'+') -> 'abc++def' ST ORAGE See section “External F[...]

  • Seite 215

    SUBWORD  SUBWORD( string , n , length )  returns the substring of string that starts at the n th word, and is up to length blank-delimited words. The n must be a positive whole number . If you omit length , it defaults to the number of remaining words in string . The returned string never has leading or trailing blanks, but includes all[...]

  • Seite 216

    (described later) was started or reset. The number has no leading zeros or blanks, and the setting of NUMERIC DIGITS does not affect the number . The fractional part always has six digits. Hours returns up to two characters giving the number of hours since midnight in the format: hh (no leading zeros or blanks, except for a result of 0 ). Long retu[...]

  • Seite 217

    TRACE  TRACE( option )  returns trace actions currently in effect and, optionally , alters the setting. If you specify option , it selects the trace setting. It must be one of the valid prefixes ? or ! or one of the alphabetic character options associated with the TRACE instruction (that is, starting with A , C , E , F , I , L , N , O ,[...]

  • Seite 218

    decimal point. If you specify n , it must be a positive whole number or zero. The number is first rounded according to standard REXX rules, just as though the operation number+0 had been carried out. The number is then truncated to n decimal places (or trailing zeros are added if needed to make up the specified length). The result is never in expon[...]

  • Seite 219

    /* REXX EXEC - ASSIGN FIND VALUE OF FRED */ FRED = 7 'RLS VARPUT FRED USERSuserid' X = VALUE(FRED,,RLS) SAY X / *Xn o w=7 * / Notes: 1. If the V ALUE function refers to an uninitialized REXX variable then the default value of the variable is always returned; the NOV ALUE condition is not raised. A reference to RLS variables never raise[...]

  • Seite 220

    WORDINDEX  WORDINDEX( string , n )  returns the position of the first character in the n th blank-delimited word in string or returns 0 if fewer than n words are in string . The n must be a positive whole number . Here are some examples: WORDINDEX('Now is the time',3) -> 8 WORDINDEX('Now is the time',6) -> 0 WO[...]

  • Seite 221

    and end . The default value for start is '00'x , and the default value for end is 'FF'x .I f start is greater than end , the values wrap from 'FF'x to '00'x . If specified, start and end must be single characters. Here are some examples: XRANGE('a','f') -> 'abcdef' XRANGE(&apo[...]

  • Seite 222

     X2D( hexstring , n )  returns the decimal representation of hexstring . The hexstring is a string of hexadecimal characters. If the result cannot be expressed as a whole number , an error results. That is, the result must not have more digits than the current setting of NUMERIC DIGITS. Y ou can optionally include blanks in hexstring (a[...]

  • Seite 223

    If you specify data , after the old value has been retrieved storage starting at address is overwritten with data (the length argument has no effect on this). Note: The STORAGE function can operate on storage above the 16MB line. W arning: The STORAGE function, which allows a REXX user to display and/or modify the virtual storage of the CICS region[...]

  • Seite 224

    Functions 202 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 225

    Chapter 15. Parsing General Description The parsing instructions are ARG, P ARSE, and PULL (see section “ARG” on page 134, section “P ARSE” on page 152, and section “PULL” on page 158). The data to parse is a source string . Parsing splits up the data in a source string and assigns pieces of it into the variables named in a template. A [...]

  • Seite 226

    The P ARSE V AR instruction is similar to P ARSE V ALUE except that the source string to parse is always a variable. In P ARSE V AR, the name of the variable containing the source string follows the keywords PARSE VAR . In the next example, the variable stars contains the source string. The template is star1 star2 star3 . /* PARSE VAR example */ st[...]

  • Seite 227

    /* Alternative to period as placeholder */ stars='Arcturus Betelgeuse Sirius Rigil' parse var stars drop junk brightest rest /* brightest='Sirius' */ A placeholder saves the overhead of unneeded variables. T emplates Containing String Patterns A string pattern matches characters in the source string to indicate where to split it[...]

  • Seite 228

    T emplates Containing Positional (Numeric) Patterns A positional pattern is a number that identifies the character position at which to split data in the source string. The number must be a whole number . An absolute positional pattern is v A number with no plus ( + ) or minus ( - ) sign preceding it or with an equal sign ( = ) preceding it v A var[...]

  • Seite 229

    A relative positional pattern is a number with a plus ( + ) or minus ( - ) sign preceding it. (It can also be a variable within parentheses, with a plus ( + ) or minus ( - ) sign preceding the left parenthesis; for details see section “Parsing with V ariable Patterns” on page 209.) The number specifies the relative character position at which t[...]

  • Seite 230

    │ 2 │ │var1 4 │ │ 1 │ │var2 2│ │ 4 var3 5│ │11 var4 │ │ 2 │ │var1 +2 │ │ ─3 │ │var2 +1│ │+2 var3 +1│ │+6 var4 │ └──┬──┘ └───┬────┘ └──┬───┘ └───┬───┘ └────┬─────┘ └───┬────┘ │││ │ [...]

  • Seite 231

    v 'R E' v 'X ' v 'X ' The variable var1 receives 'R' ; var2 receives 'E' . Both var3 and var4 receive 'X ' (with a blank before the X ) because each is the only variable in its section of the template. (For details on treatment of blanks, see page 204.) Parsing with V ariable Patterns Y ou[...]

  • Seite 232

    Converts alphabetic characters to uppercase before parsing Maintains alphabetic characters in case entered ARG P ARSE UPPER ARG P ARSE ARG P ARSE UPPER EXTERNAL P ARSE EXTERNAL P ARSE UPPER NUMERIC P ARSE NUMERIC PULL P ARSE UPPER PULL P ARSE PULL P ARSE UPPER SOURCE P ARSE SOURCE P ARSE UPPER V ALUE P ARSE V ALUE P ARSE UPPER V AR P ARSE V AR P AR[...]

  • Seite 233

    When total=7 then new='purple' When total=9 then new='orange' When total=10 then new='green' Otherwise new=var1 /* entered duplicates */ END Say new; exit /* Displays: "purple" */ Err: say 'Input error--color is not "red" or "blue" or "yellow"'; exit ARG converts alphab[...]

  • Seite 234

    This instruction consists of the keywords P ARSE ARG and three comma-separated templates. (For an ARG instruction, the source strings to parse come from arguments you specify when you call a program or CALL a subroutine or function.) Each comma is an instruction to the parser to move on to the next string. Example : /* Parsing multiple strings in a[...]

  • Seite 235

    Parsing with DBCS Characters Parsing with DBCS characters generally follows the same rules as parsing with SBCS characters. Literal strings and symbols can contain DBCS characters, but numbers must be in SBCS characters. See “P ARSE” on page 398 for examples of DBCS parsing. Details of Steps in Parsing The three figures that follow are to help [...]

  • Seite 236

    ┌────────────────────────────────────────┐ │ ┌────────────────────────────────┐ │ │START │ │ │Token is first one in template. │ │ │Length=length(source string) │ │ │Match [...]

  • Seite 237

    ┌────────────────────────────────────────────────┐ │ ┌─────────────┐ ┌────────────────────────────────┐ │ │Start: │yes │String start=match [...]

  • Seite 238

    ┌─────────────────────────┐ ┌────────────────────────┐ │Start: Match end <= │no │ │ │ string start? ├───│String end=match start. │ └───────────┬─────────────┘ └[...]

  • Seite 239

    Chapter 16. Numbers and Arithmetic REXX defines the usual arithmetic operations (addition, subtraction, multiplication, and division) in as natural a way as possible. What this really means is that the rules followed are those that are conventionally taught in schools and colleges. During the design of these facilities, however , it was found that [...]

  • Seite 240

    Definition A precise definition of the arithmetic facilities of the REXX language is given here. Numbers A number in REXX is a character string that includes one or more decimal digits, with an optional decimal point. (See section “Exponential Notation” on page 222 for an extension of this definition.) The decimal point may be embedded in the n[...]

  • Seite 241

    an operation, when a number is rounded to the required precision.) The operation is then carried out under up to double that precision, as described under the individual operations that follow . When the operation is completed, the result is rounded if necessary to the precision specified by the NUMERIC DIGITS instruction. Rounding is done in the t[...]

  • Seite 242

    The result is then rounded, counting from the first significant digit of the result, to the current setting of NUMERIC DIGITS. Division For the division: yyy / xxxxx the following steps are taken: First the number yyy is extended with zeros on the right until it is larger than the number xxxxx (with note being taken of the change in the power of te[...]

  • Seite 243

    all bits have now been inspected, the initial calculation is complete; otherwise the accumulator is squared and the next bit is inspected for multiplication. When the initial calculation is complete, the temporary result is divided into 1 if the power was negative. The multiplications and division are done under the arithmetic operation rules, usin[...]

  • Seite 244

    Numeric Comparisons The comparison operators are listed in section “Comparison” on page 1 17. Y ou can use any of these for comparing numeric strings. However , you should not use == , == , ¬== , >> , >> , ¬>> , << , << , and ¬<< for comparing numbers because leading and trailing blanks and leading zero[...]

  • Seite 245

    For both large and small numbers some form of exponential notation is useful, both to make long numbers more readable, and to make execution possible in extreme cases. In addition, exponential notation is used whenever the “simple” form would give misleading information. For example: numeric digits 5 say 54321*54321 would display 2950800000 in [...]

  • Seite 246

    /* after the instruction */ Numeric form scientific 123.45 * 1e11 -> 1.2345E+13 /* after the instruction */ Numeric form engineering 123.45 * 1e11 -> 12.345E+12 Numeric Information T o determine the current settings of the NUMERIC options, use the built-in functions DIGITS, FORM, and FUZZ. These functions return the current settings of NUMERI[...]

  • Seite 247

    Chapter 17. Conditions and Condition T raps A condition is a specified event or state that CALL ON or SIGNAL ON can trap. A condition trap can modify the flow of execution in a REXX program. Condition traps are turned on or off using the ON or OFF subkeywords of the SIGNAL and CALL instructions (see section “CALL” on page 135 and section “SIG[...]

  • Seite 248

    /* The following does not raise NOVALUE. */ signal on novalue a.=0 say a.z say 'NOVALUE is not raised.' exit novalue: say 'NOVALUE is raised.' Y ou can specify this condition only for SIGNAL ON. SYNT AX raised if any language processing error is detected while the program is running. This includes all kinds of processing errors,[...]

  • Seite 249

    Because these conditions (ERROR, F AILURE, and HAL T) can arise during execution of an INTERPRET instruction, execution of the INTERPRET may be interrupted and later resumed if CALL ON was used. As the condition is raised, and before the CALL is made, the condition trap is put into a delayed state. This state persists until the RETURN from the CALL[...]

  • Seite 250

    Condition Information When any condition is trapped and causes a SIGNAL or CALL, this becomes the current trapped condition, and certain condition information associated with it is recorded. Y ou can inspect this information by using the CONDITION built-in function (see page 178). The condition information includes: v The name of the current trappe[...]

  • Seite 251

    code following the SYNT AX label may P ARSE SOURCE to find the source of the data, then call an editor to edit the source file positioned at the line in error . Note that in this case you may have to run the program again before any changes made in the editor can take effect. Alternatively , SIGL can be used to help determine the cause of an error [...]

  • Seite 252

    230 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 253

    Chapter 18. REXX/CICS T ext Editor REXX/CICS provides a general purpose CICS-based text editor , patterned after VM/CMS XEDIT . The editor is provided so that execs and data can be created, updated, and viewed from within the CICS environment. The REXX/CICS editor includes several prefix commands (for example: C, CC, M, MM, B, A, F , P) in common w[...]

  • Seite 254

    Screen Format When you call the editor without a profile, the default screen definition is displayed as shown in the following figure. EDIT ---- POOL1:USERSUSER1TEST ------------------------------- COLUMN 1 73 COMMAND ===> 00000 ***************************** TOP OF DATA ************************ 00001 00002 00003 00004 00005 00006 00007 00008 [...]

  • Seite 255

    line just below it for input. Y ou can also append a number to the end of the prefix command. This acts as a replication factor . If the number “5” is appended to the “I”, five lines are opened for input instead of one. Consecutive Block Commands The following commands work with consecutive blocks of lines and consist of two characters: DD [...]

  • Seite 256

    Example: /* Macro to alter the setting of the REXX/CICS editor */ ADDRESS EDITSVR 'SET NUMBERS OFF' 'SET CURLINE 10' 'SET MSGLINE 2' 'SET CMDLINE TOP' 'SET CASE MIXED IGNORE' This example addresses the editor command environment and alters the editor settings. Example: /* Macro to use the REXX/CICS [...]

  • Seite 257

    Notes: 1I f arguments is not specified, any previously defined arguments are deleted. ARGS stores the default parameters to be passed to the program being edited when invoked with the text editor EXEC command. Operands arguments specifies the parameter string to be passed. If you do not specify arguments , any previously defined arguments are delet[...]

  • Seite 258

    Return Codes 0 Normal return Example 'BOTTOM' This example scrolls to the bottom of the file. CANCEL  CANCEL  CANCEL ends the current edit session without saving the changes. Return Codes 0 Normal return 210 Request failed Example 'CANCEL' This example quits the current editor session unconditionally , without saving[...]

  • Seite 259

    Return Codes 0 Normal request 202 Invalid operand Example 'CASE MIXED RESPECT' This example sets the case to MIXED and the sensitivity to RESPECT . For more information on sensitivity , see the FIND command, section “FIND” on page 242. CHANGE  CHANGE /string1/string2/ ALL  CHANGE changes a string in the file. Operands stri[...]

  • Seite 260

    BOTTOM displays the command line on the bottom line of the screen. Return Codes 0 Normal return 202 Invalid operand Example 'CMDLINE TOP' This example places the command line on the second line of the screen. CTLCHAR  CTLCHAR character OFF ESCAPE PROTECT NOPROTECT OFF  CTLCHAR sets a control character's function. Operands[...]

  • Seite 261

    Operands number specifies the screen line number . Return Codes 0 Normal return 202 Invalid operand Example 'CURLINE 3' This example sets the current display line to screen line 3. Note The current line is displayed at the screen line number specified in this command. However , the current line cannot be displayed on line 1 because line 1[...]

  • Seite 262

    Example 'DOWN 5' This example scrolls forward through the file five lines. EDIT  EDIT NONAME fileid lib.sublib ( mem.type ) LIB ( MACRO macroname  EDIT opens a new edit session. Operands fileid specifies the file ID of the file to be created or edited. lib.sublib(mem.type) specifies a VSE Librarian sublibrary and member to be [...]

  • Seite 263

    3. The default user profile macro that the editor tries to call is CICEPROF . The CICEPROF macro creates an ISPF/PDF like environment. A second profile macro, named CICXPROF , is provided. CICXPROF creates a VM/CMS XEDIT like environment. 4. If a file ID or VSE Librarian sublibrary member name is not specified, an RFS file with the special name, NO[...]

  • Seite 264

    Operands fileid specifies the file ID of the file. If you do not specify fileid , the file is saved as the default file ID. Return Codes 0 Normal return 202 Invalid operand 204 Not authorized 207 Insufficient space in file pool 210 Request failed Example 'FILE' This example saves the current file being edited, using the current file ID sp[...]

  • Seite 265

    2. The search begins at the current line and continues downward until BOTTOM OF DA T A is reached, or a match is made. If BOTTOM OF DA T A is reached without a match, then the current line remains where it was before the FIND was processed, rather than making BOTTOM OF DA T A the current line. FOR W ARD  FORward 1 n *  FORW ARD scrolls [...]

  • Seite 266

     GETLIB lib.sublib ( mem.type )  GETLIB imports a member from a VSE Librarian sublibrary into the current edit session. The file is inserted after the current line. Operands lib.sublib(mem.type) specifies a VSE Librarian sublibrary and member name. Return Codes 0 Normal return 203 File not found 204 Not authorized 210 Request failed Exa[...]

  • Seite 267

    210 Request failed Example 'JOIN' This example joins the line that the cursor is on with the line immediately following it. LEFT  LEFT 1 number  LEFT scrolls left in the file. Operands number specifies the number of characters to scroll. If you do not specify number , the screen scrolls left one character in the file. If you s[...]

  • Seite 268

    Operands prefix specifies any standard prefix (such a C, CC, M, MM, B, A) that is entered during an edit session. Return Codes 0 Normal return 202 Invalid operand Example 'LPREFIX D' This example causes the deletion of the current file line. Note LPREFIX is provided to let you use the prefix commands from within edit macros. MACRO  [...]

  • Seite 269

    Operands number displays the message line on the corresponding screen line. OFF does not display the message line. INFO displays messages in the header line. Return Codes 0 Normal return 202 Invalid operand Example 'MSGLINE 2' This example places the message line on screen line 2. NULLS  NULLS ON OFF  NULLS controls whether th[...]

  • Seite 270

    Return Codes 0 Normal return 202 Invalid operand Example 'NUMBERS ON' This example displays sequential numbers in the prefix area. Note Line number sequencing is not done on the data within the edit session, but are pseudo line numbers associated with the file lines during the edit session only . PFKEY  PFkey (1) number text  [...]

  • Seite 271

    BOTTOM displays the PF key line on the bottom line of the screen. number specifies the screen line number . OFF removes the PF key from the display screen. Return Codes 0 Normal return 202 Invalid operand Example 'PFKLINE BOTTOM' This example places the PF key line on the bottom line of the screen. QQUIT  QQuit  QQUIT ends the[...]

  • Seite 272

    CMDLINE displays the current setting of the command line. For more information see the T ext Editor command, section “CMDLINE” on page 237. COLUMN displays the starting column in the file that is displayed on the screen. DIR displays the directory that is associated with the file. FILEID displays the name of the file being edited. MSGLINE displ[...]

  • Seite 273

    Note When the current file has been changed, the editor does not let you exit until either a save is done or you enter the QQUIT command. RESER VED  REServed line HIGH NOHIGH OFF text  RESERVED reserves a line on the screen for your output. Operands line specifies the line that is reserved and the text is displayed. HIGH is a keyword sp[...]

  • Seite 274

     RIght 1 number  RIGHT scrolls right in the file. Operands number specifies the number of characters to scroll. If you do not specify number , the screen scrolls to the right one character in the file. If you specify 0 for number , the file scrolls to the far right. Return Codes 0 Normal return 202 Invalid operand Example 'RIGHT 20[...]

  • Seite 275

     SORT * num A D 1 fromcol tocol  SORT sorts the lines from the current line on down. Operands * specifies that all the lines from the current line to the end of the file are sorted. num specifies that the lines from the current line for the value of num are sorted. A specifies that the lines are sorted in ascending order . (This is the [...]

  • Seite 276

     STRIP  STRIP strips the trailing blanks of f all file lines. Return Codes 0 Normal return Example 'STRIP' This example strips all trailing blanks of each file line. SYNONYM  SYNONYM syn command  SYNONYM assigns a command action to any other valid command. Operands syn specifies any valid command that executes the [...]

  • Seite 277

    Operands column specifies the last column you want to keep. Return Codes 0 Normal return 202 Invalid operand Example 'TRUNC 72' This example truncates all lines in the file to a length of 72 characters. Note This command is useful when you are working with data sets that have sequence numbers that require removing. The editor does not cur[...]

  • Seite 278

    256 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 279

    Chapter 19. REXX/CICS File System The REXX File System (RFS) is provided for the storage of text files and execs created with the REXX/CICS editor , and by execs using RFS commands and data imported from outside of the REXX File System. RFS was modeled after the Advanced Interactive Executive (AIX) and OS/2 file systems. The concept of directories [...]

  • Seite 280

    Example: POOL1: File Pool Root Directory TEST1.EXEC File USERS Subdirectory USER1 Subdirectory TEST2.EXEC File DOCS Subdirectory TEST3.DOCUMENT File USER2 Subdirectory LETTER.DOCUMENT File PROJECT1 Subdirectory PROD1.EXEC File DATA Subdirectory PROD1.DATA File WORK: File Pool and Root Directory TEST1.DATA File CHARTS Subdirectory CHART1.D[...]

  • Seite 281

    The exec name is fully qualified, using the directory ID of each directory in the search before the search of each respective directory is performed. The fully qualified names are as follows: 'POOL1:USERSUSER1EXECSTEST2.EXEC' 'POOL1:TEST2.EXEC' 'POOL1:USERSUSER1TEST2.EXEC' When the REXX/CICS command EXEC is inv[...]

  • Seite 282

    AUTH authorizes access to RFS directories. Operands dirid specifies a REXX File System directory identifier . This is partially or fully qualified. See the CD command, “CD” on page 321, for more information. PRIV A TE specifies that only the owner of the directory has read/write access to the files. This is the default. PUBLICR specifies that a[...]

  • Seite 283

    Return Codes See the RFS command, section “RFS” on page 363. Example 'CKFILE POOL1:USERSUSER1TEST.EXEC' This example checks for a file called TEST .EXEC in the existing directory POOL1:USERSUSER1. COPY  RFS COPY fileid1 fileid2  COPY copies a file. Operands fileid1 specifies the source file identifier , it may be a fu[...]

  • Seite 284

    DISKR reads records from an RFS file. Operands fileid specifies the file identifier . stem. specifies the name of a stem. (A stem must end in a period.) See section “Stems” on page 123 for more information. The default stem is DA T A.. Return Codes See the RFS command, section “RFS” on page 363. Example 'RFS DISKR POOL1:USERSUSER1TE[...]

  • Seite 285

    GETDIR returns a list of the contents of the current or specified directory into the specified REXX array . Operands stem. specifies the name of a stem. (A stem must end in a period.) See section “Stems” on page 123 for more information. dirid specifies a REXX File System directory level identifier . This is partially or fully qualified. See th[...]

  • Seite 286

    Example 'RFS RDIR POOL1:USERSUSER1DOCS' This example deletes a directory called DOCS in the existing directory POOL1:USERSUSER1. RENAME  RFS RENAME fileid1 fileid2  RENAME renames an RFS file to a new name. Operands fileid1 specifies the source file identifier , it may be a fully or partially qualified directory and file [...]

  • Seite 287

    USER=USER1 - DIRECTORY=USERSUSER1 CMD FILENAME FILETYPE ATTRIBUTES RECORDS SIZE DATE TIME TEST1 EXEC FILE 11 1 1994/03/27 10:30:29 TEST2 EXEC FILE 5 1 1994/03/27 10:31:04 COMMAND ===> F1=HELP F2=REFRESH F3=END F7=UP 18 F8=DOWN 18 F11=EDIT F12=CANCEL Y our user ID is displayed in the upper left hand corner . The current directory is displayed b[...]

  • Seite 288

    CD When you type CD from the command line use the following syntax:  CD dirid  CD changes the current directory . Operands dirid specifies a REXX File System directory level identifier . This is partially or fully qualified. See the CD command, section “CD” on page 321, for more information. Example 'CD TEMP' This example [...]

  • Seite 289

    DELETE When you type DELETE on the FLST command column use the following syntax:  DELETE  DELETE deletes a file. When you type DELETE from the command line use the following syntax:  DELETE fileid  Operands fileid specifies the file ID of the file the command acts on. Example 'DELETE TEST1.EXEC' This example, execu[...]

  • Seite 290

    Operands parameter specifies the parameters passed to the exec as arguments. Example 'EXEC / PARMS' This example, executed on the command column next to TEST3.EXEC, executes exec TEST3.EXEC and passes PARMS as the argument. When you type EXEC from the command line use the following syntax:  EXEC fileid parameter  Operands file[...]

  • Seite 291

    Note See Chapter 19, “REXX/CICS File System,” on page 257 for more information about the REXX File System. MACRO When you type MACRO from the command line use the following syntax:  MACRO fileid  MACRO calls a macro. Operands fileid specifies the file ID of the macro you want to run. If this file ID includes a file type suffix, then[...]

  • Seite 292

    Note If you specify text , the PF key is set with the text. If you do not specify text , the PF key is processed. REFRESH When you type REFRESH on the FLST command column use the following syntax:  REFRESH  REFRESH refreshes the file list. Example 'REFRESH' This example refreshes the file list for the member of the current wor[...]

  • Seite 293

    SORT When you type SORT from the command line use the following syntax:  SORT DT FN FT AT RC SZ  SORT sorts the file list. Operands DT specifies sorting the files by date/time. (This is the default.) FN specifies sorting the files by file name. FT specifies sorting the files by file type. AT specifies sorting the files by attribute. RC [...]

  • Seite 294

    Example 'SYNONYM DISCARD RFS DELETE' This example makes DISCARD equivalent to the RFS command DELETE. UP When you type UP from the command line use the following syntax:  UP n  UP scrolls up one or more lines. Operands n specifies the number of lines to be scrolled up. Example 'UP 5' This example scrolls backward thr[...]

  • Seite 295

    Chapter 20. REXX/CICS List System REXX/CICS provides a facility for maintaining tables or lists of data in virtual storage. This facility is called the REXX List System (RLS). This system provides management of lists of temporary system and user information. The externals for accessing the RLS are the RLS and CLD commands, instead of RFS and CD com[...]

  • Seite 296

    The following example shows RLS directories and lists. Example: Root Directory TEST1.DATA File USERS Subdirectory USER1 Subdirectory TEST2.DATA File DOCS Subdirectory TEST3.DOCUMENT File USER2 Subdirectory LETTER.DOCUMENT File PROJECT1 Subdirectory PROD1.INFO File DATA Subdirectory PROD1.DATA File Root Directory TEST1.DATA File CHARTS Su[...]

  • Seite 297

    RLS commands Under the RLS command environment you issue commands to interface with RLS. If you set the command environment to RLS, you should not specify RLS in front of RLS commands. Example: 'RLS READ USERSUSER1TEST.DATA DATA.' This example reads the contents of the RLS list USERSUSER1TEST .DA T A into the DA T A. REXX compound v[...]

  • Seite 298

     RLS *QUEUE* LPULL varname queid  LPULL pulls a record from the top of the RLS queue. Operands varname specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name. *QUEUE* is a keyword specifying the special default name. queid specifies the identifier for a special type of RLS lis[...]

  • Seite 299

    LQUEUE  RLS *QUEUE* LQUEUE varname queid  LQUEUE adds a record to the end of the RLS queue (FIFO). Operands varname specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name. *QUEUE* is a keyword specifying the special default name. queid specifies the identifier for a special ty[...]

  • Seite 300

    Operands listname specifies the list identifier . stem. specifies the name of a stem. (A stem must end in a period.) See section “Stems” on page 123 for more information. The default stem is DA T A.. UPD is a keyword that enqueues on a file for update. Return Codes See the RLS command, section “RLS” on page 366. Example 'RLS READ USER[...]

  • Seite 301

    Operands varname specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name. dirid specifies a REXX List System directory level identifier . This is partially or fully qualified. See the CLD command, section “CLD” on page 325, for more information. Return Codes See the RLS command, sectio[...]

  • Seite 302

    stem. specifies the name of a stem. (A stem must end in a period.) See section “Stems” on page 123 for more information. The default stem is DA T A.. Return Codes See the RLS command, section “RLS” on page 366. Example 'RLS WRITE USERSUSER1TEST.DATA DATA.' This example stores the entire contents of the REXX compound variable DA[...]

  • Seite 303

    Chapter 21. REXX/CICS Command Definition The REXX/CICS Command Definition Facility provides a means of easily defining (or redefining) REXX commands and environments. Background One of the greatest strengths of REXX is its extendibility . Y ou can write your own external functions, subroutines, or commands to extend the capabilities of the REXX lan[...]

  • Seite 304

    authorized user to use DEFSCMD to change command definitions that affect other REXX/CICS users. See section “DEFCMD” on page 332 for more information on the DEFCMD command and section “DEFSCMD” on page 335 for more information on the DEFSCMD command. Command Arguments Passed to REXX Programs When a REXX/CICS command is written in REXX and t[...]

  • Seite 305

    Entry Specifications when DEFCMD CICSLINK is specified: When the code for the command program gets control by an EXEC CICS LINK, the CICS Commarea contains the CICP ARMS control block. Before the program returns to the caller , it should place the return code it wants reflected into the CICP ARMS RETCODE field. CICP ARMS Control Block The following[...]

  • Seite 306

    Non-REXX Language Interfaces REXX/CICS makes it possible to transparently convert a REXX process to a non-REXX process. T o do this requires that non-REXX command routines should be able to access REXX variables in the REXX exec that issued the command to be processed. The routine used to accomplish this is called CICGETV and must be linkedited wit[...]

  • Seite 307

    Chapter 22. REXX/CICS DB2 Interface The REXX/CICS DB2 Interface provides a means of executing SQL from a REXX exec. The SQL are prepared and executed dynamically . The REXX/CICS DB2 interface provides the results of the SQL in REXX predefined variables. The REXX/CICS DB2 interface supports DB2 V7.1 and above. This chapter explains how to use the in[...]

  • Seite 308

    ADDRESS EXECSQL "statement" "statement" . . . SQL can exist on more than one line. Each part of the statement is enclosed in quotes and a comma delimits additional statement text as follows: ADDRESS EXECSQL "SQL text", "additional text", . . . "final text" The following rules apply to embedded SQL: [...]

  • Seite 309

    v Host variables are not allowed within the SQL. Instead, you can use REXX variables to pass input data to the EXECSQL environment. The REXX variables are not embedded within quotes. The output from the EXECSQL environment is provided in REXX predefined variables (see section “Receiving the Results”). v When you code a SQL SELECT statement, you[...]

  • Seite 310

    SQLCOL n .1 Some SELECT functions such as CURRENT SQLID, MAX, and A VG are not associated with a particular DB2 column. T o view the results you must reference column name SQLCOL n .1. The n begins with, and is incremented by one, for each function included in the SELECT statement. All columns represented by SQLCOL n appear in the SQL_COLNAME compo[...]

  • Seite 311

    Exit rc end /*---------------------------------------*/ /* Display the members of the department */ /*---------------------------------------*/ Say 'Here are the members of Department' dept D on=1t o lastname.0 Say lastname.n phoneno.n End Exit DB2 Interface Chapter 22. REXX/CICS DB2 Interface 289[...]

  • Seite 312

    DB2 Interface 290 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 313

    Chapter 23. REXX/CICS High-level Client/Server Support Client/Server computing has become very popular in the Information Processing industry . Some of the advantages of client/server computing are: v The ability to effectively integrate the strengths of mainframes, mini-computers, and new cost-ef fective workstations, in a transparent fashion. v T[...]

  • Seite 314

    v Because REXX/CICS allows REXX clients and servers to be recoded in non-REXX languages, performance intensive parts of an application system can be selectively rewritten, if needed. The FLST and EDIT commands that REXX/CICS provides are examples of client/server environments. REXX/CICS Client Exec Example /* EXAMPLE REXX/CICS EXEC */ TRACE 'O[...]

  • Seite 315

    REXX/CICS Server Exec Example /* EXAMPLE REXX/CICS SERVER1 EXEC */ TRACE 'O' /* turn off source tracing */ /*----------------------------------------*/ /* Loop waiting on requests from clients */ /*----------------------------------------*/ Do Forever 'WAITREQ' parse var request cmd varname Select When request = 'COMMAND1&a[...]

  • Seite 316

    High-level Client/Server Support 294 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 317

    Chapter 24. REXX/CICS Panel Facility Facility The REXX panel facility provides the REXX programmer with simple tools and commands for panel definition and for panel input/output to 3270 type terminals. The panel facility allows easy definition of panels using any editor . The requirement is that the panel source definition file should be in the REX[...]

  • Seite 318

    mail_city = 'DALLAS'; /* prefill the most likely response for city/state */ mail_state = 'TX'; mail_zip = ''; do forever; 'panel send applican cursor(lname)'; if rc > 0 then call error_routine; 'panel receive applican'; /* pseudo-conversational this would be separate */ if pan.aid = 'PF3&apo[...]

  • Seite 319

    characters are re-activated. Certain keyword combinations are incompatible and are not allowed while others which may seem meaningless are allowed. For example, INVISIBLE and color . This may be useful when the field attribute is changed dynamically within a REXX program (the invisible field can be made visible which makes color meaningful). The ch[...]

  • Seite 320

    ! Defcolor unprotect bright & V ariable identifier Operands char specifies the control character being defined. V Ariable defines a REXX variable identifier control character . V ariable identifier control characters are used to associate Panel Facility control characters with REXX variable names. More than one variable control character can be[...]

  • Seite 321

    Notes: 1. When you do not specify a default color , the color is based on the field type and intensity values: protect/normal displays blue, protect/bright displays white, unprotect/normal displays green, and unprotect/bright displays red. 2. If any field on a panel has explicitly specified a color (including DEFCOLOR), all bright fields with DEFCO[...]

  • Seite 322

    The panel layout is close to what you see, with the exception of the control characters and the imbedded variables which are not shown when the panel is displayed. A field typed on the third line after the .P ANEL starting at column ten is positioned on the terminal screen third line, column ten. The characteristics of the .P ANEL verb follow . v I[...]

  • Seite 323

     .PANEL panel_name  protect_cc skip_cc variable_pair text variable_cc unprotect_cc variable_cc field_length variable_pair .PANEL  Operands panel_name specifies the panel being defined. It must be one to eight characters in length and follow the rules for REXX File System file names. (See Chapter 19, “REXX/CICS File System,” on pa[...]

  • Seite 324

    The characteristics of the P ANEL command follow . v All the arguments or keywords are not meaningful or valid for all commands. v The last panel command in a REXX exec is the END command. This releases any storage held by previous panel commands. This command needs no other operands. v Only the fields with associated variables can have their attri[...]

  • Seite 325

     NORmal BRight INVisible GReen RED BLUe TUrquoise WHite YEllow PInk DEfcolor BLInk REVerse UNDerline NOJustify LEft RIght NULls PAd ( ) BLAnks char NUMeric CUrsor   MDT  Operands Send is the panel command that sends a panel. Receive is the panel command that receives a panel. Converse is the panel command that sends a panel and waits[...]

  • Seite 326

    the field. The field list must be enclosed with parenthesis. Only the attributes stated are changed and the other attributes default to what was statically defined. A field defined originally as RED and UNDERLINE remains underlined if only blue is stated dynamically . ALarm (specified for SEND and CONVERSE only) sounds the bell when displaying pane[...]

  • Seite 327

    Notes: 1. When you do not specify a default color , the color is based on the field type and intensity values: protect/normal displays blue, protect/bright displays white, unprotect/normal displays green, and unprotect/bright displays red. 2. If any field on a panel has explicitly specified a color (including DEFCOLOR), all bright fields with DEFCO[...]

  • Seite 328

    OPID OPERATOR ID MSRE MAGNETIC READER STRF STRUCTURE FIELD TRIG TRIGGER PA1 PA2 PA3 PF1 PF2 PF3 PF4 PF5 PF6 PF7 PF8 PF9 PF10 PF11 PF12 PF13 PF14 PF15 PF16 PF17 PF18 PF19 PF20 PF21 PF22 PF23 PF24 P AN.CURS Position of cursor in last panel input. This is in the form of row column separated by a blank. For example, '10 5' would be row 10 and[...]

  • Seite 329

    Return Codes 4 W arning. Panel facility continues processing. Processing stops for other return code values. 8 Programmer error 10 Programmer error , P AN.REA contains more information to help determine the cause of the error . See section “State Codes and Input Codes” on page 308 for more information. 12 CICS command error; the CICS EIBRESP is[...]

  • Seite 330

    11 7 V ariable value was too long and was truncated to fit output field 11 8 T ext field was truncated. Check to see if explicit length did not force a subsequent field to overlay another field. 11 9 Bad or missing panel command. It should be SEND, RECEIVE, CONVERSE, TEST , or END. 122 A modified field was received but it had no corresponding input[...]

  • Seite 331

    06 Numeric 07 extended highlight (blink/reverse/underline) 08 MDT 09 Cursor 10 Pad() 11 V ariable 12 Drop State codes State codes for 20 xx location codes: 01 panel commands (send/receive/converse/...) 02 File() 03 Cursor() 04 Position() 05 Alarm 06 Noerase 07 Keyboard lock (lockkb/freekb) 08 Clrinput 09 Attribute 10 field type (protect/skip/unprot[...]

  • Seite 332

    State Codes State codes for 12 xx location codes: 01 panel name 02 protect/skip field 03 unprotect field 04 text within a protect/skip field 05 (not implemented yet) 06 explicit input field length number 07 unprotect variable 08 protect/skip variable Input codes Input codes for 12 xx location codes: 01 Plain displayable text 02 Explicit length numb[...]

  • Seite 333

    Example 2 .DEFINE > prot green .DEFINE < unprot underline white .DEFINE + var service. .DEFINE % skip turq .PANEL service > Panel service &disp_date &companyname % &salutation % Tab the cursor to the type of service wanted and press the ENTER key. <+> Itemized tax preparation <+> Non-itemized tax preparation <+&g[...]

  • Seite 334

    Example 4 .DEFINE ) protect bright .DEFINE + drop .DEFINE & var msg. A panel to display output dynamic messages. .PANEL msgbox2 )+-------------------------------------------+# )| |# )| & |# )| & |# )| |# )+-------------------------------------------+# Example 5 .DEFINE > skip blue .DEFINE < skip green right .DEFINE % var center_da[...]

  • Seite 335

    'PANEL SEND SIGNON' CLR_INP_FIELDS PATH_NAME , 'CURSOR(' CURS_NAME ')' ATTR_STRING IF RC > 4 THEN /* more than a warning */ SIGNAL ERROR /* clean up and exit */ 'PANEL RECEIVE SIGNON ' IF RC > 4 THEN SIGNAL ERROR /* clean up and exit */ ITERATE /* redisplay panel */ CLR_INP_FIELDS = '' /* disp[...]

  • Seite 336

    END; /* select */ END; /* do forever */ EXIT IF SYMBOL('ACCOUNT.ACC_NUM') == 'VAR' THEN RETURN(1) ELSE RETURN(0); NON_ITEMIZE_ROUTINE: QUERY_RET_ROUTINE: 'PANEL SEND MSGBOX1 POS(7 10) NOERASE' PATH_NAME IF RC > 4 THEN SIGNAL ERROR; 'PANEL RECEIVE MSGBOX1' IF RC > 4 THEN SIGNAL ERROR; RETURN; COMPANYNAME[...]

  • Seite 337

    NUM_OF_DAYS.2 = 29; ELSE NUM_OF_DAYS.2 = 28; FIRST_WEEKDAY = (TOT_DAYS+1) // 7; FIRST_WEEKDAY_SAVE = FIRST_WEEKDAY; DISP_CENTER_MON = MONTH_NAME.MONTH; /* center display month name */ CENTER_DAYS. = ''; /* null out all unused month days */ /* starting at the first weekday of the month fill in center month */ DO I = FIRST_WEEKDAY+1 TO NUM_[...]

  • Seite 338

    LEFT_MONTH = 12; ELSE LEFT_MONTH = MONTH - 1; FIRST_WEEKDAY = (TOT_DAYS - NUM_OF_DAYS.LEFT_MONTH +1) // 7; DISP_LEFT_MON = MONTH_NAME.LEFT_MONTH; LEFT_DAYS. = ''; DO I = FIRST_WEEKDAY+1 TO NUM_OF_DAYS.LEFT_MONTH + FIRST_WEEKDAY ; LEFT_DAYS. I=I- FIRST_WEEKDAY; END; END; /* if pan.aid = 'pf7' */ ELSE DO; TOT_DAYS = TOT_DAYS + NUM[...]

  • Seite 339

    (SUBSTR(DATE_SAVE,7,2)+FIRST_WEEKDAY_SAVE); ATTR_STRING = 'ATTRIB(' CUR_DAY_FIELD 'RED )' ; END; END; /* select */ 'PANEL RECEIVE CALENDAR' END; /* do forever loop */ ERROR: SAY 'RETURN CODE ' RC SAY 'REA CODE ' PAN.REA SAY 'LOC CODE ' PAN.LOC EXIT; EXIT_ROUTINE: 'PANEL END'; SEN[...]

  • Seite 340

    318 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 341

    Chapter 25. REXX/CICS Commands This chapter provides you with detailed reference information for all REXX/CICS commands. Return code information for all commands is returned after command execution in the special REXX variable RC. Y ou can use all the commands in this chapter with the command environment name REXXCICS. This is also the default. How[...]

  • Seite 342

    AUTHUSER Note: This is an authorized command.  AUTHUSER  ; userid  AUTHUSER authorizes a list of user IDs. Operands userid is a CICS signon user ID that becomes REXX/CICS authorized. Return Codes 0 Normal return 2602 Invalid operand or operand missing 2621 Specified user ID invalid length 2642 Error storing user ID Example 'AUTH[...]

  • Seite 343

    CD  CD dirid  CD changes the RFS file system directory . Operands dirid specifies a partial or full REXX File System directory that becomes the new current working directory for you. If dirid is not specified, the current working directory is retrieved and placed in the REXX special variable RESUL T , instead of changing the current wor[...]

  • Seite 344

    for execs. Commands 322 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 345

    CEDA  CEDA RDO_Command  Executes a CEDA command for resource definition online (RDO). Operands RDO_Command specifies a command string passed as input to the CEDA transaction program. Return Codes n specifies the return code passed back by CICS if an error is detected 0 Normal return -101 Invalid command Any warning or error messages are[...]

  • Seite 346

    CEMT  CEMT master_term_cmd  CEMT executes a CICS master terminal command from REXX. Operands master_term_cmd specifies a command string passed as input to the CEMT transaction program. Return Codes n specifies the return code passed back by CICS if an error is detected 0 Normal return -101 Invalid command Any warning or error messages a[...]

  • Seite 347

    CLD  CLD dirid  CLD changes your current RLS list directory . Operands dirid specifies a partial or full REXX List System directory that becomes the new current working directory for you. If dirid is not specified, the current working directory is retrieved and placed into the REXX variable RESUL T , instead of changing the current work[...]

  • Seite 348

    CONVTMAP  CONVTMAP lib.sublib ( mem.type ) rfs_fileid  CONVTMAP reads a VSE Librarian sublibrary member and converts a DSECT (created by a previously assembled BMS map) into a structure, and stores the result in a REXX File System file. The BMS map used as input to CONVTMAP must be in assembler language format. The resulting output file[...]

  • Seite 349

    COPYR2S Note: This is an authorized command.  COPYR2S source_vname stor_anchor offset * length struct_vname fieldname struct_name fieldname  COPYR2S copies REXX variable contents to GETMAINed storage. Operands source_vname specifies the REXX variable containing the value copied to the previously GETMAINed area. Note: This value should b[...]

  • Seite 350

    Return Codes 0 Normal return 2002 Invalid operand 2021 Invalid structure definition 2022 Invalid variable structure definition 2023 Field name not found 2025 Failure processing GETV AR request 2026 Invalid numeric input 2027 RFS read error 2028 Invalid offset 2029 Invalid length value Examples /* Needed if entering example from the REXXTRY utility [...]

  • Seite 351

    COPYS2R Note: This is an authorized command.  COPYS2R stor_anchor vname offset length * struct_vname fieldname struct_name fieldname  COPYS2R copies data from GETMAINed storage to a REXX variable. Operands stor_anchor specifies the REXX variable containing the anchor for the target storage area that was GETMAINed earlier . This anchor c[...]

  • Seite 352

    Return Codes 0 Normal return 2102 Invalid operand 2121 Invalid structure definition 2122 Invalid variable structure definition 2123 Field name not found 2125 Failure processing GETV AR request 2126 Invalid numeric input 2127 RFS read error 2128 Invalid offset 2129 Invalid length value Example var1 = '' /* set REXX variable VAR1 to null */[...]

  • Seite 353

    C2S  C2S client_rexx_varname server_rexx_varname  C2S copies a client REXX variable to a server REXX variable. Operands client_rexx_varname specifies the client REXX variable to copy from. server_rexx_varname is an optional name that specifies the server REXX variable to copy into. If it is not specified, it defaults to the same as the [...]

  • Seite 354

    DEFCMD  DEFCMD etarget ecmdnm etarget * itarget icmdnm itarget * == pgmname CICS_loadmod execname ( CLEAR ( CICSLINK CICSLOAD AUTH REXX  DEFCMD defines (or redefines) REXX user commands. Operands etarget is the 1 to 8 character name of the external target environment you used in a REXX exec issuing this command. This is the external env[...]

  • Seite 355

    CICSLOAD is a keyword indicating that the processing agent is a CICS program that is loaded by an EXEC CICSLOAD. REXX is a keyword indicating that the processing agent for this REXX command is a REXX exec that operates as a command server . AUTH Note: This is an authorized option. is a keyword indicating that this is an authorized REXX/CICS command[...]

  • Seite 356

    from the REXX user (programmer), a command can be quickly written in REXX and later transparently rewritten in another language, if it becomes performance critical. Commands 334 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 357

    DEFSCMD Note: This is an authorized command.  DEFSCMD etarget ecmdnm etarget * ** itarget icmdnm itarget * == pgmname CICS_loadmod execname ( CLEAR ( CICSLINK CICSLOAD REXX   AUTH  DEFSCMD defines (or redefines) REXX system commands. Operands etarget is the name of the external target environment you used in a REXX exec issuing th[...]

  • Seite 358

    CICSLINK is a keyword indicating that the processing agent for the defined REXX command is a standard CICS program that is called by an EXEC CICS LINK. CICSLOAD is a keyword indicating that the processing agent is a CICS program that is loaded by an EXEC CICSLOAD. REXX is a keyword indicating that the processing agent for this REXX command is a REX[...]

  • Seite 359

    5. REXX commands can be written in REXX. These REXX commands in turn call other REXX commands which are written in REXX, in a building block fashion. Since DEFSCMD hides the implementation detail from the REXX user (programmer), a command can be quickly written in REXX and later transparently rewritten in another language, if it becomes performance[...]

  • Seite 360

    DEFTRNID Note: This is an authorized command.  DEFTRNID trnid execname CLEAR  DEFTRNID is a region-wide authorized command that can be used to define the name of an exec to be invoked for a particular CICS transaction identifier . Operands trnid specifies a one to four character CICS transaction ID. execname specifie sa1t o1 7 character[...]

  • Seite 361

    DIR  DIR dirid ( stem.  DIR displays the current directory contents or optionally returns the directory contents in a REXX compound variable. Operands dirid specifies the partial or full REXX File System directory that is displayed. If you omit this, then the current directory is displayed. stem. specifies the name of a stem. (A stem mu[...]

  • Seite 362

    EDIT  EDIT NONAME fileid lib.sublib ( mem.type ) LIB ( MACRO macroname  EDIT opens a new edit session. Operands NONAME a file ID is not specified. This is the default. fileid specifies the file ID of the file to be created or edited. lib.sublib(mem.type) specifies a VSE Librarian sublibrary and member to be edited. LIB is a keyword that[...]

  • Seite 363

    EXEC  EXEC execid args  EXEC calls a REXX exec at a lower level (as a nested exec). All variables for this new exec are kept separate from the higher level exec, which is suspended until the nested exec ends. Operands execid specifies the 1 to 17 character identifier of the exec. args specifies the argument string being passed to the ca[...]

  • Seite 364

    EXECDROP Note: This is an authorized command.  EXECDROP AUTHClib member AUTHElib PROClib name MEM ( RFS LIB  EXECDROP removes an EXECLOADed exec from virtual storage. Operands AUTHClib indicates that member was loaded from an authorized command sublibrary . AUTHElib indicates that member was loaded from an authorized exec sublibrary . L[...]

  • Seite 365

    Note If a partial directory ID is given, it is temporarily appended to the end of the current working directory value to get a fully qualified directory ID. Commands Chapter 25. REXX/CICS Commands 343[...]

  • Seite 366

    EXECIO  EXECIO lines * READ tsqname WRITE tsqname stem. varname recno  EXECIO performs file input/output to a CICS temporary storage queue. Operands lines specifies the number of lines to read or write. An asterisk (*) is a special case that is specified for READ operations only , and indicates that the file is read from the target line[...]

  • Seite 367

    2. If a stem is specified for a READ operation (and a stem should be specified if more than one record is read), the actual number of records read is placed into stem.0. 3. Use the CICS-supplied CEBR transaction to browse temporary storage queues. For example, enter: CEBR QUEUE1 to look at the queue created above. 4. CEBR provides PUT and GET funct[...]

  • Seite 368

    EXECLOAD Note: This is an authorized command.  EXECLOAD AUTHClib member AUTHElib PROClib name MEM ( RFS LIB  EXECLOAD loads an exec into virtual storage. Operands AUTHClib indicates that member must be loaded from an authorized command sublibrary . AUTHElib indicates that member must be loaded from an authorized exec sublibrary . LIB in[...]

  • Seite 369

    Example 'EXECLOAD POOL1:USERSUSER2TEST.EXEC (RFS' This example loads the exec TEST .EXEC from RFS into storage. Subsequent calls of TEXT .EXEC will use the loaded copy . Notes 1. If an exec is loaded into virtual storage, it is automatically shared by all users. 2. If an EXECLOAD is performed to replace an in-storage exec with a newer [...]

  • Seite 370

    EXECMAP  EXECMAP  EXECMAP returns the sublibraries and members, the number of users, the descriptor table start (in hex), and the amount of storage required of the execs that have been loaded using EXECLOAD. Return Codes 0 Normal return 1623 EXECLOAD directory not found Example 'EXECMAP' If the exec POOL1:USERSUSER1TEST .EX[...]

  • Seite 371

    EXPORT  EXPORT rfs_fileid lib.sublib ( mem.type )  EXPORT exports an RFS file to a VSE Librarian sublibrary member . Operands rfs_fileid specifies a fully qualified REXX File System file ID. lib.sublib(mem.type) specifies a VSE Librarian sublibrary and member . Return Codes 0 Normal return 1701 Invalid command 1702 Invalid operand 1723 [...]

  • Seite 372

    FILEPOOL Note: This is an authorized command.  FILEPOOL DEFINE poolid dirid fileid ( USER FORMAT poolid ADD poolid fileid  FILEPOOL performs RFS file pool administration activities. Operands DEFINE defines a new RFS file pool. poolid specifies the name of the target file pool. dirid specifies the CICS file identifier of the file pool di[...]

  • Seite 373

    Example 'FILEPOOL DEFINE POOL1 REXXDIR1 REXXLIB1 (USER' This example defines file pool POOL1 and tells RFS the CICS file definition to use is REXXLIB1. It also indicates to the FILEPOOL FORMA T command to issue an RFS MKDIR to build the USERS directory . Note This is an authorized command, performed by a REXX/CICS administrator or system[...]

  • Seite 374

    FLST  FLST dirid  FLST calls the file list utility to work with the files. Operands dirid specifies an optional full or partial directory ID that a file list is displayed. If you do not specify dirid ,i t defaults to the current working directory . Return Codes FLST returns the return code given by RFS. Example 'FLST' This exa[...]

  • Seite 375

    GETVERS  GETVERS  GETVERS retrieves the current REXX/CICS, program name, version, and compile time information, and places it into the REXX variable VERSION. The returned information is in the form: V x R y M mmmm mm/dd/yy hh.mm , where: x specifies the REXX/CICS V ersion number . y specifies the REXX/CICS Release number . mm/dd/yy spec[...]

  • Seite 376

    HELP  HELP search_term  HELP browses or searches this book (the IBM REXX Development System for CICS/ TS for VSE/ESA ) online. Operands search_term specifies the string you want located. Return Codes n specifies the return code passed by from internal RFS or P ANEL commands 0 Normal return Commands 354 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 377

    IMPORT  IMPORT lib.sublib ( mem.type ) rfs_fileid  IMPORT imports a VSE Librarian sublibrary member to an RFS file. Operands lib.sublib(mem.type) specifies a VSE Librarian sublibrary and member . rfs_fileid specifies a fully qualified REXX File System file ID. Return Codes 0 Normal return 1701 Invalid command 1702 Invalid operand 1723 R[...]

  • Seite 378

    LISTCMD  LISTCMD envname cmdname  LISTCMD lists REXX command definition information (previously specified by DEFCMD). Operands envname specifies the name of the command environment defined using DEFCMD or DEFSCMD. cmdname specifies the name of a command specified in DEFCMD or DEFSCMD. Return Codes 0 Normal return 821 Invalid environment[...]

  • Seite 379

    LISTCLIB  LISTCLIB stem.  LISTCLIB displays the names of the authorized command libraries to the terminal or to a specified stem array , if a stem has been specified. The libraries are displayed in their search order . Operands stem. specifies the name of a stem. (A stem must end in a period.) The information returned is the name of eac[...]

  • Seite 380

    LISTELIB  LISTELIB stem.  LISTELIB displays the names of the authorized exec libraries to the terminal or to a specified stem array , if a stem has been specified. The libraries are displayed in their search order . Operands stem. specifies the name of a stem. (A stem must end in a period.) The information returned is the name of each V[...]

  • Seite 381

    LISTPOOL  LISTPOOL stem.  LISTPOOL displays RFS file pool information to the terminal or to a specified stem array , if a stem has been specified. Operands stem. specifies the name of a stem. (A stem must end in a period.) Refer to section “Stems” on page 123 for more information. Three columns of information are returned: v the poo[...]

  • Seite 382

    LISTTRNID Note: This is an authorized command.  LISTTRNID  LISTTRNID lists the current transaction ID definitions created by the DEFTRNID command. Return Codes 0 Normal return 2325 Error retrieving trantable information Example 'LISTTRNID' The CICST ART exec defines the default transactions and their EXEC names. The resulting [...]

  • Seite 383

    PAT H  PATH  ; dirid lib.sublib  P A TH defines the search path for REXX execs. Operands dirid specifies one or more fully qualified REXX File System directories that are searched when you are attempting to locate an exec to be executed. A full RFS directory ID starts with a pool ID and is in the form: POOL1: dirid1 ... diridn Whe[...]

  • Seite 384

    PSEUDO  PSEUDO ON OFF  PSEUDO turns the pseudo-conversational mode on or off. Operands ON enables automatic pseudo-conversational support so that when the next REXX PULL instruction or REXX/CICS W AITREAD command is encountered in the current exec, instead of a conversational terminal read occurring immediately , an EXEC CICS RETURN TRA[...]

  • Seite 385

    RFS  RFS PRIVATE AUTH dirid PUBLICR PUBLICW SECURED CKDIR dirid CKFILE fileid COPY fileid1 fileid2 DELETE fileid DATA. DISKR fileid stem. DATA. DISKW fileid stem. GETDIR stem. dirid MKDIR dirid RDIR dirid RENAME fileid1 fileid2  RFS performs file input/output to the REXX File System. Operands AUTH is a command that authorizes access to [...]

  • Seite 386

    fileid2 specifies the target file identifier , it may be a fully or partially qualified directory and file identifier . DELETE is a command that deletes an RFS file. fileid specifies the source file identifier , it may be fully or partially qualified. DISKR is a command that reads records from an RFS file. stem specifies the name of a stem. (A stem[...]

  • Seite 387

    Note File access security checking is performed at the directory level, rather than the file level. If a specified file ID is not a fully qualified ID, the current directory or P A TH directories are used in an attempt to resolve the partial name into a fully qualified name; in this case no further checking is necessary . If a fully qualified file [...]

  • Seite 388

    RLS  RLS CKDIR dirid DELETE listname *QUEUE* LPULL varname queid *QUEUE* LPUSH varname queid *QUEUE* LQUEUE varname queid MKDIR dirid DATA. READ listname stem. ( UPD VARDROP varname dirid VARGET varname dirid VARPUT varname dirid DATA. WRITE listname stem.  RLS performs list input/output to the REXX List System. Operands CKDIR is a comm[...]

  • Seite 389

    MKDIR is a command that creates a new RLS directory level. READ is a command that reads records from an RLS list into a stem. listname specifies the list identifier . stem. specifies the name of a stem. (A stem must end in a period.) Refer to section “Stems” on page 123 for more information. The default stem is DA T A.. UPD enqueues on a list f[...]

  • Seite 390

    SCRNINFO  SCRNINFO  SCRNINFO returns a two-digit decimal screen height (in lines) in the variable SCRNHT , and returns a three-digit decimal screen width (in columns) in the variable SCRNWD. Return Codes n specifies the return code passed back by CICS if an error is detected 0 Normal return -499 Internal error Example 'SCRNINFO&apo[...]

  • Seite 391

    SET  SET (1) ENG LANG CANFR FRANC GER ESPAN UCENG HANZI KANJI 1024 MAXVSTOR kilobytes RETRieve pfkeynn TERM CEBRxxxx TERMOUT NOTERM tsq_name CANCEL  Notes: 1 If no parameters are passed to the SET command, then SET creates a stem variable ( SET. ) that contains all of the processing options for the user that was created by the SET or SE[...]

  • Seite 392

    RETRieve allows a PF key being set to retrieve the last line entered. pfkeynn specifies the PF key number . TERMOUT sends terminal line-mode output to a CICS temporary storage queue (for example: SA Y and TRACE output) even when a terminal is attached. TERM specifies that linemode output will be sent to the terminal. NOTERM specifies that terminal [...]

  • Seite 393

    SETSYS Note: This is an authorized command.  SETSYS   LANG ENG CANFR FRANC GER ESPAN UCENG HANZI KANJI 1024 MAXVSTOR kilobytes RETRieve pfkeynn ON PSEUDO OFF AUTHClib lib.sublib AUTHElib lib.sublib  SETSYS sets the REXX/CICS processing options for the system. Operands LANG specifies that one of the following languages are availabl[...]

  • Seite 394

    pfkeynn specifies the PF key number . PSEUDO establishes the default region-wide REXX/CICS automatic pseudo-conversational setting. For more information on the PSEUDO command, see section “PSEUDO” on page 362. ON specifies that the automatic pseudo-conversational setting is on. This is the default. OFF specifies that the automatic pseudo-conver[...]

  • Seite 395

    S2C  S2C server_rexx_varname client_rexx_varname  S2C copies a server REXX variable to a client REXX variable. Operands server_rexx_varname is the name of the server REXX variable copying from. client_rexx_varname is the optional name of the client REXX variable copying into. If you do not specify , it defaults to the same as the server[...]

  • Seite 396

    TERMID  TERMID  TERMID returns the four-character CICS terminal ID from the CICS field EIBTRMID in the variable TERMID. Return Codes 0 Normal return 2921 Error in obtaining terminal ID 2928 Error setting TERMID value Example 'TERMID' This example places the CICS terminal ID from the CICS field EIBTRMID in the variable TERMID. [...]

  • Seite 397

    W AITREAD  WAITREAD  W AITREAD performs full screen terminal input and places the results into the compound variable with: W AITREAD.0 containing the number of elements returned. W AITREAD.1 containing the AID description. W AITREAD.2 containing the cursor position. W AITREAD.3 through W AITREAD. n remaining 3270 fields that have been m[...]

  • Seite 398

    W AITREQ  WAITREQ  W AITREQ is used only in REXX servers causing the server to wait for a request. After a request is received, it is placed into REXX variable REQUEST . Return Codes 0 Normal return 3121 W AITREQ not enabled 3122 Exec not a server 3123 Error saving request variable 3199 Internal error Note: The return code reflected to [...]

  • Seite 399

    Part 3. Appendixes © Copyright IBM Corp. 1992, 2009 377[...]

  • Seite 400

    378 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 401

    Appendix A. Error Numbers and Messages External interfaces to the language processor can generate three of the error messages either before the language processor gains control or after control has left the language processor . Therefore, SIGNAL ON SYNT AX cannot trap these errors. The error numbers involved are: 3 and 5 (if the initial requirement[...]

  • Seite 402

    System action: Execution is terminated at the point of the error . User response: Redefine storage and reissue the command. The following are the REXX error messages: CICREX218E Error 46 Invalid variable reference Explanation: Within an ARG, DROP , P ARSE, PULL, or PROCEDURE instruction, the syntax of a variable reference (a variable whose value is[...]

  • Seite 403

    When a1=b1 then When a1=b1 then DO Say 'A1 equals B1' Say 'A1 equals B1' exit exit Otherwise nop end end Otherwise nop end System action: Execution stops. User response: Make the necessary corrections. CICREX455E Error 8 running fn ft , line nn : Unexpected THEN or ELSE Explanation: The language processor has found a THEN or an [...]

  • Seite 404

    A-Z a-z 0-9 (Alphamerics) @#£$.?!_ (Name Characters) &*()-+= ¬ '";:<,>/| (Special Characters) If surrounded by X'0E' (shift-out) and X'0F' (shift-in), and if ETMODE is on, the following are also valid characters: X'41' - X'FE' (DBCS Characters) Some causes of this error are: 1. Using ac[...]

  • Seite 405

    passed back from an EXIT or RETURN instruction (when a REXX program is called as a command) is not a whole number or will not fit in a general register . This error may be due to mistyping the name of a symbol so that it is not the name of a variable in the expression on any of these statements. This might be true, for example, if you entered “EX[...]

  • Seite 406

    Say Enter A, B, or C should be written as: Say 'Enter A, B, or C' System action: Execution stops. User response: Make the necessary corrections. CICREX474E Error 39 running fn ft , line nn : Evaluation stack overflow Explanation: The language processor was not able to evaluate the expression because it is too complex (many nested parenthe[...]

  • Seite 407

    end with a RETURN statement specifying an expression. System action: Execution stops. User response: Make the necessary corrections. CICREX481E Error 49 running fn ft , line nn : Language processor failure Explanation: The language processor carries out numerous internal self-consistency checks. It issues this message if it encounters a severe erro[...]

  • Seite 408

    v NUMERIC FUZZ expression v OPTIONS expression v SIGNAL V ALUE expression v TRACE V ALUE expression. (FUZZ must be smaller than DIGITS.) System action: Execution stops. User response: Make the necessary corrections. CICREX489E Error 38 running fn ft , line nn : Invalid template or pattern Explanation: The language processor found an incorrect speci[...]

  • Seite 409

    Appendix B. Return Codes This appendix is a list of all the REXX/CICS return codes. Panel Facility 4 W arning. Panel facility continues processing 8 Programmer error 10 Programmer error with state information 12 CICS command error 14 RFS errors; reason code contains the RFS return code 16 Internal system error See Chapter 24, “REXX/CICS Panel Fac[...]

  • Seite 410

    207 Insufficient space in filepool 210 Request failed 21 1 Invalid file ID 223 Search argument not found 226 File is currently being edited 229 Number out of range 230 Cursor is not in file area 231 Out of virtual storage 232 Prefix command conflict 236 Not defined 299 Internal error DIR 0 Normal return 321 Cannot access current RFS directory infor[...]

  • Seite 411

    715 Directory already exists 716 Directory not specified 723 List not found 726 List not specified 728 List is in update mode 729 List is not in update mode 730 User is not signed on 732 Queue empty 733 Named queue not found 736 Stem or variable not specified 737 Stem or variable name too long 738 Stem or variable count invalid 743 Block not found [...]

  • Seite 412

    DEFTRNID 0 Normal return 1202 Invalid operand 1222 Invalid option 1223 Error storing trantable information 1225 Error retrieving trantable information 1226 Exec name length error 1228 Error setting trantable value 1233 T ransaction not found in table EXECDROP 0 Normal return 1401 Invalid command 1402 Invalid operand 1423 Error storing EXECLOAD info[...]

  • Seite 413

    1823 Error storing file pool information 1824 File pool ID not specified 1825 Error retrieving file pool information 1826 Invalid file pool ID 1827 Invalid file pool data retrieved 1828 File pool not defined 1829 RFS could not add library to file pool 1830 RFS could not create users directory 1831 CICS file indentifier for the file pool must be spe[...]

  • Seite 414

    2226 Invalid stem variable name LISTTRNID 0 Normal return 2325 Error retrieving trantable information C2S 0 Normal return 2440 No variable name specified 2441 Error retrieving variable 2442 Error storing variable 2448 No client available PSEUDO 0 Normal return 2502 Invalid operand 2521 Operand not specified AUTHUSER 0 Normal return 2602 Invalid ope[...]

  • Seite 415

    3021 No terminal is attached 3099 Internal error W AITREQ 0 Normal return 3121 W AITREQ not enabled 3122 Exec not a server 3123 Error saving request variable 3199 Internal error EXEC n specifies the return code set by the exit of the called exec 0 Normal return -3 Exec not found -10 Exec name not specified -1 1 Invalid exec name -12 GETMAIN error -[...]

  • Seite 416

    -527 Redundant specification for option -528 V alue for option not specified -529 V alue specified for option which should not have a value -530 V alue specified for option is not numeric -531 Invalid value -532 V alue specified is too long -533 V alue specified is too short -534 V alue not specified -535 V ariable table overflow -536 Number of var[...]

  • Seite 417

    Appendix C. Double-Byte Character Set (DBCS) Support A Double-Byte Character Set supports languages that have more characters than can be represented by 8 bits (such as Korean Hangeul and Japanese kanji). REXX has a full range of DBCS functions and handling techniques. These include: v Symbol and string handling capabilities with DBCS characters v [...]

  • Seite 418

    DBCS character -> .A .B .C .D SBCS character -> abcde DBCS blank -> '. ' EBCDIC shift-out (X'0E') -> < EBCDIC shift-in (X'0F') -> > Note: In EBCDIC, the shift-out (SO) and shift-in (SI) characters distinguish DBCS characters from SBCS characters. Enabling DBCS Data Operations and Symbol Use The OPT[...]

  • Seite 419

    V alidation The user must follow certain rules and conditions when using DBCS. DBCS Symbol V alidation DBCS symbols are valid only if you comply with the following rules: v The DBCS portion of the symbol must be an even number of bytes in length v DBCS alphanumeric and special symbols are regarded as different to their corresponding SBCS characters[...]

  • Seite 420

    P ARSE In EBCDIC: x1 = '<><.A.B><. . ><.E><.F><>' PARSE VAR x1 w1 w1 -> '<><.A.B><. . ><.E><.F><>' PARSE VAR x1 1 w1 w1 -> '<><.A.B><. . ><.E><.F><>' PARSE VAR x1 w1 . w1 -> '<.A.B>' The [...]

  • Seite 421

    When the data is split up in shorter lengths, again the DBCS data integrity is kept under OPTIONS EXMODE. In EBCDIC, if the terminal line size is less than 4, the string is treated as SBCS data, because 4 is the minimum for mixed string data. UPPER Under OPTIONS EXMODE, the UPPER instruction translates only SBCS characters in contents of one or mor[...]

  • Seite 422

    In EBCDIC: '<.A>' = '<.A. >' -> 1 /* true */ '<><><.A>' = '<.A><><>' -> 1 /* true */ '<> <.A>' = '<.A>' -> 1 /* true */ '<.A><><.B>' = '<.A.B>' -> 1 /* true */ 'ab[...]

  • Seite 423

    DA T A TYPE DATATYPE('<.A.B>') -> 'CHAR' DATATYPE('<.A.B>','D') -> 1 DATATYPE('<.A.B>','C') -> 1 DATATYPE('a<.A.B>b','D') -> 0 DATATYPE('a<.A.B>b','C') -> 1 DATATYPE('abcde','C') -> [...]

  • Seite 424

    RIGHT('a<>',2) -> 'a ' CENTER('<.A.B>',10,'<.E>') -> '<.E.E.E.E.A.B.E.E.E.E>' CENTER('<.A.B>',11,'<.E>') -> '<.E.E.E.E.A.B.E.E.E.E.E>' CENTER('<.A.B>',10,'e') -> 'eeee<.A.B>eeee&a[...]

  • Seite 425

    Drop A.3 ; <.A.B>=3 /* if ETMODE is on */ SYMBOL('<.A.B>') -> 'VAR' SYMBOL(<.A.B>) -> 'LIT' /* has tested "3" */ SYMBOL('a.<.A.B>') -> 'LIT' /* has tested A.3 */ TRANSLA TE In EBCDIC: TRANSLATE('abcd','<.A.B.C>','abc') -&[...]

  • Seite 426

    WORDPOS In EBCDIC: WORDPOS('<.B.C> abc','<.A. .B.C> abc') -> 2 WORDPOS('<.A.B>','<.A.B. .A.B><. .B.C. .A.B>',3) -> 4 Applying the word extraction from a string and character comparison rules. DBCS Processing Functions This section describes the functions that support DBCS m[...]

  • Seite 427

    DBCENTER  DBCENTER( string , length , pad , option )  returns a string of length length with string centered in it, with pad characters added as necessary to make up length. The default pad character is a blank. If string is longer than length , it is truncated at both ends to fit. If an odd number of characters are truncated or added, [...]

  • Seite 428

    padded with pad characters (or truncated) on the right as needed. The default pad character is a blank. The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not count the SO and SI and is the default. Here are some EBCDIC examples: DBLEFT('ab<.A.B>',4) -> 'ab<.A>' DBLE[...]

  • Seite 429

     DBRRIGHT( string , length , option )  returns the remainder from the DBRIGHT function of string .I f length is greater than the length of string , returns a null string. The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not count the SO and SI and is the default. Here are some EBCDIC exa[...]

  • Seite 430

    DBV ALIDA TE  DBVALIDATE( string ,'C' )  returns 1 if the string is a valid mixed string or SBCS string. Otherwise, returns 0 . Mixed string validation rules are: 1. Only valid DBCS character codes 2. DBCS string is an even number of bytes in length 3. EBCDIC only — Proper SO and SI pairing. In EBCDIC, if C is omitted, only [...]

  • Seite 431

    Appendix D. Reserved Keywords and Special V ariables Y ou can use keywords as ordinary symbols in many situations where there is no ambiguity . The precise rules are given here. There are three special variables: RC, RESUL T , and SIGL. Reserved Keywords The free syntax of REXX implies that some symbols are reserved for the language processor'[...]

  • Seite 432

    RC is set to the return code from any run host command (or subcommand). Following the SIGNAL events, SYNT AX, ERROR, and F AILURE, RC is set to the code appropriate to the event: the syntax error number (see appendix on error messages) or the command return code. RC is unchanged following a NOV ALUE or HAL T event. Note: Host commands run manually [...]

  • Seite 433

    Appendix E. Debug Aids This appendix describes the interactive debugging of problems, interrupting execution, and controlling tracing. Interactive Debugging of Programs The debug facility permits interactively controlled execution of a program. Changing the TRACE action to one with a prefix ? (for example, TRACE ?A or the TRACE built-in function) t[...]

  • Seite 434

    Since any instructions may be run in interactive debug, you have considerable control over execution. Some examples: Say expr /* displays the result of evaluating the */ /* expression. */ name=expr /* alters the value of a variable. */ Trace O /* (or Trace with no options) turns off */ /* interactive debug and all tracing. */ Trace ?A /* turns off [...]

  • Seite 435

    Appendix F . REXX/CICS Business V alue Discussion CICS T ransaction Server for VSE/ESA REXX provides an ideal system to deliver superior , valuable, and appropriate CICS-based business solutions in a more timely and cost-effective manner . Business Solutions The ability to deliver business solutions more quickly is an important advantage in today&a[...]

  • Seite 436

    v CICS Transaction Server for VSE/ESA REXX is useable by business people Quite often, business people who best understand the business and their required solutions have ideas on modifying or enhancing the applications they use. However , without extensive training and experience with a programming language, they may be unable to implement the ideas[...]

  • Seite 437

    v CICS Transaction Server for VSE/ESA REXX supports six languages CICS T ransaction Server for VSE/ESA REXX provides REXX messages in six languages, in addition to U.S. English: – Canadian French – French – German – Japanese Kanji – Spanish – Simplified Chinese. Only the REXX messages are translated. The text editor and file list utilit[...]

  • Seite 438

    416 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 439

    Appendix G. System Definition/Customization/Administration This appendix discusses the system definition, customization, and administration of REXX/CICS. Authorized REXX/CICS Commands/Authorized Command Options Several REXX/CICS commands, or command options, are identified as being authorized. An authorized REXX/CICS command can only be executed if[...]

  • Seite 440

    Setting System Options System options are specified by using the REXX/CICS SETSYS command. It is recommended that system-wide SETSYS commands be placed in the CICST ART exec. Defining and Initializing a REXX File System (RFS) File Pool Use the FILEPOOL DEFINE command to define a RFS file pool. Use the FILEPOOL FORMA T command to initialize the firs[...]

  • Seite 441

    Function IDs A Alter R Read U Update System Definition/Customization/Administration Appendix G. System Definition/Customization/Administration 419[...]

  • Seite 442

    System Definition/Customization/Administration 420 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 443

    Appendix H. Security REXX/CICS can be viewed as a more sophisticated version of the CICS-supplied Command Level Interpreter T ransaction (CECI). The REXX transaction (used to issue REXX execs), much like the CECI transaction, can be controlled using CICS transaction security . The REXX transaction might be made widely available, or might be limited[...]

  • Seite 444

    authorized. This is the logical place to define authorized users and libraries. The sublibrary containing the CICST ART exec is treated as the initial “authorized command” and “authorized exec” sublibrary . Because access to REXX/CICS libraries can easily be controlled, this is the logical counterpart to controlling access to CICS productio[...]

  • Seite 445

    Notes: 1. The AUTH option of the DEFCMD or DEFSCMD is itself an authorized command option. That is, AUTH may only be used if the user issuing it is an authorized user or if it was issued from an exec loaded from an authorized sublibrary . 2. The EXECLOAD and EXECDROP commands are authorized. Therefore, only an authorized user or exec can EXECLOAD a[...]

  • Seite 446

    Security 424 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 447

    Appendix I. Performance Considerations Because of the production nature of CICS, emphasis is placed on performance. Many design choices can affect performance. These include: v How REXX environments are defined v How the REXX File System structure is implemented v How security interfaces are implemented v How much virtual storage is given to an exe[...]

  • Seite 448

    426 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 449

    Appendix J. Basic Mapping Support Example This appendix has a list of steps that you must follow so you can use the CICS basic mapping support (BMS) within the REXX/CICS environment. The steps include: 1. BMS maps must be assembled and linked into a CICS library . This library must be in the LIBDEF in the CICS region startup JCL. 2. If you are goin[...]

  • Seite 450

    The map DSECT follows. * TEST PANEL FOR REXX/CICS 00000010 PANEL1S EQU * START OF DEFINITION 00000020 SPACE 00000030 DS CL12 TIOA PREFIX 00000040 DUSERIDL DS CL2 INPUT DATA FIELD LENGTH 00000050 DUSERIDF DS 0C DATA FIELD FLAG 00000060 DUSERIDA DS C DATA FIELD 3270 ATTRIBUTE 00000070 DUSERIDC DS C COLOR ATTRIBUTE 00000080 DUSERIDH DS C HIGHLIGHTING [...]

  • Seite 451

    /* and initialize */ 'PSEUDO OFF' ZEROES = '00'x 'CICS GETMAIN SET(WORKPTR) LENGTH(90) INITIMG(ZEROES)' VAR1 = 'USERID must be 8 characters' /* Copy the REXX variable VAR1 to the GETMAINed storage */ 'COPYR2S VAR1 WORKPTR 30' /* Copy the storage area to REXX variable */ 'COPYS2R WORKPT RX09 0 &[...]

  • Seite 452

    REXX/CICS HEADER PANEL1 PANEL1 PLEASE ENTER YOUR USERID: TEST MSG: Please enter 8 character USERID BMS Example 430 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 453

    Appendix K. Post-Installation Configuration This appendix has a list of the steps to configure the REXX support. Create the RFS Filepools The REXX Filing System uses two or more filepools to store data. These are implemented as sets of VSAM clusters. There is a skeleton sample job called CICVSAM.J in PRD1.BASE to define two filepools for REXX. Y ou[...]

  • Seite 454

    COPY CICHPREP.Z:=.PROC R=Y COPY CICIVP1.Z:=.PROC R=Y COPY CICIVP2.Z:=.PROC R=Y COPY CICIVP3.Z:=.PROC R=Y COPY CICLCLIB.Z:=.PROC R=Y COPY CICLELIB.Z:=.PROC R=Y COPY CICLISTC.Z:=.PROC R=Y COPY CICLISTP.Z:=.PROC R=Y COPY CICLISTT.Z:=.PROC R=Y COPY CICOVSIB.Z:=.PROC R=Y COPY CICPATH.Z:=.PROC R=Y COPY CICPSAMP.Z:=.PROC R=Y COPY CICRXTRY.Z:=.PROC R=Y COP[...]

  • Seite 455

    Format the RFS Filepools Ensure that all required configuration tasks have been performed, and if necessary re-start CICS. Sign on with a userid defined as an authorized user in CICST ART .PROC. Enter REXX (which is the default transaction id associated with the CICRXTRY exec). Y ou should see the following line at the top of the screen: Enter a RE[...]

  • Seite 456

    CONNECT S=PRD1.BASE : user.sublib COPY CICR3270.Y : CICR3270.BOOK COPY CICINDEX.N : CICINDEX.PANSRC COPY CICSNDX.N : CICSNDX.PANSRC COPY CICCHAP.N : CICCHAP.PANSRC Start CICS with at least EDSALIM=25M. Approximately 10M of free EDSA is needed to execute this procedure, therefore allow this much extra over your normal configuration. CEMT I DSAS disp[...]

  • Seite 457

    Sample output: Enter a REXX command or EXIT to quit CALL CICIVP1 ***------------------------------------------------------*** *** This is a test REXX program running under CICS/VSE *** *** It was loaded from PROCLIB-user.sublib(CICIVP1) ***------------------------------------------------------*** What is your name? <type name and press ENTER>[...]

  • Seite 458

    A package for the CICSQL program is loaded into the DB2 database under the SQLDBA user . This is supplied as member CICSQL.A. If you fail to do this, REXX gives return codes such as -805 whenever an "ADDRESS EXECSQL command" is issued. Adapt the following JCL and run DB2 in single user mode, substituting the correct password for user SQLD[...]

  • Seite 459

    Bibliography CICS T ransaction Server for VSE/ESA Release 1 library Evaluation and planning CICS TS for VSE/ESA Enhancements Guide GC34-5763 CICS TS for VSE/ESA Release Guide GC33-1645 CICS TS for VSE/ESA Migration Guide GC33-1646 CICS TS for VSE/ESA Report Controller Planning Guide GC33-1941 General Master index SC33-1648 CICS TS for VSE/ESA T rac[...]

  • Seite 460

    CICS Clients CICS Clients: Administration SC33-1792 CICS Universal Clients V ersion 3 for OS/2: Administration SC34-5450 CICS Universal Clients V ersion 3 for Windows: Administration SC34-5449 CICS Universal Clients V ersion 3 for AIX: Administration SC34-5348 CICS Universal Clients V ersion 3 for Solaris: Administration SC34-5451 CICS Family: OO p[...]

  • Seite 461

    TCP/IP User's Guide SC33-6601 T urbo Dispatcher Guide and Reference SC33-6797 Unattended Node Support SC33-6712 High-Level Assembler Language (HLASM) General Information GC26-8261 Installation and Customization Guide SC26-8263 Language Reference SC26-8265 Programmer ’s Guide SC26-8264 Language Environment for VSE/ESA (LE/VSE) C Run-T ime Lib[...]

  • Seite 462

    Diagnosis L Y43-0065 Data Areas L Y43-0104 Messages and Codes SC31-6493 Migration Guide GC31-8072 Network Implementation Guide SC31-6494 Operation SC31-6495 Overview GC31-81 14 Programming SC31-6496 Programming for LU6.2 SC31-6497 Release Guide GC31-8090 Resource Definition Reference SC31-6498 Books from VSE/ESA 2.5 optional program libraries C for[...]

  • Seite 463

    DL/I VSE Application and Database Design SH24-5022 Application Programming: CALL and RQDLI Interface SH12-541 1 Application Programming: High-Level Programming Interface SH24-5009 Database Administration SH24-501 1 Diagnostic Guide SH24-5002 General Information GH20-1246 Guide for New Users SH24-5001 Interactive Resource Definition and Utilities SH[...]

  • Seite 464

    442 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 465

    Notices This information was developed for products and services offered in the U.S.A. IBM ® may not of fer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program,[...]

  • Seite 466

    444 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 467

    T rademarks The following terms are trademarks of International Business Machines Corporation in the United States, or other countries, or both: ACF/VT AM AFP AIX A T C/370 CICS CICS OS/2 CICS/ESA CICS/MVS CICS/VSE CICSPlex DB2 Hiperbatch IBM IBMLink IMS MVS/ESA OfficeV ision/VM OS/2 RACF System/390 VSE/ESA © Copyright IBM Corp. 1992, 2009 445[...]

  • Seite 468

    446 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 469

    Index Special characters ! prefix on TRACE option 168 ? prefix on TRACE option 167 / (division operator) 21, 1 16, 218 // (remainder operator) 21, 1 16, 221 /= (not equal operator) 1 17 /== (strictly not equal operator) 1 17 .DEFINE verb 296, 297 .P ANEL verb 299, 300 * (multiplication operator) 21, 1 16, 218 *-* tracing flag 168 ** (power operator[...]

  • Seite 470

    CASE command 236, 242 CA TMOUSE EXEC 91 CD command 127, 231, 258, 321, 339 CEDA command 105, 323 CEMT command 105, 324 Century option of DA TE function 182 CHANGE command 237 checking arguments with ARG function 176 CICEPROF macro 241 CICGETV routine 284 CICP ARMS control block 283 CICREX program 418 CICS 82 return codes 393 CICS commands 81 CICSEC[...]

  • Seite 471

    error 379, 387 debugging 29 ERROR 225 ERROR condition of SIGNAL and CALL instructions 228 error messages 12 ETMODE 151 European option of DA TE function 182 evaluation of expressions 1 15 example 244 ADDRESS instruction 10 AUTH 260 AUTHUSER command 320 C2S command 331 CD command 321 CEDA command 323 CEMT command 324 CKDIR 260, 275 CLD command 325 C[...]

  • Seite 472

    F F AILURE condition of SIGNAL and CALL instructions 225, 228 failure, definition 125 feature of REXX 3 FIFO (first-in/first-out) stacking 160 file access security 259 FILE command 241 file list utility (FLST) 264 file name, type, mode of program 153 file pool 257 root directory 257 file system commands 259 file type extension 127 FILEPOOL command [...]

  • Seite 473

    LPUSH command 276 LQUEUE command 277 M MACRO command 246 mapping between commands 319 master terminal transaction (CEMT) 3 messages interpreting 12 minutes calculated from midnight 194 mixed DBCS string 181 MKDIR command 257, 263, 273, 277 Month option of DA TE function 182 MSGLINE command 246 multi-way call 136, 165 multiple strings 78, 21 1 N nam[...]

  • Seite 474

    quotation marks around a literal string 6 in an instruction 6 R random number function of RANDOM 190 RDIR command 263 READ command 277 recursive call 136 reference 103 relative numeric pattern in parsing 77 relative positional patterns 207 RENAME command 264 Rename supplied Procedures 431 reordering data with TRANSLA TE function 195 repeating a str[...]

  • Seite 475

    subkeyword 120 subroutine comparison to a function 57, 70 description 57 protecting variable 62 writing 58 subsidiary list 142, 155 SUBSTR 192 substring 192 suggested readings xix symbols and strings in DBCS 396 SYNONYM command 254 syntax 387 rules of REXX 6 SYNT AX condition of SIGNAL instruction 226, 228 SYSSBA command 201 system libraries 422 sy[...]

  • Seite 476

    454 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 477

    Sending your comments to IBM If you especially like or dislike anything about this book, please use one of the methods listed below to send your comments to IBM. Feel free to comment on what you regard as specific errors or omissions, and on the accuracy , organization, subject matter , or completeness of this book. Please limit your comments to th[...]

  • Seite 478

    456 CICS TS for VSE/ESA: REXX Guide[...]

  • Seite 479

    [...]

  • Seite 480

     SC34-5764-01[...]

  • Seite 481

    Spine information:  CI C S T S f o r V S E/ESA REXX Gui d e[...]