IBM AS/400 manual Using the PLIST Operation, the Fixed-Form Call Operations

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 175
Image 175

 

 

 

 

Using

the Fixed-Form Call Operations

If

insufficient

parameters

are

specified when calling a procedure,

when

an

unresolved

parameter

is

used by the called procedure. To a

you

can

either:

 

 

 

¹Check %PARMS to determine the number of parameters passed. For an example using %PARMS, see “Checking for the Number of Passed Parameters” on page 141.

¹Specify *OMIT in the result field of the PARM operations of the parameters. The called procedure can then check to see if the been omitted by checking to see if the parameter has value of %ADDR(parameter) = *NULL. For more information, refer to “Omitting Parameters” on page 139.

Keep in mind the following when specifying a PARM operation:

¹

One

or

more PARM

operations

must

immediately

follow

a

PLIST

operation.

¹

One or more PARM operations can immediately

follow

a

CALL

or

CALLB ope

 

ation.

 

 

 

 

 

 

 

 

 

¹

When

a

multiple

occurrence

data

structure

is specified in the R

 

PARM operation, all occurrences of the data

structure

are

passed

 

field.

 

 

 

 

 

 

 

 

 

¹Factor 1 and the Result field of a PARM operation cannot contain

look-ahead field, a named constant, or a user-date reserved word.

¹ The following rules apply to *OMIT for non-prototyped parameters:

– *OMIT

is only

allowed

in

PARM

operations that immediately follows a

CALLB

operation

or in

a

PLIST

used with a CALLB.

Factor 1 and Factor 2 of a PARM operation must be blank, if *O specified.

– *OMIT is not allowed in a PARM operation that is part of a *ENTR

¹ There are other restrictions that apply when using the PARM operat For a detailed description of these restrictions,ILE RPG for seeAS/400 the Reference.

For examples of the PARM operation see:

¹ Figure 47 on page 105

¹ Figure 42 on page 95

¹Figure 116 on page 239

Using the PLIST Operation

The PLIST operation:

¹Defines a name by which a list of parameters can be reference parameters is specified by PARM operations immediately following the operation.

¹Defines the entry parameter list (*ENTRY PLIST).

Factor 1 of the PLIST operation must contain the PLIST name. This name specified in the Result field of one or more call operations. If the entry parameter list of a called procedure, then Factor 1 must

Chapter 10. Calling Programs and Procedures151

Page 175
Image 175
IBM AS/400 manual Using the PLIST Operation, the Fixed-Form Call Operations