Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 11 Using User Builtin Routines : Programming Considerations

Programming Considerations
Acquiring and Releasing Storage
If your routine calls another program or requires working storage, in most cases use the z/OS GETMAIN and FREEMAIN macros to acquire and release the storage. In some high activity programs, GETMAIN and FREEMAIN can have significant overhead. In these cases, use the $SAVE macro to make use of storage in the TIBCO Object Service Broker transaction save stack.
Using the $SAVE Macro
Syntax
The syntax of the $SAVE macro is as follows:
label $SAVE length,BASEREG=reg
where:
 
The number of bytes of working storage required. This is in addition to the standard 80 bytes required for a 72 byte save area, followed by 8 bytes for stack control pointers.
Requirements
If you use $SAVE, you must:
The RETURN macro or other standard linkage conventions can be used to return to the caller of the routine.
Available Examples
Refer to the USRWTO sample program in <Link> “Samples Available” on page 163 and the USRBLTIN member of the ASM data set provided with TIBCO Object Service Broker for examples of using $SAVE.
$SAVE Macro Storage Usage
The $SAVE macro does the following:
Acquire storage of length length+80 and point Register 13 to it.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved