z/OS Cryptographic Services ICSF System Programmer's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Writing a service stub

z/OS Cryptographic Services ICSF System Programmer's Guide
SA22-7520-17

Besides writing the callable service itself, you must write a service stub, which is the connection between the application program and the installation-defined service. In an application program, you call the service stub, which accesses the installation-defined service. The service stub can be any name you choose to call it.

The service stub must:

  • Check that ICSF is active.
  • Place the service number for the installation-defined callable service into register 0.
  • Call the IBM-supplied processing routine, CSFAPRPC.

CSFAPRPC is used to access the callable services on ICSF. In the service stub, you must call CSFAPRPC. ICSF stores the address of the CSFAPRPC entry point in the CCVTPRPC field of the ICSF cryptographic communication vector table (CCVT). If running in a CICS address space, then, after you call CSFVCCPP, the system calls the callable service that corresponds to the service number in register 0. The Cryptographic Communication Vector Table (CCVT) describes the format of the CCVT.

The contents of the registers on entry to the service stub are:

Register 0
Unpredictable
Register 1
Address of the parameter list
Register 2-13
Unpredictable
Register 14
Return address
Register 15
Service stub entry point address

The contents of the registers on exit from the service stub are:

Register 0
Reason code
Register 1-14
Same as on entry
Register 15
Return code

To run an installation-defined callable service, an application program calls the service stub. You must link-edit the service stub with the application program that calls the service stub. Any application program that calls a service stub must be link-edited with the service stub.

To call an installation-defined service from an application program, use this statement:

   CALL  <service-stub-name> <service-parameters>

The service-stub-name is the name of the service stub for the installation-defined callable service. The service-parameters are the parameters you want to pass to the installation-defined service. You supply the parameters according to the syntax of the programming language that you use to write the application program.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014