Google
 

Trailing-Edge - PDP-10 Archives - integ_tools_tops20_v7_30-apr-86_dumper - tools/casestdy/case1.txt
There are 3 other files named case1.txt in the archive. Click here to see a list.
	Revision No:  1      
	Date:  83JUN07
 
VAX Conversion Guidelines
 
 
 
1.0  PROGRAM CHANGES & COMPILE
 
	1.	Print all the programs that are to be converted from the 
DEC-10, use these listings to mark your initial changes.  
By taking the copy from the DEC-10 you will be able to 
confirm that the copy you get on the VAX is the same 
version.
 
	2.	Copy the production source of the system you are 
converting to your VAXD account, Refer to the procedures 
in Attachment no. 5,
 
	3.	For COBOL programs use the extension of .COB instead of 
.CBL, which was used on the DEC-10,
 
	4.	Change the source code to VAX compatible code:
 
                  
	ie.  COBOL to VAX COBOL
		               FORTRAN TO VAX FORTRAN
 
		Refer to Attachment No. 1 for typical COBOL changes 
reqiured.
 
	5.	If a program used to access the CUMAST file, then change 
any of these accesses to the CUSTOMER data base, refer to 
Attachment No. 3,
 
	6.	Compile and link your program, refer to Attachment no. 4, 
ensure that you have maps and cross-references on the 
final listing,
 
	7.	Final program listings are to be made on the page printer 
(the VAX will have its own).  Portrait format is 
preferable,
 
	8.	Any comments you feel are helpful, especially those 
concerning data base access, should be put into the code.  
Comments should be made in lower case in order to 
differentiate them easily from executed instructions,
 
	9.	In the 'REMARKS' area document the conversion date and 
who it was done by, eg.
 
               	*              Conversion Date:  83May31
			*                           By:  V. Shipka
 
	10.	For systems that use card decks, the master or 
transaction files will be converted to disk.  If the Lead 
Card in the card deck was used to input the business 
date, a 'limited' number of parameters, etc., these 
should be removed from the card file and accepted via the 
JCL stream.
 
 
2.0  TESTING
 
	1.	Obtain sample production reports showing folio-twons that 
are in the test CUSTOMER data base (April month end).  If 
these reports are not available it may be necessary to 
run the DEC-10 production programs against the test 
CUMAST master on the DEC-10 in order to produce sample 
reports.  NOTE: Keep all run logs if you have to do this 
so that performance comparisons between the DEC-10 and 
the VAX can be made.
 
	2.	Setup DCL as per production requirements, refer to 
Attachment No. 6, in order to perform unit and stream 
testing,
 
	3.	Run the job streams against the CUSTOMER data base and 
compare the reports obtained from step #1,
 
	4.	Make any program changes required in order to parallel 
the old and converted systems.
 
 
3.0  PROGRAM DOCUMENTATION
 
	1.	Change any existing program documentation to reflect new 
program and file names,
 
	2.	Include comments on access to the CUSTOMER data base,
 
	3.	Most new comments should be placed directly in the 
program code.
 
 
4.0  SYSTEM TEST
 
	1.	Parallel test converted programs and DCL with production 
on the DEC-10, refer to the Attachment No. 7 - Parallel 
Production Schedule,
 
5.0	 SYSTEM DOCUMENTATION
 
	1.	Prepare a revised system flowchart.  This flowchart will 
show the new names for programs and files.  There may be 
new job streams which are oriented to user-submitted 
processing.  Tapes are to be eliminated whenever 
possible.
 
 
6.0  USER DOCUMENTATION
 
	1.	Assistance in preparing User Documentation which 
describes how to run user-submitted jobs may be required.  
The user, however, is responsible for preparing and 
finalizing this documentation.
 
 
7.0  USER TRAINING
 
	1.	Instruction with the user on how to setup, submit, obtain 
and possibly control the processing on the VAX will be 
required.
 
 
8.0  SYSTEM SUPPORT
 
	1.	Support will be required by the user during the initial 
running of the converted systems.
 
				Revision No:  2      
				Date:  83JUN07
 
