HP 3000 Manuals

Switch Stubs [ HP COBOL II/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Programmer's Guide

Switch Stubs 

A switch stub is a program that allows your Native Mode HP COBOL II/XL
program to call a subprogram compiled in Compatibility Mode.  You do not
have to change or recompile your program or the subprogram.

Figure 4-1  shows how a switch stub works.  When the program calls the
subprogram, what actually happens is that the program calls the switch
stub and the switch stub calls the subprogram.  This is transparent to
the program and subprogram, except that performance is slower.

[]
Figure 4-1. How a Switch Stub Works You must write a switch stub for each Compatibility Mode subprogram that your program calls. You can create Pascal switch stubs using the Switch Assist Tool (SWAT). SWAT is an interactive utility. See "Calling Subprograms Written in SPL" for an example that uses SWAT. For complete information on SWAT, see the Switch Programming User's Guide.


MPE/iX 5.0 Documentation