This

section

provides

some

examples

of how to

use

each

of

these R

The ILE RPG

for AS/400

Referenceprovides

more information on the *PSSR and

INFSR error

subroutines, on

the EXSR

operation

code,

and

on

the INFDS

PSDS

data structures.

 

 

 

 

 

 

 

Specifying Error Indicators or the 'E'

Operation

Code

Extender

 

 

 

 

 

 

 

 

 

 

 

 

Operation codes that allow an error indicator also allow

the

'E'

opera

extender.

The

CALLP

operation

also allows the 'E' extender

although

it

allow an error indicator. This provides two ILE RPG error handling met

essentially

the

same.

 

Either

an error indicator or the 'E' extender

handle the

exception

for

the

same

operation

code,

not

both.

 

 

 

Note:

 

If

an

error

indicator

or

 

and

'E'

extender

 

is

 

coded

 

on

an

ope

 

 

error

which

 

occurs

is

not related to the operation (for examp

 

 

index

error

 

on

a

CHAIN

operation),

any

error

indicator

 

or

'E'

ex

 

 

be

ignored.

The

error

would be

treated

like

any

other

progra

To

enable

the

RPG

error

indicator

handler,

you

specify

an

 

error

ind

tions

73

and

74

for

the

operation

codes

listed

 

in

Table 15

 

on

page

CALLP). If an exception occurs on the operation, the

 

indicator

is

set

priate data structure (PSDS or INFDS) is updated, and control returns

sequential instruction. You can then test the

indicator

to

determine

take.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To

enable

the

'E'

 

operation

code

extender

handler,

you

specify

an

'

any of the operation codes

in

 

Table 15 on

page 228.

Coding

 

the

'E'

e

affects the value returned by the built-in functions %ERROR and %STATU

exceptions. Before the operation begins, the value

returned

by

the

tions is set to zero. If

an exception occurs on the operation, th

these built-in functions are

updated accordingly, the appropriate dat

(PSDS

or

INFDS)

is

updated, and

control

returns to

the

next

sequential

You

 

can

then

use

these

built-in

functions

to

test

the

returned value

what

action

to

take.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Chapter 12. Handling Exceptions227

Page 251
Image 251
IBM manual Extender, This Section Provides Some Examples How to Use Each These R, ILE RPG For AS/400 Reference provides

AS/400 specifications

The IBM AS/400, now known as the IBM iSeries, is a midrange computer system that has been a cornerstone of enterprise computing since its introduction in 1988. Designed to provide a robust platform for business applications, the AS/400 is celebrated for its reliability, scalability, and integrated database capabilities.

One of the key features of the AS/400 is its Integrated Operating Environment, which blends hardware and software resources seamlessly. This integration allows businesses to execute diverse workloads, ranging from traditional applications to modern web-based services, all on a single platform. The operating system, OS/400 (now IBM i), offers a rich set of APIs and tools for developers, simplifying application development and management.

Another standout characteristic of the AS/400 is its built-in database, DB2 for i. This powerful relational database management system allows for efficient data handling and provides advanced features such as support for SQL, XML, and JSON, making it easier for businesses to manage their data and integrate it with other systems. The database's tight integration with the operating system enables high performance and security.

In terms of scalability, the AS/400 can accommodate small businesses as well as large enterprises, with the ability to support hundreds of users simultaneously. Its architecture allows for easy upgrades in hardware, meaning that organizations can scale their systems without replacing the entire infrastructure.

Security is another critical attribute of the AS/400. With a sophisticated security model, it offers built-in user authentication, access control, encryption, and auditing capabilities to protect data and applications from unauthorized access.

The AS/400 also supports multiple programming languages, including RPG, COBOL, Java, and PHP, giving organizations the flexibility to choose the development tools that best fit their needs. This diversity helps maintain legacy applications while also developing new ones that leverage modern technologies.

Moreover, the platform supports both traditional green-screen interfaces and modern graphical user interfaces, allowing organizations to transition smoothly into contemporary user experience paradigms.

Overall, the IBM AS/400 stands out as a resilient, flexible, and secure computing platform that enables organizations to effectively manage their business operations, streamline processes, and adapt to changing market demands. Its unique combination of integrated features and capabilities ensures that it remains relevant in today's fast-paced technology landscape.