Conversion Attachment Number 1
 
Changes from DEC10 COBOL To VAX COBOL
 
 
1.0  GENERAL CHANGES
 
	1.	Begin all statements in their proper column, ie. "A" or 
"B" columns,
 
	2.	The continuation character "-" is in column 7,
 
	3.	The following are reserved words:
			CONTINUE
			DAY
			DISCONNECT
			Anything starting with END-
			FINISH 
			HEADING
			START
 
	4.	For COPY statements the copy libray must be logically 
referenced within the program, use the logical name 
COPYLIB:
 
			eg.  COPY WSJULDAT IN "COPYLIB:".
 
		Then externally, either in your LOGIN.COM or a separate 
command file define the logical file as follows:
 
			$ASSIGN U5:[BIL]LIBRARY.TLB COPYLIB
 
		Also FDs and 01 levels which directly precede the COPY 
statment must be commented out or removed,
 
	5.	Change all TABS to 8 spaces (on the VAX a TAB is 6 
spaces).
 
 
2.0  INDENTIFICATION DIVISION
 
	1.	The order must be as follows:
 
			AUTHOR
			INSTALLATION.
			DATE-WRITTEN.
			DATE-COMPILED.
	2.	For INSTALLATION change CALGARY POWER LTD.  to TRANSALTA 
UTILITIES,
 
	3.	Remove the REMARKS statement and replace by comments.
 
 
3.0  ENVIRONMENT DIVISION
 
	1.	The entire ENVIRONMENT DIVISON is optional.
 
	2.	In the CONFIGURATION SECTION change DEC-10 to VAX-11, for 
both the SOURCE and OBJECT computer,
 
	3.	change all logical disk assignments to "SYS$DISK:" 
(include the quotes).
 
	4.	In SPECIAL-NAMES put a period only on the last line,
 
	5.	Change CHANNEL (1) to CO1,
 
	6.	ACCESS MODE should be RANDOM or DYNAMIC, these will 
replace INDEXED,
 
	7.	SYMBOLIC KEYS no longer exist, they are replaced by the 
actual key on the file,
 
	8.	FILE-STATUS becomes FILE STATUS IS filestat, where 
filestat is a 2 "digit" alpha-numeric item,
 
	9.	USER-NUMBER, ie. the old DEC-10 [ppn], clause is not 
permitted.
 
	10. Remove ALTERNATE from the RESERVE clause.
 
 
4.0  DATA DIVISION
 
	1.	In FD definitions, change all VALUE OF IDENTIFICATION 
clauses to VALUE OF ID clauses,
 
	2.	The file name in the VALUE OF ID clause must contain the 
period ".", eg. "SSI010R01" becomes "SSI010.R01"; 
otherwise the file extension defaults to .DAT,
 
	3.	RECORDING MODE is invalid in the FD,
 
	4.	Comment out BLOCK CONTAINS 0 RECORDS, and BLOCK CONTAINS 
1 RECORD,
	5.	REDEFINES and OCCURS cannot be on the same line,
 
	6.	For multiple REDEFINES of the same area, the first data 
group or element must be referenced,
 
	7.	The OCCURS clause cannot be used at the 01 level,
 
	8.	Change all DISPLAY-6 and DISPLAY-7 to DISPLAY,
 
	9.	In report headings change CALGARY POWER LTD. to TRANSALTA 
UTILITIES, Further in and sub-headings or table entries 
change CPL to TAU.
 
 
5.0  PROCEDURE DIVISION
 
	1.	ZEROS or SPACES checks can only be done on alpha-numeric 
fields,
 
	2.	a numeric field can never have spaces mixed in it,
 
	3.  change all EQUALS to EQUAL, or simply use "=" for both 
cases,
 
	4.	Change AFTER VARYING to AFTER,
 
	5.	Initialize all Tables in the Initialization part of the 
program, the values will either be zero or set to the 
appropriate values,
 
	6.	Initialize all veriables either in the Initialization 
