IBM AS/400 manual Use of Externally, Structures, Resolving Conversion Problems

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 425
Image 425
Use of Externally

Resolving Conversion Problems

¹In renaming an externally described data structure field or an e described file field

I* If the RPG III source

member contains only the source

I* statement describing field CHAR below, the Conversion

I* Aid is unsure how to convert it. This statement may be

I* a rename of an externally described data structure fiel￿d

I* which is converted to

a definition specification) or

I* a rename of an externally described file field)

I* (which is converted to an input specification).

I

CHARACTER

CHAR

 

Figure

 

204. RPG III Source with a renamed field

 

 

 

 

 

 

In the above two instances,

a

data structure is assumed and defin

 

tions are produced. A block

of

comments

containing

the

input

specifica

 

also

produced.

For

example,

the Conversion Aid will convert the source

 

Figure 203

on page 400

to

the code

shown

in Figure 205.

If

Input

spe

 

code

is

required,

delete

the definition specifications and blank ou

 

from

the

corresponding Input

specifications.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D* If the RPG III source member contains only the source

 

 

 

 

 

 

 

D* statements describing fields FIELD1 and FIELD2 below, t￿he

 

 

 

 

 

 

 

D* Conversion Aid is unsure how to convert them. These

 

 

 

 

 

 

 

D* statements may be data structure fields (which are conve￿rted

 

 

 

 

 

 

D* to definition specifications) or program-described fil￿e

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

D FIELD1

 

 

 

1

3

 

 

 

 

 

 

 

 

 

 

D FIELD2

 

 

 

4

6

 

 

 

 

 

 

 

 

 

 

I*

 

 

 

 

 

 

 

1

3

FIELD1

 

 

 

 

 

 

 

 

I*

 

 

 

 

 

 

 

4

6

FIELD2

 

 

 

 

 

 

 

 

 

 

 

 

Figure

 

205. RPG IV source after converting source with input fields only

 

 

 

Remember

that

you

have

two

ways of correcting

these

types of

pro

 

use

the

EXPCPY(*YES)

 

option

of

the

CVTRPGSRC

command,

or manually

correct

 

the

code

after

conversion.

 

 

 

 

 

 

 

 

Use of Externally

Described

Data

Structures

 

 

 

 

 

 

 

 

 

There

are two

problems

that

you may have to fix manually even thoug

 

the

EXPCPY(*YES)

option

on

the

CVTRPGSRC

command.

 

 

 

 

¹

The

merging

of

an

array

with

an

externally described DS

subfield

¹The renaming and initializing of an externally described DS subfiel These problems are related to the use of externally described dat

Because these problems will generate compile-time errors, you can use mation in the ILE RPG compiler listingILE andRPG forthe AS/400 Referenceto

correct them.

Appendix B. Using the RPG III to RPG IV401 Conversion Aid

Page 425
Image 425
IBM AS/400 manual Use of Externally, Structures, Resolving Conversion Problems