IBM AS/400 Resolving Conversion Problems, Compilation Errors in Existing RPG III Code, Directive

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 422
Image 422
Resolving Conversion Problems

Resolving Conversion Problems

Resolving Conversion Problems

Conversion problems may arise for one or more of the following reasons:

¹ The RPG III source has compilation errors

¹ Certain features of the RPG III language are not supported by R

¹ One or more /COPY compiler directives exists in the RPG III sourc

¹ Use of externally described data structures

¹Behavioral differences between the OPM and ILE run time

Each of these areas is discussed in the sections which follow.

Compilation Errors in Existing RPG III Code

The Conversion Aid assumes that you are attempting to convert a valid R program, that is, a program with no compilation errors. If this is not unpredictable results may occur during conversion. If you believe your contains compilation errors, compile it first using the RPG III compiler any errors before performing the conversion.

Unsupported RPG III Features

A few features of the RPG IIInot supportedlanguage arein RPG IV. The most notable of these are:

¹ The auto report function

¹ The FREE operation code

¹The DEBUG operation code

Since the

auto

report

function

is

not supported,

the

Conversion

Aid

will

ically expand these programs (that

 

is,

call

auto report)

prior to

perf

version

if

the

type

is

RPT

or

RPT38.

 

 

 

 

 

 

 

You

must

replace

the

 

FREE or DEBUG operation code with equivalent logic

before

or

after

conversion.

 

 

 

 

 

 

 

 

 

 

If

you

 

specify

the

 

CVTRPT(*YES) option on the CVTRPGSRC command, you will

receive

 

a

conversion

report

that identifies

most

of

these types

of

For

further

information

 

on

converting

auto

report

members, see

“Converting

Report

Source

Members”

on

page 389.

For

further

information

on

differenc

between

 

RPG

III

and

RPG

IV,

see

Appendix A,

“Behavioral

Differences

OPM

RPG/400

and

ILE

RPG

 

for

AS/400”

on

page 373.

 

 

 

 

 

Use of the /COPY

Compiler

Directive

 

 

 

 

In

some

cases,

errors

will not

be found

until you actually compile the

RPG

IV source. Conversion errors of this

type are usually related to

/COPY

compiler directive.

These

errors fall

into two categories: merging

and

context-sensitive problems. Following is

a

discussion of why these pr

occur

and how

you might

resolve

them.

 

 

398 ILE RPG for AS/400 Programmer's Guide

Page 422
Image 422
IBM AS/400 manual Resolving Conversion Problems, Compilation Errors in Existing RPG III Code, Unsupported RPG III Features