z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Syntax and Linkage Conventions for the Callable Services

z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
SA23-1397-00

All APPC/MVS callable services have a general calling syntax as follows:
CALL routine_name        (parameters,return_code)
Some specific calling formats for languages that can invoke the APPC/MVS callable services are:
COBOL
CALL “routine_name” USING parm1,parm2,...return_code
FORTRAN
CALL routine_name (parm1,parm2,...return_code)
C     
routine_name (parm1,parm2,...return_code)
PL/I   
CALL routine_name (parm1,parm2,...return_code)
REXX
ADDRESS LU62 “routine_name parm1 parm2...return_code”

or

ADDRESS LINKPGM “routine_name parm1 parm2...return_code”

For REXX, enclose the routine name and all parameters within one pair of single or double quotes. Parameters must be initialized to appropriate values. The host command environment resolves the parameter values. For more information, see z/OS TSO/E REXX Reference.

Assembler Call macro
CALL routine_name,(parm1,parm2,...return_code),VL
Callers must also use the following linkage conventions for all APPC/MVS services:
  • Register 1 must contain the address of a parameter list, which is a list of consecutive words, each containing the address of a parameter to be passed. The last word in this list must have a 1 in the high-order (sign) bit.
  • Register 13 must contain the address of an 18-word save area.
  • Register 14 must contain the return address.
  • Register 15 must contain the entry point address of the service being called.
  • If the caller is running in AR ASC mode, access registers 1, 13, 14, and 15 must all be set to zero.

On return from the service, general and access registers 2 through 14 are restored (registers 0, 1 and 15 are not restored).

Any high-level language that generates this type of interface may be used to invoke APPC/MVS callable services.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014