part of the program or by using the VALUE clause in the 
DATA DIVISION,
 
	7.	Sequential reading or ISAM files is different in that a 
START statement must used, the START statement is also 
different form the DEC-10 COBOL-74, refer to the 
following examples for the difference:
 
			VAX:
			     START MASTER-FILE
			     KEY IS > M-KEY
			     INVALID KEY ...
 
			DEC-10:
			     START MASTER-FILE
			     KEY IS = M-KEY
			     INVALID KEY ...
 
	8.	In the OPEN statement, INPUT-OUTPUT becomes I-O,
	9.	When accessing ISAM files MOVEs to symbolic keys are 
replaced with a move to the actual key,
 
	10.	the EXAMINE statement is replaced with the INSPECT 
statement,
 
	11.	INSPECT REPLACING is replaced by INSPECT CONVERTING,
 
	12.	HIGH-VALUES and LOW-VALUES are treated as alpha-numeric 
items and cannot be moved to numeric items,
 
	13.	If ACCEPT is used special setup of the variable(s) 
ACCEPTed is required in the batch or interactive command 
files, refer to Attachment No. 2 for details on how to 
set thse up.
 
	14.	A paragraph name must follow the declaration of a 
SECTION.  There cannot be partial SECTIONing of a 
program, ie. SECTIONs are defined towards the end of the 
program code.  In small programs the SECTIONing can be 
removed completely.
 
	15.	In the initialization part of the program, TODAY is often 
MOVEd to WS-DATE which is defined as a group item for 
both date and time variables.  WS-DATE should be broken 
into separate group items for the date and time 
components, ie. WS-DATE and a new group WS-TIME.  These 
would be initialized with the system date and time by 
using the following statements:
 
			ACCEPT WS-DATE FROM DATE.
			ACCEPT WS-TIME FROM TIME.
 
	16.	On the DEC-10 the TALLY counter was implicitly defined as 
TALLY.
 
			eg.  INSPECT variable TALLYING ....
 
		On the VAX the counter must be explicitly defined in 
working storage. eg. if TALLY was defined the INSPECT 
statement would become:
 
			INSPECT variable TALLYING TALLY FOR ...
 
	17.	Moving 0 or ZERO to a group item of numeric elements will 
not zero out the elements.  This used to work on the 
DEC-10.  Either use individual MOVEs or try using the 
INITIALIZE statement.
 
	18.	If NOTE has been used to put comments in the code, 
replace it with the asterisk (*) in "column 7".
 
5.1  Special To Billing Conversion
 
	1.	For programs which use the library routine INITRINE, 
change the variable PROG-NO in the working storage to:
 
			nn PROG-ID    PIC X(6)   VALUE "report name".
			nn RPT-NO     PIC X(3)   VALUE "R01"
 
	Revision No:  1      
	Date:  83MAY27
 
Conversion Attachment Number 2
 
 
Setup of Batch & Interactive Command Files
For ACCEPT Statements
 
 
 
1.0  BATCH PROCESSING
 
	1.	Each ACCEPT Statement in the program will accept a "line" 
from the DCL stream which will contain one or more 
parameters.  Each of these parameters must be built using 
a separate DCL INQUIRE statement.  The ACCEPT "line" is 
then built by writing out the parameters to a command 
(.COM) file which is submitted to Batch processing.  For 
example, we have three parameters that are ACCEPTed by a 
single statement in program in program TME090.  The input 
format is as follows:
 
			Initial Folio	cols  1-3
			Start Date	cols 10-15 	
			Ending Date	cols 17-22
 
		The DCL statements required to set up a command file and 
run the program are as follows:
 
	$INQUIRE FOLIO "Enter Folio to be Selected (999)"
	$INQUIRE DATE1 "Enter Starting Date YYMMDD"	
	$INQUIRE DATE2 "Enter Ending Date YYMMDD"
	$OPEN/WRITE FILE TME090.COM
	$WRITE FILE "$RUN TME030.EXE"
	$WRITE FILE FOLIO, "     ", DATE1, "  ", DATE2
	$CLOSE FILE
	$SUBMIT/QUEUE=FAST/KEEP/AFTER=17:00 TME090.COM
	$EXIT
 
	NOTE:  The spaces in the WRITE statement between the 
