Many
Manuals
search
Categories
Brands
Home
IBM
Software
AS/400
User Manual
IBM AS/400 User Manual Page 304
Download
Share
Sharing
Add to my manuals
Print
Page
/
489
Table of contents
BOOKMARKS
Rated
.
/ 5. Based on
customer reviews
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
482
483
484
485
486
487
488
489
SRTSEQ/ALTSEQ
280
ILE
RPG
for
AS/400
Programmer's
Guide
1
2
...
299
300
301
302
303
304
305
306
307
308
309
...
488
489
ILE RPG for AS/400
1
Programmer's Guide
1
Third Edition (May 1999)
4
Contents
5
Trademarks and Service Marks
14
Notices xiii
15
About This Guide
17
How to Send Your Comments
18
What's New This Release?
19
About This Guide xix
21
About This Guide xxi
23
ILE RPG Introduction
25
RPG IV Specifications
27
Cycle Programming
28
Subprocedure logic
29
Indicators
29
Operation Codes
30
Example of an ILE RPG Program
30
1 6 10 16
31
The Entire Source Program
34
Using the OS/400 System
36
Interacting with the System
36
AS/400 Tools
37
AS/400 Tools
38
AS/400 Tools
39
Program Creation
41
RPG Programming in ILE
42
Program Management
43
Program Call
43
Source Debugging
44
Bindable APIs
44
Multithreaded Applications
45
OPM-Compatible Application
47
Effect of ILE
48
Related Information
49
Advanced Application Scenario
54
A Strategy to Avoid
55
A Strategy to Avoid
56
Procedures
57
Prototyped Calls
58
Multiple Procedures Module
59
The Entire ARRSRPT Program
65
Figure 24. DDS for CUSTFILE
68
Coding Considerations
69
General Considerations
69
Program Creation
70
Main Procedure Considerations
70
Subprocedure Considerations
70
For Further Information
71
Main Procedures
71
Subprocedures
71
Prototyped Call
72
Concepts
73
ADTS/400: Programming
75
Development Manager
75
Using SEU
76
Using SEU
77
Using SQL Statements
79
Using SQL Statements
80
Using the CRTBNDRPG Command
81
Display spooled files
85
Using a Compiler Listing
87
Obtaining a Compiler Listing
87
Customizing a Page Heading
88
Customizing the Spacing
89
Correcting Compilation Errors
90
Using a Compiler Listing
91
Correcting Run-time Errors
92
CRTPGM Commands
97
Using the CRTRPGMOD Command
98
Creating a NOMAIN Module
99
Creating a Module Object
100
Creating a Module Object
101
Additional Examples
104
Related CL Commands
104
Using the CRTPGM Command
106
Binding Multiple Modules
108
Using a Binder Listing
109
Changing a Module or Program
110
Using the UPDPGM Command
111
Removing Observability
112
CL Reference (Abridged)
113
Service Program Overview
115
ILE Concepts
116
Reference (Abridged)
116
Changing A Service Program
117
Related CL commands
117
Sample Service Program
118
Sample Service Program
119
Sample Service Program
120
Creating the Service Program
121
Binding to a Program
122
Updating the Service Program
124
Sample Binder Listing
124
Chapter 9. Running a Program
127
CL Programming
128
Figure 48. DDS for EMPRPT2
130
Ending an ILE Program
133
Managing Activation Groups
133
Managing Activation Groups
134
Managing Activation Groups
135
Deleting an Activation Group
136
Reclaim Resources Command
136
CL Reference
137
(Abridged)
137
Heap Storage Problems
142
System API Reference
144
Calling Programs
152
Calling Procedures
152
The Call Stack
153
Recursive Calls
154
Using a Prototyped Call
157
Using the CALLP Operation
157
Calling within an Expression
158
Examples of Free-Form Call
159
Passing Prototyped Parameters
159
Parameter Passing Styles
159
Passing by Value
160
Using Operational Descriptors
162
Omitting Parameters
163
Passing *OMIT
164
Leaving Out Parameters
164
Using %PARMS
165
4. Return
166
Order of Evaluation
170
Interlanguage Calls
170
Passing By Reference
171
Passing By Value
171
Examples of CALL and CALLB
174
Using the PLIST Operation
175
Normal End
176
Abnormal End
177
Returning from a Subprocedure
178
Using Bindable APIs
179
Calling a Graphics Routine
180
Calling Special Routines
181
Multithreading Considerations
181
Figure 74. Deadlock Example
184
¹ Obtain a dump
185
The ILE Source Debugger
187
Debug Commands
188
The ILE Source Debugger
189
Creating a Root Source View
191
Creating a COPY Source View
192
Creating a Listing View
192
Creating a Statement View
193
STRDBG Example
195
Setting Debug Options
195
OPM source debug support
196
Program/module
197
Viewing the Program Source
198
Viewing a Different Module
199
Changing the View of a Module
200
BREAK line-number
203
CLEAR line-number
203
DISPLAY MODULE module-name
203
Condition
206
BREAK Command
207
procedure-name
209
statement-number
211
CLEAR PGM
212
Characteristics of Watches
213
Setting Watch Conditions
214
Displaying Active Watches
216
Removing Watch Conditions
216
following
217
Stepping Over Call Statements
219
Stepping Into Call Statements
220
Displaying Data Structures
227
Displaying Indicators
228
Displaying UCS-2 Data
230
Changing the Value of Fields
232
EQUATE DC EVAL COUNTER
235
DISPLAY EQUATE
235
Exception Handling Overview
241
which is active on
243
ILE RPG Exception Handling
244
Exception Handling Overview
245
Using Exception Handlers
247
Exception Handler Priority
247
Nested Exceptions
247
Unhandled Exceptions
247
Using Exception Handlers
248
Using Exception Handlers
249
Optimization Considerations
250
Using RPG-Specific Handlers
250
ILE RPG for AS/400 Reference
251
Using an Error Subroutine
252
ILE Condition Handlers
262
Using a Condition Handler
262
ILE Condition Handlers
263
ILE Condition Handlers
264
Using Cancel Handlers
268
Chapter 13. Obtaining a Dump
275
Example of a Formatted Dump
276
Feedback Areas
277
Example of a Formatted Dump
279
.L/ Optimization level
281
not in the order
282
Chapter 14. Defining Files
285
The SEQ Device
286
Naming Files
287
Types of File Descriptions
287
Types of File Descriptions
288
Renaming Record-Format Names
290
Renaming Field Names
290
Ignoring Record Formats
290
Using Output Specifications
293
Level Checking
294
Data Management
295
File Locking
299
Record Locking
300
Sharing an Open Data Path
301
Spooling
302
Output Spooling
303
SRTSEQ/ALTSEQ
304
Database Files
305
Data Files and Source Files
305
Record Format Specifications
306
Access Path
306
Valid Search Arguments
310
Referring to a Partial Key
310
ILE RPG for
311
AS/400 Reference
311
Indexed File
312
Exception/Error Handling
313
Sequential File
314
Record Address File
314
Limits Records
315
Relative Record Numbers
315
Consecutive Processing
316
Sequential-by-Key Processing
317
This example is the
320
In this example, the
321
Random-by-Key Processing
323
Valid File Operations
328
Valid File Operations
329
Valid File Operations
330
Using Commitment Control
331
Commitment Control Locks
332
Commitment Control Scoping
332
Using the COMMIT Operation
333
Using Commitment Control
334
Using Commitment Control
335
DDM Files
336
Using Pre-V3R1 DDM Files
337
DDM Files
338
Types of Device Files
339
Accessing Printer Devices
340
Specifying PRINTER Files
340
Handling Page Overflow
340
Accessing Printer Devices
341
Accessing Printer Devices
342
Specifying Fetch Overflow
346
Accessing Tape Devices
349
Accessing Display Devices
350
Using Sequential Files
350
Specifying a Sequential File
350
Using SPECIAL Files
351
Using SPECIAL Files
352
Using SPECIAL Files
353
ICF Programming
355
DDS Reference
355
Input fields
356
Output fields
356
Output/input (both) fields
356
Using Subfiles
359
RECNO field name
360
Reference
360
Use of Subfiles
361
Output Specifications
363
Input Specifications
364
Calculation Specifications
364
Additional Considerations
364
Valid WORKSTN File Operations
365
EXFMT Operation
366
READ Operation
366
WRITE Operation
366
Multiple-Device Files
366
Multiple-Device Files
367
Multiple-Device Files
368
Database Physical File
369
Main Menu Inquiry
370
CUSMAIN: RPG Source
371
Main Menu Inquiry
372
File Maintenance
373
File Maintenance
374
CUSMNT: RPG Source
376
Search by Zip Code
382
Search by Zip Code
383
Search by Zip Code
384
SCHZIP: RPG Source
385
Search and Inquiry by Name
388
Search and Inquiry by Name
389
SCHNAM: RPG Source
390
Search and Inquiry by Name
392
Appendixes
395
Compiling
397
DBCS Data in Character Fields
401
Conversion Overview
403
File Considerations
404
The Log File
405
Converting Your Source
406
The CVTRPGSRC Command
407
Converting Your Source
408
Converting Your Source
409
Performing a Trial Conversion
412
Obtaining Conversion Reports
413
Example of Source Conversion
414
Analyzing Your Conversion
417
Using the Conversion Report
418
Analyzing Your Conversion
419
Using the Log File
420
Resolving Conversion Problems
422
Unsupported RPG III Features
422
Merging Problems
423
Context-Sensitive Problems
424
Run-time Differences
427
Using CL Commands
429
CRTBNDRPG Command
430
CRTBNDRPG Command
431
CRTBNDRPG Command
432
CRTRPGMOD Command
444
CRTRPGMOD Command
445
CRTRPGMOD Command
446
Appendix D. Compiler Listings
447
Reading a Compiler Listing
448
Prologue
448
Compiler Listings
449
Source Section
450
Compiler Listings
452
Output Buffer Positions
456
/COPY Member Table
456
Compile-Time Data
457
Key Field Information
458
Cross-Reference Table
458
External References List
459
Message Summary
460
Final Summary
460
Bibliography
463
Bibliography 441
465
Special Characters
467
Numerics
467
See also
468
(continued)
469
Index 447
471
Index 449
473
Index 453
477
Index 459
483
Index 463
487
Comments to this Manuals
No comments
Publish
Related products and manuals for Software IBM AS/400
Software IBM CISCO R2E2 User Manual
(110 pages)
Software IBM NETCOOL 4.3-W User Manual
(516 pages)
Software IBM Server OS/390 User Manual
(76 pages)
Software IBM Switch 15 User Manual
(270 pages)
Software IBM SC34-7012-01 User Manual
(268 pages)
Software IBM SC41-5420-04 User Manual
(116 pages)
Software IBM Transaction Server OS User Manual
(103 pages)
Software IBM SC34-5764-01 User Manual
(481 pages)
Software IBM TIVOLI SC32-0129-00 User Manual
(82 pages)
Software IBM G325-2585-02 User Manual
(90 pages)
Software IBM SG24-6526-00 User Manual
(184 pages)
Software IBM SC33-1686-02 User Manual
(317 pages)
Software IBM 5697-VM3 User Manual
(6 pages)
Software IBM Frozen Dessert Maker VERSION 9 User Manual
(109 pages)
Software IBM DS6000 User Manual
(406 pages)
Software IBM CDI5UG1107 User Manual
(178 pages)
Software IBM GC28-1982-02 User Manual
(216 pages)
Software IBM 12.1(22)EA6 User Manual
(550 pages)
Print document
Print page 304
Comments to this Manuals