IBM SC33-1683-02 Server User Manual


 
An example showing how to build a parameter list incrementally
In the following example, the parameter list is built incrementally. The initialization of
the parameter list (using the CLEAR option), the building of the parameter list, and
the GETMAIN call are separated into discrete steps.
*************************************************************************
* Issue the DFHSMMCX macro call, specifying: *
* *
* CALL -- the macro is to be called immediately. *
* *
* CLEAR -- initialize the parameter list before inserting values. *
* *
* IN -- input values follow. *
* *
* FUNCTION(FREEMAIN) -- release storage *
* ADDRESS((R6)) -- address of storage is in register 6. *
* STORAGE_CLASS(USER) -- class of acquired storage was *
* 31-bit user storage. *
* *
* OUT -- output values follow *
* *
* RESPONSE(*) -- put response at SMMC_RESPONSE in *
* macro parameter list. *
* REASON(*) -- put reason at SMMC_REASON in macro *
* parameter list. *
* *
*************************************************************************
*
DFHSMMCX CALL, +
CLEAR, +
IN, +
FUNCTION(FREEMAIN), +
ADDRESS((R6)), +
STORAGE_CLASS(USER), +
OUT, +
RESPONSE(*), +
REASON(*)
* *
*************************************************************************
* Test SMMC_RESPONSE -- if OK, then branch round error handling. *
*************************************************************************
* *
CLI SMMC_RESPONSE,SMMC_OK CHECK RESPONSE AND...
BE STEND ...IF OK, BYPASS ERROR ROUTINES
* *
.
.
.
error-handling routines
.
.
.
*
*************************************************************************
* Restore registers, set return code, and return to user exit handler *
*************************************************************************
* *
STEND DS 0H
L R13,UEPEPSA
RETURN (14,12),RC=UERCNORM
LTORG
END GXPI
Figure 11. Global user exit program with XPI (Part 5 of 5)
XPI examples
Chapter 3. The user exit programming interface (XPI) 297