IBM SC34-5764-01 Manual page 81

Cics transaction server for vse/esa
Table of Contents

Advertisement

instruction(s)
z=func1(arg1, arg2)
instruction(s)
EXIT
instruction(s)
RETURN
Both subroutines and functions can be internal (designated by a label) or external (designated by the
subroutine or function in the REXX File System/VSE Librarian sublibrary member name). The two
preceding examples illustrate an internal subroutine named sub1 and an internal function named func1.
IMPORTANT NOTE
Because internal subroutines and functions generally appear after the main part of the program,
when you have an internal subroutine or function, it is important to end the main part of the program
with the EXIT instruction.
The following illustrates an external subroutine named sub2.
MAIN
instruction(s)
CALL sub2
instruction(s)
...
...
...
sub2:
instruction(s)
RETURN
The following illustrates an external function named func2.
Writing Subroutines and Functions
Chapter 6. Writing Subroutines and Functions
59

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents