z/OS TSO/E Guide to SRPI
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Creating a CPRB for the DEFSERV or SENDREQ Macro

z/OS TSO/E Guide to SRPI
SA32-0980-00

Before issuing the DEFSERV or SENDREQ macro, a program must create a CPRB. To create a CPRB, you can use the CHSDCPRB macro with the following syntax:
[label] CHSDCPRB DSECT=NO
Note: If the program is reentrant, use the GETMAIN macro to obtain storage for the CPRB.

For an example of using the CHSDCPRB macro with DEFSERV, see Sample Initialization/Termination Program.

For an example of using the CHSDCPRB macro with SENDREQ, see Sample Servers.

A program can use the same CPRB repeatedly to define multiple servers or send multiple requests. Therefore, a program only needs to issue the CHSDCPRB macro once to create one CPRB.

If you use the CHSDCPRB macro to obtain storage for the CPRB dynamically, the storage is freed when the program ends. If you use the GETMAIN macro to obtain storage, you must use the FREEMAIN macro to release it.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014