IBM AS/400 manuals

Owner’s manuals and user’s guides for Software IBM AS/400.
We providing 1 pdf manuals IBM AS/400 for download free by document types: User Manual


Ibm AS/400 User Manual (489 pages)


Brand: Ibm | Category: Software | Size: 1.86 MB |

 

Table of contents

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





More products and manuals for Software IBM

Models Document Type
CISCO R2E2 User Manual   IBM CISCO R2E2 User's Manual, 110 pages
NETCOOL 4.3-W User Manual   IBM NETCOOL 4.3-W User's Manual, 516 pages
Server OS/390 User Manual   IBM Server OS/390 User's Manual, 76 pages
Switch 15 User Manual   IBM Switch 15 User's Manual, 270 pages
SC34-7012-01 User Manual   IBM SC34-7012-01 User's Manual, 268 pages
SC41-5420-04 User Manual   IBM SC41-5420-04 User's Manual, 116 pages
Transaction Server OS User Manual   IBM Transaction Server OS User's Manual, 103 pages
SC34-5764-01 User Manual   IBM SC34-5764-01 User's Manual, 481 pages
TIVOLI SC32-0129-00 User Manual   IBM TIVOLI SC32-0129-00 User's Manual, 82 pages
G325-2585-02 User Manual   IBM G325-2585-02 User's Manual, 90 pages
SG24-6526-00 User Manual   IBM SG24-6526-00 User's Manual, 184 pages
SC33-1686-02 User Manual   IBM SC33-1686-02 User's Manual, 317 pages
5697-VM3 User Manual   IBM 5697-VM3 User's Manual, 62 pages
Frozen Dessert Maker VERSION 9 User Manual   IBM Frozen Dessert Maker VERSION 9 User's Manual, 109 pages
DS6000 User Manual   IBM DS6000 User's Manual, 406 pages
CDI5UG1107 User Manual   IBM CDI5UG1107 User's Manual, 178 pages
GC28-1982-02 User Manual   IBM GC28-1982-02 User's Manual, 216 pages
12.1(22)EA6 User Manual   IBM 12.1(22)EA6 User's Manual, 550 pages
Webcam R1 User Manual   IBM Webcam R1 User's Manual, 94 pages
Computer Hardware 2 User Manual   IBM Computer Hardware 2 User's Manual, 508 pages