Overriding and Redirecting File

Input

and

Output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in the program. For example, if

the

RPG

device

name

 

is

PRINTER,

and

th

file

the

program connects to is not

a printer, the OS/400 system

ignore

print spacing and skipping specifications.

 

 

 

 

 

 

 

 

 

 

 

There are other file redirections

that the OS/400 system does

not

allo

cause

the

program to end. For example,

if

the

RPG

device

name

is

WO

and the EXFMT operation is specified

in

the

 

program,

 

the

program

is

st

actual

file

the program

connects to

is

not

a

display

or

ICF file.

 

In ILE, overrides are scoped to the activation group level, job

level

Overrides

that are scoped to the

activation

group

level

remain

in

eff

are deleted, replaced, or until the activation group in which they a

Overrides that are scoped to the

job level remain in effect

until

th

replaced,

or

until the

job in

which

they are specified ends. This i

the activation group in which the overrides were specified. Override

scoped to the call level remain in effect

until

they

are

deleted,

re

program or

procedure in

which

they

are

specified

ends.

 

 

 

 

 

The default scope for overrides is the activation group. For job-level OVRSCOPE(*JOB) on the override command. For call-level scope, specify OVRSCOPE(*CALLLVL) on the override command.

See theData Management manual for more detailed information on valid file rections and file overridesILE Concepts. also contains information about overrides and activation group vs. job level scope.

Example of Redirecting

File

Input

and Output

 

 

 

 

 

The

following

example

shows

the

use of

a

file override

at compilation

Assume that

you want to use an

externally

described file for a TAPE

does

not

have

field-level

description.

You

must:

 

1. Define a physical file named FMT1 with

one record format that cont

description

of each field in the

record format. The

record format

the data description specifications (DDS). For a tape device, the

described

file

should

contain only

one

record format.

 

2. Create the file named FMT1 with a Create Physical File CL command.

3.Specify the file name of QTAPE (which is the IBM-supplied device magnetic tape devices) in the RPG program. This identifies the file

described

(indicated

by

an E

in

position

22

of

the

file

descrip

and specifies the

device

name

SEQ in positions 36 through 42.

4. Use

an override

command–OVRDBF

FILE(QTAPE) TOFILE(FMT1)–at compila-

tion time to override the QTAPE

file name and use the

FMT1

file name

command causes the compiler to

copy in the external description of

file,

which

describes

the

record

format

to

the

RPG

compiler.

5.Create the RPG program using the CRTBNDRPG command or the CRTPGM command.

6. Call the program

at run

time. The

override

to file FMT1 should not b

while the program is running. If

the override is in effect, use

DLTOVR (Delete

Override)

before

calling the

program.

Note: You may need to use the CL command OVRTAPF before you call th program to provide information necessary for opening the tape f

274 ILE RPG for AS/400 Programmer's Guide

Page 298
Image 298
IBM AS/400 manual Input Output, Example of Redirecting, FMT1

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.