Program Control


SUNDB86x Only

 

This PL/B implementation supports an Answer/Master concept of program chaining. In typical PL/B installations, the first program executed after system startup is named ANSWER, usually supplying system security. ANSWER then, either through program chaining or the occurrence of a STOP instruction, passes control to the main menu program, usually named MASTER. This program is then used to pass control from one program selection in the menu to another, regaining control between program selections. With this concept of support in mind, certain rules must be understood about program chaining in order to insure its success:

 

  1. If a program named ANSWER is executed directly from the operating system prompt and executes a STOP instruction, it attempts to chain to a program named MASTER. If unable to do so, it returns to the operating system.

  2. Any program executed directly from the operating system prompt (not named ANSWER and adhering to rule 1) becomes both the ANSWER and MASTER for any subsequent programs chained to. If the program executes a STOP instruction, it returns control to the operating system.

  3. Any program that is CHAINed to and that executes a STOP instruction, attempts to CHAIN to its MASTER program. If unable to CHAIN to its MASTER program, an attempt is made to CHAIN to its ANSWER program.

  4. Any program that executes a DSCNCT instruction attempts to CHAIN to its ANSWER program. If unable to do so, it returns to the operating system.

  5. Any program that executes a SHUTDOWN instruction returns control to the operating system and executes any given command line, if supported by the system in use.

 

 

See Also: Compiler and Runtime Options

 



Compiler and Runtime Options Program Execution Resident Programs