parameters correspond to the blanks in columns 4-9 and 16 
respectively.
 
 
2.0  INTERACTIVE PROCESSING
 
	1.	For interactive use of programs, a command (.COM) file is 
also set up.  To run program TME090 the following 
statements would be setup:
 
		$ASSIGN/USER TT: SYS$INPUT
		$RUN TME090.EXE
	 					Revision No:  1       
						 Date:  83JUNE07
 
 
Conversion Attachment Number 3
 
Conversion to Data Base Access
 
 
1.0  GENERAL
 
	The logic in programs which access the CUSTOMER database 
often has to be radically changed.  It could be simplified 
because the sequential accessing of customer accounts, for 
example, does not need to skip over control records or type 2 
masters, as was done when accessing the indexed master.
 
	The other major change is the introduction of error handling 
messages when the unexpected end of sets occurs.  These must be 
properly handled even though they should not occur.  Proper 
E00n-type messages should be written out to an error report, or 
the Run Log, along with the old CIS key the error occurred for 
(if applicable).
 
 
2.0  DATA DIVISION
 
	1.	Add the Sub-Schema Section directly after the Data 
Division.
 
		DATA DIVISION
		SUB-SCHEMA SECTION
		DB CUTOMERS_SCHEMA  WITHIN CUSTOMERS_DATABASE
		                    FOR "CUSTOMER:CUSTOMERS.ROO".
 
		NOTE:  CUSTOMER: is defined externally by a DEFINE 
statement.  During the testing phase of the conversion 
use the following statements:
 
		$DEFINE CDD$DEFAULT	"CDD$TOP"
		$DEFINE CUSTOMER	"U5:[CUSTOMERS]"
 
 
3.0  PROCEDURE DIVISION
 
	1.	Change the OPEN for the Master to
		READY realms
		[CONCURRENT or EXCLUSIVE] and [RETRIEVAL or UPDATE]
		NOTE:  Use only the realms that you require, do not use 
EXCLUSIVE unless no one else is to access the data base 
while your program is running.
 
	2.	Change the CLOSE for the Master to ROLLBACK if RETRIEVE 
was chosen or COMMIT if UPDATE was chosen.  NB. ROLLBACK 
is used for UPDATE if the changes are not to be applied.
 
	3.	READ access is replaced by FIND/FETCH.
 
 	 					Revision No:  1       
						 Date:  83JUNE07
 
Conversion Attachment Number 4
 
Compilation & Linkage of Converted Programs
 
 
1.0  COMPILATION
 
		COBOL/L/D/CROSS_REFERENCE/MAP/COPY_LIST program-name
 
	where:
 
		/L produces a program Listing
 
		/D is required if DEBUG is to be used.
 
		/CROSS_REFERENCE is self-explanatory skip 1
 
		/MAP is self-explanatory
 
		/COPY_LIST is required when the COPY statement is used.
 
	NOTE:  when using the COPY statement ensure that you have    
	made the following ASSIGN before you compile:
	
			$ASSIGN U5:[BIL]LIBARY.LIB COPYLIB
 
For the program name the extension is not required if it is .COB
 
 
2.0  LINKAGE
 
		LINK program-name
 
		LINK/DEBUG program-name
 
				if DEBUG is to be used.
 
		LINK program-name,SYS$LIBRARY:DBMDML/OPT
 
				when VAX DBMS is used.
 	 					Revision No:  0      
						 Date:  83MAY31
 
 
Conversion Attaachment Number 5
 
Transfer of Files from DEC-10 to VAX
 
 
1.0  ON DEC-10
 
	1.	Copy files to [50,60] from [50,2]
 
	2.	DO TAPE1 (file1, file2, file3,...) 
			- wild cards are permitted
 
	3.	DO TAPE2
			- this request a scratch tape
 
	4.	Record the scratch tape number given to you.
 
	5.	DO TAPE3 tape#
 
 
