Resolving Conversion Problems

There are two methods of correcting this type of problem:

1. Use

the EXPCPY(*YES) option of the CVTRPGSRC command

to include all

/COPY

members in the converted RPG IV source member.

This

approach is easy and will work most of the

time. However, incl

/COPY members in each source member reduces the maintainability of application.

2. Manually correct the code

after

conversion using the information in

RPG compiler listing andILE theRPG

for

AS/400 Reference.

Other examples of this type of problem include:

¹Line Specifications and Record Address Files

In RPG III the line counter specification and the Record Addres

 

extension specification are changed to keywords

(RAFDATA, FORMLEN,

and

 

FORMOFL) on the file description specification.

If the content of a

 

member

contains

only

the

line

counter

specification

and/or

the

 

Record

 

File of the extension specification but not the corresponding file

 

specification,

the

Conversion

Aid

does

not

 

know

where

to

insert

the

¹

Extension

Specification

Arrays

and

Data

Structure

Subfields

 

 

 

 

 

As mentioned in “Example of Source Conversion” on

page 390,

you

are

not

 

allowed

to define a standalone array

and

a

data

structure

subfiel

 

same name in RPG IV. Therefore, as

 

shown

in

the

example

TEST1

(

 

 

Figure 195 on

page 392),

the Conversion

 

Aid

 

must

merge

these

two

defi

 

nitions.

However,

if the

array

and

the

data

structure

subfield

ar

 

same source member (that is, one or

both

is

in a /COPY member), th

 

cannot take

place

and

a

compile-time

error

will

result.

 

 

 

 

 

¹

Merged

compile-time

array

and

compile-time

data

(**)

records

 

 

 

 

As shown

in

the

example

TEST1

(

Figure 195

 

on

page 392),

if

compile-time

 

arrays

are merged with data structure subfield

definitions,

 

the

lo

 

data may be affected. To overcome this problem, compile-time array

 

changed to the new **CTDATA format if at least

one compile-time array

 

merged.

However, if the arrays and

 

the

 

data

do

 

not

reside

in

th

 

file (that is, one or both is in a

COPY

member)

the

naming

of comp

 

records

using

the

**CTDATA

format

cannot

proceed

properly.

 

 

 

 

Context-Sensitive Problems

In RPG III, there are occasions when it is impossible to determine ifications in a /COPY member without the context of the surrounding spe of the primary source member. There are two instances of this proble

¹ In data structure subfields or program-described file fields

I* If the RPG III source member contains only the

source

I* statements describing fields FIELD1 and

FIELD2

below, t￿he

I* Conversion Aid is unsure how to convert

them.

These

I* statements may be data structure fields

(which

are

conve￿rted

I* to definition specifications) or program-described

fil￿e

I* fields (which are converted to input specifications).

I

1

3

FIELD1

 

I

4

6

FIELD2

 

 

 

 

Figure 203.

RPG III /COPY file with input fields only

 

400 ILE RPG for AS/400 Programmer's Guide

Page 424
Image 424
IBM AS/400 manual Context-Sensitive Problems, Members in the converted RPG IV source member, Comp, Records Using

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.