@ [Remove all lines preceeded by a "@"] @ [Conditionally remove all lines preceeded by a "^"] @ 10 %TITLE " - " %IDENT "X00.00" %SBTTL "Overall description" ! ------------------------------------------------------------------ ! ! A SUBPROGRAM ! ! ! PART OF THE SYSTEM ! ! DEVELOPED BY AND FOR ! ! C A R L ' S G R O C E R Y C O M P A N Y , I N C . ! ! COPYRIGHT (C) 19XX BY CARL'S GROCERY COMPANY, INC. ! ! This software is the sole property of Carl's Grocery Company, Inc., ! and is intended soley for its use. It may not be copied. ! ! ----------------------------------------------------------------- SUB ! ! ENVIRONMENT SPECIFICATION: ! OPTION & TYPE = EXPLICIT, & SIZE = INTEGER LONG, & SIZE = REAL DOUBLE, & SCALE = 4 REM FACILITY: @ Give a brief description of the system or library facility. ABSTRACT: @ Include here, a short 3-6 line abstract of the subprogram. AUTHOR : CREATION DATE:
20 %PAGE %SBTTL "Environment" ! ! ENVIRONMENT: ! ! VAX-11 user mode ! VARIANT ASSUMPTIONS: ! NONE ! ! INTERACTIVE MODE FOR THIS PROGRAM: ! ! Operating modes for this program are as follows %LET %YES = -1 %LET %NO = 0 ! Normal terminal I/O mode is primarily for batch operations %LET %NORMAL = [%YES][%NO] ! TDMS mode, screen mode is preferred for interactive operations %LET %TDMS = [%YES][%NO] 30 %PAGE %SBTTL "Modification history" REM MODIFICATION AND DEVELOPMENT HISTORY VER# P.EXT DATE CODER NATURE OF CHANGE ------ ----- ------ ----- ---------------- 31! X00.00 <++> Creation date @ [++ If upgrade is by patch, include patch extension <.ext>] 489! 490 %PAGE %SBTTL "Full description" REM FUNCTIONAL DESCRIPTION: @ A detailed functional description of the subprogram goes here. This @ should detail the steps of the process, the use of external @ functions and subprograms (including system services, RTL routines, @ SYSLIB routines which are addtional to template standard), and @ so forth. IMPLICIT INPUTS: @ Describe sources of information used by the subprogram. IMPLICIT OUTPUTS: @ Describe any output produced by this subprogram. SIDE EFFECTS: @ Describe all functional side effects that are not evident from @ the invocation interface. This includes changes in storage al- @ location, process status, file operations (including the command @ terminal), errors signalled, etc., which are additional to @ template standard. ^ TDMS REQUESTS (IF TDMS MODE): ^ ^ NAME DESCRIPTION ^ @ REQUEST_NAME @ Briefly describe what the request does, the form @ it uses, the file and any other pertinent information. 500 %PAGE %SBTTL "Declarations" ! ! DATATYPE SPECIFICATION: ! ^ RECORD ! @ ^ END RECORD ! ! INITIALIZING INCLUDE FILES: ! %IF %TDMS = %YES %THEN ! Initialize TDMS %INCLUDE "SYD:[SYSLIB]INCTDMSUB.PLT" %END %IF ^ %INCLUDE "" ! @ ^ ! ! EQUATED SYMBOLS: ! ^ DECLARE CONSTANT & ^ = , ! & ^ = ! ^ ! Set up constants for relational tests DECLARE INTEGER CONSTANT ! to test for true or false & NO = 0, & YES = NOT NO DECLARE BYTE CONSTANT ! to test entry and exit & ACTIVATED = 1, ! flags as on or active & FAILURE = -1, ! flags as operation failure & NORMAL = 0 ! normal entry or exit & ! ! LOCAL STORAGE: ! ! Standard work variables DECLARE ! declare work variables & INTEGER & Work_integer, ! variable of default integer & ! type & REAL & Work_real, ! real number variable of & ! default precision & STRING & Work_string ! dynamic string variable ^ DECLARE & @ & @ , ! & @ , ! & @ & @ , ! & @ ! ! ! GLOBAL STORAGE: ! ^ COMMON () ! & @ & @ , ! & @ , ! & @ & @ , ! & @ ! ^ MAP () ! & @ & @ , ! & @ , ! & @ & @ , ! & @ ! ! ! EXTERNAL REFERENCES: ! ^ EXTERNAL CONSTANT & @ ! ^ EXTERNAL & @ ! ! Declare standard function for channel allocations EXTERNAL LONG FUNCTION & LUNALL ! function to get or free lun & (LONG) ! get or put value ^ EXTERNAL FUNCTION & @ ! & @ ( BY , ! & @ BY ! ^ EXTERNAL SUB & @ ! & @ ( BY , ! & @ BY ! ! ! INTERNAL REFERENCES: ! ^ DECLARE FUNCTION & @ ! & @ (, ! & @ ) ! 989 %PAGE %SBTTL "Begin process initialization" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo PROCESS INITIALIZATION oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Lines 990 - 998 contain process initialization sections. 990 %PAGE %SBTTL "Process initialization" !+ ! Set up global error handler !- ON ERROR GOTO Master_error_handler @ [Alternately, local error handlers are to be set up for each program @ module and/or wherever else they are needed] 999 %PAGE %SBTTL "Begin main processing" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo BEGIN PROCESSING oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Lines 1000 - 7999 contain primary processes. Lines 8000 - 8997 contain subprogram wrap up and exit control. 1000 %PAGE %SBTTL "Process control - subprogram root module" @ [Main code goes here] 8000 %PAGE %SBTTL "Process termination - wrap up and exit" 8900 ! ! EXIT ! ! Exit subprogram EXIT SUB 8998 PRINT "Subprogram has fallen through main process section" STOP 8999 %PAGE %SBTTL "Begin local support routines" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo BEGIN LOCAL SUPPORT ROUTINES oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Lines 9000 - 9999 contain system standard subroutines. Lines 10000 - 24997 contain subprogram specific subroutines. 24990 ! Include TDMS status check routine if TDMS application %IF %TDMS = %YES %THEN %INCLUDE "PLTS:INCTDMSCK.PLT" %ELSE %END %IF 24998 PRINT "Subprogram has fallen through support routine section" STOP 24999 %PAGE %SBTTL "Begin local functions" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo BEGIN LOCAL FUNCTIONS oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Lines 25000 - 29997 contain local subprogram functions. 29998 PRINT "Subprogram has fallen through local function section" STOP 30999 %PAGE %SBTTL "Begin common error handling" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo BEGIN COMMON ERROR HANDLING oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Lines 31000 - 31997 contain common error handling routines. 31000 %PAGE %SBTTL "Error handling routines" Master_error_handler: SELECT ERR CASE ELSE ! Return control to system error handler ON ERROR GO BACK END SELECT 31998 PRINT "Subprogram has fallen through common error handling section" STOP 32766 %PAGE %SBTTL "Subprogram end" REM oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo SUBPROGRAM END oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo 32767! END SUB