18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2. Common Bank Call Using I$BJ<br />

<strong>SYSLIB</strong> Access Methods<br />

The I$BJ calling sequence is the preferred method of calling the <strong>SYSLIB</strong> common bank<br />

routines. For the <strong>SYSLIB</strong> routines with a calling procedure, this is the type of call that is<br />

generated when the calling program sets the parameter on the call to access the<br />

common bank version of the routine. This method provides a much more flexible means<br />

of using the <strong>SYSLIB</strong> routines than the Auto Switch method or explicitly coding an LIJ<br />

instruction, and it retains all the advantages associated with using the common bank<br />

version of the routines. That is, the calling program remains small because the <strong>SYSLIB</strong><br />

routines do not become an actual part of the calling program absolute. In addition, the<br />

calling program will automatically reference new versions of the <strong>SYSLIB</strong> routines as they<br />

are installed without the need for the calling program to be recompiled or re-collected.<br />

Another advantage to using the I$BJ calling sequence is that the calling program can<br />

switch between using the common bank version of the routines and the relocatable<br />

version of the routines by re-collecting the program with the proper collector EQU<br />

directives. A recompilation of the calling program is unnecessary; only a recollection is<br />

needed. For example, if the following call to the MFDSP$ routine were in a program, the<br />

common bank version of the MFDSP$ routine would be used.<br />

M$FDSP,'CB' PKTLENGTH,PKTADDR,FUNCCODE<br />

To force the program to use the relocatable version of the MFDSP$ routine, it would only<br />

be necessary to re-collect the program with the following Collector directives included:<br />

IN MFDSP$<br />

EQU CBMFDSP$/MFDSP$<br />

The Collector directive EQU forces the tag CBMFDSP$ to be evaluated as MFDSP$. An<br />

explicit inclusion of the element that contains the entry point MFDSP$ (in this case the<br />

element name is MFDSP$) is necessary to avoid errors during the collection. Appendix<br />

E lists the names of all the common banks and relocatable entry points and the names of<br />

the <strong>SYSLIB</strong> elements that include them. After the collection, the <strong>SYSLIB</strong> routine<br />

MFDSP$ is an integral part of the new absolute program. This adds about 1,000 words<br />

to the size of the absolute element.<br />

Programs that originally call the relocatable version of a <strong>SYSLIB</strong> routine, for example<br />

I$BJ X11,RFTI$ . BSP$, read file table index<br />

and that wish to call the common bank version of the routine need the following<br />

collector directives:<br />

IN CBEP$$<strong>SYSLIB</strong><br />

EQU RFTI$/CBRFTI$<br />

The Collector directive EQU forces the tag RFTI$ to be evaluated as CBRFTI$. The<br />

explicit inclusion of the element CBEP$$<strong>SYSLIB</strong> is necessary to resolve the reference to<br />

CBRFTI$. The element CBEP$$<strong>SYSLIB</strong> contains all the common bank entry point names<br />

and must be explicitly included in collections that use the EQU directive to switch from<br />

the relocatable version of a <strong>SYSLIB</strong> routine to the common bank version of the routine.<br />

7833 1733–004 3–3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!