IBM AS/400 manual Inserting Specification Templates, a Data, Example of Source Conversion, with

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 414
Image 414
Example of Source Conversion

Example of Source Conversion

Converting Source Members

with

 

Embedded

SQL

 

 

 

 

 

 

 

 

 

 

 

 

When converting code that contains embedded

SQL and the SQL code is

c

tinued

over

 

multiple

lines, the following will occur:

 

 

 

 

 

 

 

¹

If

there

are

continuation

lines

but

column

74

is

blank,

the line is

 

to

the

ILE

member.

 

 

 

 

 

 

 

 

 

 

 

 

 

Note:

This

could

be a problem if column 74

happens

to

be

a

blank

c

 

 

inside

a character

string.

 

 

 

 

 

 

 

 

 

 

¹

If

column

74

is

not

blank,

all of

the

SQL

code

from

that

line

to

th

 

will

be

concatenated

and

copied

to the ILE member

filling

up

all

80

this occurs:

– Any

comments in column 75

on,

will

be

ignored.

 

– Any embedded comment lines

(C*)

will

be

copied to the

ILE member

the

concatenated code

is

copied.

 

 

 

– Problems could arise if

DBCS literals

are split.

 

If you do not want this

concatenation

and

re-formatting

to occur, e

column

74 is blank.

 

 

 

 

 

 

Inserting Specification Templates

Because the source specifications for RPG IV are new, you may want specification templates inserted into the converted source. To have te inserted, specify INSRTPL(*YES) on the CVTRPGSRC command. The default is INSRTPL(*NO).

Converting Source from

a Data

File

 

 

 

 

 

 

 

The

Conversion

Aid

will

convert

source from a data file. Because data

ally

do

not

have

sequence

numbers, the

minimum record

length

of the fi

placing the converted output is 80 characters. (See Figure 193 on page

recommended record length

is

100 characters for a data file.

Note:

If

your data

file

has

sequence

numbers, you

should

remove them

 

running

the

Conversion

Aid.

 

 

 

 

Example of Source Conversion

The

example shows a sample RPG

III

source member

which is to be c

RPG

IV. Figure 194 on page 391

shows

the source of

the RPG III ve

390 ILE RPG for AS/400 Programmer's Guide

Page 414
Image 414
IBM AS/400 manual Inserting Specification Templates, a Data, Example of Source Conversion, Converting Source from, with