A basic subroutine is defined with

Subroutine Name(SUBNAME)

and called with

Execute Subroutine(SUBNAME)

So far, so good.

Of course, parameters can be defined

Subroutine Name(SUBNAME) Parms(PARAMETERS)

where PARAMETERS is a list of parameters, of either


*BOTH is default and means that the parameters is used in the call (“received”) and may be changed by the subroutine (“returned”). *RECEIVED means that it is read only and will not be returned into the caller’s parameter list. All parameters are required so the subroutine interface is rather strict.

The subroutine is then called with

Execute Subroutine(SUBNAME) With_Parms(PARAMETERS)

Local variables, sorry, fields, are defined with DEFINE. More on that, later.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s