Variables Used within Method Subroutines

The variables that the PSL compiler uses are visible within the method subroutines. The requirements of the method logic determine which of these variables will be referenced. The list below contains variables typically useful for method programming.

PSL uses other variables and data structures as well. However, they should not be used because they may change as the compiler is enhanced and will not be protected for backward compatibility.

Example

set abc=rs.getCol(bal")

Variable Name

Description

Value in this Example

actual(1-n)

Actual parameter passed

"bal"

attrib(1-n)

Vptr<tab>class<tab>byref

<undef>, "bal" is literal

class

Return class of method

String

cmd

PSL command in scope

S

fset

"var" is under assignment scope

1

line

Source line number (1-n)

1

lptr

Current pointer in m2src()

1

mcode

Current generated code for this line

<tab>S<space>

methods(reference)

Local history of methods used

 

msrc

Line number of last output line

0

objectLevel

Scope level of "objectName"

1

objectName

Name of object identifier

Rs

objectScope

Formal, Literal, New, Public

New

oLvn

Object storage array name

Vobj

postCond

Post conditional expression

<Null>

postProc(n)

Post-processor command to execute after first pass of compiler

Generated within method code, if required

reClass

Record<class> prefix

Record

reference

Method reference

Rs.getCol()

return

M expression to append to mcode

$P(vobj(rs),$C(9),1)

subRout

The current subroutine name

 

tab

The <tab> character

 

var

Variable name to assign unless void

Abc

varLevel

Scope level of "var"

1

 

 

image\msgs.gif

The actual() array will contain a value for every formal parameter defined in the method interface. The value will be <null> if a parameter was not provided. The attrib() array contains entries for parameters passed as variables but not for literal strings.