IBM AS/400 manual Converting All Members in a File, Performing a Trial Conversion

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 412
Image 412

Converting Your Source

Converting All Members in a File

You can convert all of the members in a source physical file by spe FROMMBR(*ALL) and TOMBR(*FROMMBR) on the CVTRPGSRC command. The

Conversion Aid will attempt to convert all members in the file specified. member should fail to convert, the conversion process will still continue.

For

example, if you want to

convert all source members in the file QRP

the

file QRPGLESRC, you would

enter:

CVTRPGSRC FROMFILE(OLDRPG/QRPGSRC)

FROMMBR(*ALL)

TOFILE(NEWRPG/QRPGLESRC)

TOMBR(*FROMMBR)

This command converts all of the source members in library OLDRPG in the physical file QRPGSRC. The new members are created in library NEWRPG in source physical file QRPGLESRC.

If

you prefer to

keep all source

(DDS source, RPG source, etc.) in

you can still convert the RPG source

members in one step, by specifyi

FROMMBR(*ALL). The Conversion Aid

will only

convert members with a valid RPG

type

(see Table 30

on page

380).

 

Converting Some Members

in

a File

 

 

 

 

 

 

 

 

If

you

need

to convert only some members that

are

in

a source

physi

these members

share

a

common prefix in

the

member

name,

then you

can

them

by

specifying

the

prefix followed

by

an

* (asterisk).

 

For example, if you want to convert all members with a prefix of PAY, enter:

CVTRPGSRC FROMFILE(OLDRPG/QRPGSRC)

FROMMBR(PAY*)

TOFILE(NEWRPG/QRPGLESRC)

TOMBR(*FROMMBR)

This command converts all of the source members in library OLDRPG in the physical file QRPGSRC. The new members are created in library NEWRPG in source physical file QRPGLESRC.

Performing a Trial Conversion

You can

do

a

trial run

for

any

source member that you suspect you

lems converting. You will then

get

a conversion report for the converted

member

that

may

identify

certain

conversion errors.

For example, to perform a trial conversion on the source member PAYROLL,

CVTRPGSRC FROMFILE(OLDRPG/QRPGSRC)

FROMMBR(PAYROLL)

TOFILE(*NONE)

The

TOMBR parameter should be specified as *FROMMBR. However, since

thi

the

default, you do not need to specify it unless the default

value

changed. The CVTRPT parameter should be specified as *YES — this is a default. If it is not, then the conversion will stop immediately.

388 ILE RPG for AS/400 Programmer's Guide

Page 412
Image 412
IBM AS/400 manual Converting All Members in a File, Performing a Trial Conversion, Converting Your Source