2.0  ON THE VAX
 
	1.	$ALLOCATE MFA0:  TAPE:
 
	2.	$MOUNT/FOR TAPE:  tape#
 
	3.	$RUN SYS$SYSTEM:TAPECOPY
 
		- Choose option "2" (variable length records	delimited by 
		CR>Lf>
 
		- Answer "N" to "Conversion to ASCII".
 
		- Enter "1" for the number of files to be skipped.
 
		- Enter the filename.ext of the files in the order that 
		they were copied to the tape.  An entry is made for each 
		file	that is copied from the tape.	
 	 					Revision No:  0      
						 Date:  83JUN07
 
Conversion Attachment Number 6
Production DCL Guidelines
 
 
1.0  GENERAL
 
	These guidelines have been developed in accordance with those 
already documented in "Guidelines for systems Implementation 
Under VMS", as issued by T.K. Hodgson, March 14, 1983.
 
	The general philosophy when setting up DCL to run batch jobs 
is to make it easy to use by the end-user, the screen dialogue 
for different systems is to be similar and job setup parameter 
errors should be trapped when the batch DCL command file is 
generated, whenever possible.
 
 
2.0  DCL COMMAND FILES
 
	Various DCL command files must be setup for a production 
system.  For discussion purposes we consider that these files 
form different levels, with the highest level being one, and 
lower levels two and three.  The highest level calls the next 
lower level, etc.
 
 
2.1  MAIN MENU
 
	The first level command file consists of a "main menu" of 
jobs which can be run for the system.  Each job may consist of 
several steps which can run an appication program or a system 
utility program.  An example of a Main Menu DCL file is shown in 
Figure A6-1.
 
	Figure A6-1: Sample of the Main Menu for the SSI system
 
 
$! SSI.COM
$!
$! THIS IS THE MAIN MENU FOR THE SUPPLY SOURCE INFORMATION SYSTEM (SSI) 
$!
$TOP:
$WRITE SYS$OUTPUT "**** MAIN JOB MENU FOR SUPPLY SOURCE INFORMATION SYSTEM (SSI) ****"
$WRITE SYS$OUTPUT " "
$WRITE SYS$OUTPUT " 1 - SSI0I0: SUPPLY SHOURCE DETAIL REPORTING"
$WRITE SYS$OUTPUT " 2 - SSI030: SUPPLY SHOURCE DISTRIBUTION BY DISTRICT"
			^
			^- Put Stream ID in Menu

$WRITE SYS$OUTPUT " 3 - EXIT"
$WRITE SYS$OUTPUT " "
$ENTER:
$INQUIRE JOBNO    "ENTER THE NUMBER OF THE JOB YOU WISH TO RUN"
$IF JOBNO .EQS. "1" THEN $@SSI:SSICO1
				^
				^- Call Second level file "ssiCnn
							      ^--
					"C" = "CONTROL" ------^ ^
								^
					"nn" = Menu Number -----^


$IF JOBNO .EQS. "1" THEN $GOTO EXIT
$IF JOBNO .EQS. "2" THEN $@SSI:SSICO2
$IF JOBNO .EQS. "2" THEN $GOTO EXIT
$IF JOBNO .EQS. "3" THEN $GOTO EXIT
$ERR:
$WRITE SYS$OUTPUT "THE JOB NUMBER ENTERED IS INVALID - RE-ENTER"
$GOTO ENTER
$EXIT: EXIT
	This file is initiated by the user simply by typing the 
mnemonic code for the system (ie. SSI for the Supply Source 
Information system).
 
	In order for the Main Menu file to function properly, the 
following must be setup in the directory the system is run from:
 
	1.	The following entries should be made in the LOGIN.COM 
file:
 
			$DEFINE sys "dev:[directory]"
			sys := @SSI:SSI
 
			where "sys" is the system mnemonic code, eg. SSI
 
		For example:
				$DEFINE SSI "U5:[9FORSTER]"
				SSI := @SSI:SSI
 
	Once the user chooses a job from the Main Menu, a second 
level command file is executed.
 
 
2.2  Job Setup & Submit DCL Files
 
	The second level file sets up the DCL file that will control 
batch processing of the job.  Once the DCL batch control file has 
been created, the second level file submits it.
 
	The second level file is needed in order to enter parameters 
which may vary with each job run.  these include:
 
	1.	The starting job step,
 
	2.	Data accepted by the application program, ie. business 
date, selection criteria,	
 
	3.	Job submission parameters, ie. CUP run time, Starting 
time of job.
 
	Two samples of second level jobs are shown in figures A6-2 
and A6-3.
FIGURE A6-2: SSIC01.COM - Sample of a Second Level File
Called by SSI.COM
 
$!
$!  SSIC01.COM - THIS COMMAND FILE SETS UP & SUBMITS THE SSI010.COM FILE
$!             - SSI010.COM RUNS SSI010/015/020 FOR SUPPLY SOURCE SUMMARY
$!               & DETAIL BY DISTRICT
$!
$BEGIN:
$INQUIRE  JOBSTEP "WHICH JOB STEP DO YOU WISH TO START AT? SSI010/SSI015/SSI020 (DEFAULT IS SSI010)"
							    --------------------
								      ^
								      ^
							Show valid job step choices.
							Do NOT show a step that
							should never be started at.

$IF JOBSTET .EQS. "SSI010" .OR. JOBSTEP .EQS. "" .OR. JOBSTEP .EQS "" THEN 
    GOTO JOBDEFAULT
$IF JOBSTEP .EQS. "SSI015" THEN GOTO JOBOK
$IF JOBSTEP .EQS. "SSI020" THEN GOTO JOBOK
$INVJOB:
$WRITE  SYS$OUTPUT  "INVALID STARTING JOB - RE-ENTER"
$GOTO BEGIN
$JOBDEFAULT:
$JOBSTEP := "SSI010"
		^
		^- Default start (Usually the first one)

$JOBOK:
$INQUIRE  BUSDAT "ENTER THE BUSINESS DATE AS MONTH (9 CHARS) SPACE YEAR 
                  (19NN)"
$OPEN/WRITE FILE SSI010.COM
			^
			^- Name of the Third level file to be created

$WRITE	FILE "$BEGIN:"
$WRITE	FILE "ON ERROR  THEN GOTO ERROR1"
$WRITE	FILE "GOTO ". JOBSTEP
$WRITE	FILE "$!"
$WRITE	FILE "$!  STEP SSI010 - CUSTOMER DATA BASE SELECT"
$WRITE	FILE "$!"
$WRITE	FILE "$SSI010:
$WRITE	FILE "$ FAILSTEP := ""SSI010"""
			^
			^- The fail step job name is changed as each
			   new step is entered

$WRITE	FILE "$RUN  SSI:SSI010.EXE"
$WRITE	FILE BUSDAT
$DISTNO:
$INQUIRE  DISTNO "ENTER THE REQUIRED DISTRICT NUMBER (END OF STOP)"
$WRITE	FILE DISTNO
$IF DISTNO .NEX. "END" THEN GOTO DISTNO
			^
			^- Notice loop until "END" is entered

$WRITE	FILE "$PRINT SSI010.R01"
$WRITE	FILE "$!"
$WRITE	FILE "$!  STEP SSI015 - SORT SELECTED DISTRICTS"
$WRITE	FILE "$!"
$WRITE	FILE "$SSI015:
$WRITE	FILE "$ FAILSTEP := ""SSI015"""
$WRITE	FILE "$SORT/KEY=(POISTION:1,SIZE:3)/STATISTICS - "
						       ^
				Continuation of line  -^

$WRITE	FILE "$ SSI010.W01  SSI015.W01"
			^
			^- Put files on second line

$WRITE	FILE "$DELETE SSI010.W01"
$WRITE	FILE "$!"
$WRITE	FILE "$!  STEP SSI020 - SUPPLY SOURCE DETAIL & SUMMARY REPORT"
$WRITE	FILE "$!"
$WRITE	FILE "$SSI020:"
$WRITE	FILE "$ FAILSTEP := ""SSI020"""
$WRITE	FILE "$RUN SSI:SSI020.EXE"
$WRITE	FILE  BUSDAT
$WRITE	FILE "$PRINT SSI020.R02"
$WRITE	FILE "$DELETE SSI015.W01"
$WRITE	FILE "$EXIT:"
$WRITE	FILE "$ EXIT"
$WRITE	FILE "ERROR1:"
$WRITE	FILE "$WRITE SYS$OUTPUT ""*** SSI - SSI010 FAILED, JOB STEP = "", FAILSTEP, ""  ***"""
$WRITE	FILE "$WRITE SYS$OUTPUT ""RE-SUBMIT JOB STARTING AT STEP = "", FAILSTEP"
									^
					The FAILSTEP name may have to  -^
					be changed between these two
					lines if the re-submit start
					step is NOT the failed step.

$WRITE	FILE "$GOTO EXIT"
$CLOSE FILE
$!
$!   INQUIRE & SETUP THE SUBMIT STATEMENT
$!
$INQTIME:
$INQUIRE  TIME "ENTER THE CPU RUN TIME (DEFAULT IS 00:10:00)"
                IF TIME .EQS "" .OR. TIME .EQS. " " THEN GOTO TIMEDEFAULT
$GOTO INQAFTER
$TIMEDEFAULT:  TIME := "00:10:00"
			^
			^- Default time set up.

$INQAFTER:
$INQUIRE  AFTER  "ENTER THE DATE AND TIME THE JOB IS TO BE RUN AFTER (DEFAULT IS AFTER 17:00 TODAY)"
$IF AFTER .EQS. "" .OR. AFTER .EQS. "" THEN GOTO AFTERDEFAULT
$GOTO SUBMIT
$AFTERDEFAULT: AFTER := "17:00:00"
			^
			^- Default after DATE:TIME set up.

$SUBMIT:
$SUBMIT/KEEP/NOTIFY/CPUTIME='TIME'/AFTER='AFTER' . SSI:SSI010.COM
$EXIT:
$   EXIT

		If more SUBMIT modifiers are required they
		would be put in accordingly.
Figure A6-3: SSIC02.COM - Sample of a Second Level File
Called by SSI.COM
 
 
$!
$!  SSIC02.COM - THIS COMMAND FILE SETS UP & SUBMITS THE SSI030.COM FILE
$!             - SSI030.COM RUNS SSI030/035/040 FOR SUPPLY SOURCE 
$!               DISTRIBUTION BY DISTRICT REPORT
$!
$BEGIN:
$INQUIRE  JOBSTEP "WHICH STEP DO YOU WISH TO START AT? SSI030/SSI035/SSI040 (DEFAULT IS SSI030)"
$IF JOBSTEP .EQS. "SSI030" .OR. JOBSTEP .EQS. "" .OR. JOBSTEP .EQS. " " THEN GOTO JOBDEFAULT
$IF JOBSTEP .EQS. "SSI035" THEN GOTO JOBOK
$IF JOBSTEP .EQS. "SSI040" THEN GOTO JOBOK
$INVJOB:
$WRITE SYS$OUTPUT "INVALID STARTING JOB - RE-ENTER"
$GOTO BEGIN
$JOBDEFAULT:
$ JOBSTEP := "SSI030"
$JOBOK:
$INQUIRE BUSDAT "ENTER THE BUSINESS DATE AS MONTH (9 CHARS) SPACE YEAR (19NN)"
$OPEN/WRITE FILE SSI030.COM
$WRITE	FILE "$BEGIN:"
$WRITE	FILE "ON ERROR  THEN GOTO ERROR1"
$WRITE	FILE "GOTO". JOBSTEP
$WRITE	FILE "$!"
$WRITE	FILE "$! STEP SSI030 - CUSTOMER DATA BASE SELECT"
$WRITE	FILE "$!"
$WRITE	FILE "$SSI030:
$WRITE	FILE "$ FAILSTEP" := ""SSI030"""
$WRITE	FILE "$RUN SSI:SSI030.EXE"
$WRITE	FILE BUSDAT
$WRITE	FILE "$PRINT SSI030.R01"
$WRITE	FILE "$!"
$WRITE	FILE "$!  STEP SSI035 - SORT SELECTED DISTRICTS"
$WRITE	FILE "$!"
$WRITE 	FILE "$SSI040:
$WRITE	FILE "$ FAILSTEP := ""SSI040"""
$WRITE	FILE "$RUN SSI:SSI040.EXE"
$WRITE	FILE BUSDAT
$WRITE	FILE "$PRINT SSI040.R01"
$WRITE	FILE "$DELETE  SSI035.W01"
$WRITE	FILE "$EXIT:"
$WRITE	FILE "$  EXIT"
$WRITE	FILE "$ERROR1:"
$WRITE	FILE "$WRITE  SYS$OUTPUT ""*** SSI - SSI030 FAILED, JOB STEP = "", FAILSTEP, "" ***"""
$WRITE	FILE "$WRITE  SYS$OUTPUT ""RE-SUBMIT JOB STARTING AT STEP = "", FAILSTEP"
$WRITE	FILE "$GOTO EXIT"
$CLOSE FILE
$!
$!   INQUIRE & SETUP THE SUBMIT STATEMENT
$!
$INQTIME:
$INQUIRE  TIME "ENTER THE CPU RUN TIM (DEFAULT IS 00:10:00)"
$IF TIME .EQS. "" .OR. TIME .EQS. " " THEN GOTO TIMEDEFAULT
$GOTO INQAFTER
$TIMEDEFAULT: TIME := "00:10:00"
$INQAFTER:
$INQUIRE  AFTER  "ENTER THE DATE AND TIME THE JOB IS TO BE RUN AFTER (DEFAULT IS AFTER 17:00 TODAY)"
$IF AFTER .EQS. "" .OR. AFTER .EQS. " " THEN GOTO AFTERDEFAULT
$GOTO SUBMIT
$AFTERDEFAULT: AFTER := "17:00:00"
$SUBMIT:
$SUBMIT/KEEP NOTIFY/CPUTIME='TIME'/AFTER='AFTER  SSI:SSI030.COM
$EXIT
$EXIT
2.3  BATCH CONTROL DCL FILE
 
     This is the third level of control files and is the one which controls 
the actual batch processing.  It is always built by the second level file, 
i.e., it is not setup spearately and then only submitted by the second 
level file.  Figure !6-4 shows the command file setup by SSIC01.COM.
 
Figure A6-4: Sample of the Third Level Command File
Setup by SSIC01.COM
 
 
$BEGIN:
$ON ERROR  THEN GOTO ERROR1
$GOTO SSI010
$!
$!  STEP SSI010 - CUSTOMER DATA BASE SELECT
$!
$SSI010:
$  FAILSTEP := "SSI010"
$RUN SSI:SSI010.EXE
APRIL 1985
11
12
15
87
END
$PRINT SSI010.R01
$!
$!  STEP SSI015 - SORT SELECTED DISTRICTS
$!
$SSI015:
$  FAILSTEP := "SSI015"
$SORT/KEY=(POSITION:1,SIZE:3)/STATISTICS  -
$  SSI010.W01  SSI015.W01
$DELETE SSI010.W01
$!
$!  STEP SSI020 - SUPPLY SOURCE DETAIL & SUMMARY REPORT
$!
$SSI020:
$  FAILSTEP := "SSI020"
$RUN SSI:SSI020.EXE
APRIL 1983
$PRINT SSI020.R01
$DELETE  SSI015.W01
$EXIT:
$  EXIT
$ERROR1:
$WRITE SYS$OUTPUT "*** SSI - SSI010 FAILED, JOB STEP = ", FAILSTEP, "  ***"
$WRITE SYS$OUTPUT "RE-SUBMIT JOB STARTING AT STEP = ", FAILSTEP
$GOTO EXIT