Program Execution


SUNDB86x Only

 

The required object code routines for most PL/B instructions are incorporated in two libraries. The SUNDB86M.LIB library, that is only included with the SUNDB86M compiler, is a library of linkable modules to be extracted by the link process for inclusion into the generated program. The SUNDBSYx.EXE library supplied with all compilers is a run-time library that can be loaded into memory and is then accessible to any program that calls it.

 

Generated programs can be one of two types: Resident or Stand-alone. The difference is that Resident programs require SUNDBSYx to be resident in memory in order to execute, while Stand- alone programs have all the necessary object code routines linked in and therefore can be executed without needing access to SUNDBSYx. SUNDB86A can only generate Resident programs, while SUNDB86M can generate either Resident or Stand-alone ('C' option programs). Since all necessary object code modules must be linked into a Stand-alone program in order for it to execute, Resident programs (that call SUNDBSYx to perform the actual operations) are significantly smaller in size once compiled.

 

Resident programs access the SUNDBSYx library through a user defined Interrupt. In the event there is a conflict with the default Interrupt as supplied by Sunbelt, it can be changed through the supplied TESTCRT program (see TESTCRT and Interrupt Number).

 

SUNDBSYx can be used in three manners: Memory Resident, Command Mode or Interpretive Fashion:

 

Memory Resident, usage of SUNDBSYx is accomplished by executing SUNDBSYx directly from an operating system command line without specifying a SUNDB86x generated program to initiate. SUNDBSYx then executes, loading itself into memory before returning control to the user.

 

Command Mode allows SUNDBSYx to be unloaded, by forward loading another copy of COMMAND.COM. This is accomplished with the '-e' option. To then unload SUNDBSYx, you enter 'EXIT' at the system prompt. This option suspends a currently executing batch file.

 

Using SUNDBSYx in an Interpretive Fashion allows SUNDBSYx to be loaded for a single program or group of programs (initiated through program chaining); and then unloaded upon return of full control to the operating system through a SHUTDOWN, ROLLOUT, or STOP (within the ANSWER/MASTER program). It can be used as follows:

 

SUNDBSYx {progname}

 

SUNDBSYx is loaded and then {progname} is initiated. Once full control returns to the operating system, SUNDBSYx is automatically unloaded from memory.

 

SUNDBSYx support several options. They are as follows:

 

Option

Action

c

Enable the Critical Error Routines to trap critical errors when printing. This enables the TRAP SPOOL logic.

e

Load SUNDBSYx in such a manner that typing EXIT at the DOS command prompt unloads SUNDBSYx

i

Use the DOS BIOS routines to display information to the screen. This is not normally needed unless the video is in some mode other than standard text. Also needed if the IMAGE instruction is used and a KEYIN or DISPLAY instruction is executed while the screen is in graphics mode.

lnn

Force locking type to be xx, where xx is the system number that is returned from the CLOCK VERSION instruction. This overrides the network detection and locking mechanism built into SUNDBSYx. This should be used in conjunction with the -n option to force a different locking type than is normally used for a network type.

nxx

Force network type to be xx, where xx is the system number that is returned from the CLOCK VERSION instruction. This overrides the network detection and locking mechanism built into SUNDBSYx.

q

Do not display the type of network found, or any diagnostics concerning SHARE or other locking mechanism.

s

Do not allow SUNDBSYx to execute if the SHARE command has not been loaded.

 

Several options can be used at the same time. For instance, to execute a program that uses the IMAGE instruction and that must have SHARE loaded for data integrity would require the following command:

 

SUNDBSYS -S {program}

 

Under some supported multi-user implementations, there are special requirements for loading SUNDBSYx. Consult the Multi-User section for the multi-user system in use.

 

 

See Also: Compiler and Runtime Options

 



Compiler and Runtime Options Program Generation Program Control