SLIB77 - USERS GUIDE (AND INSTALLATION MANUAL) 31 August, 1983 SYSTEM MODELING BRANCH SYSTEM ENGINEERING DIVISION WESTERN AREA POWER ADMINISTRATION P.O. BOX 3402 GOLDEN, CO 80401 Commercial telephone: (303)-231-1723 FTS: 327-1723 SLIB77 - USER GUIDE TABLE OF CONTENTS 31 Aug 83 TABLE OF CONTENTS 1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . 4 2.0 MODES OF EXECUTION . . . . . . . . . . . . . . . . . 6 3.0 EDIT MODE COMMANDS . . . . . . . . . . . . . . . . . 7 4.0 BATCH MODE CONTROL STATEMENT . . . . . . . . . . . . 8 4.1 P (Old Library File) . . . . . . . . . . . . . . . 8 4.2 PA (Old Compatible Library File) . . . . . . . . . 8 4.3 N (New Library File) . . . . . . . . . . . . . . . 8 4.4 NA (New Compatible Library File) . . . . . . . . . 9 4.5 F (Full) . . . . . . . . . . . . . . . . . . . . . 9 4.6 Q (Quick) . . . . . . . . . . . . . . . . . . . . 9 4.7 C (Compile File) . . . . . . . . . . . . . . . . . 9 4.8 S (Source File) . . . . . . . . . . . . . . . . 10 4.9 L (List File) . . . . . . . . . . . . . . . . . 10 4.10 LO (List File Output Options) . . . . . . . . . 10 4.11 W (Maximum Record Length) . . . . . . . . . . . 11 4.12 SQ (Sequencing Control) . . . . . . . . . . . . 11 5.0 BATCH MODE DIRECTIVES . . . . . . . . . . . . . . 12 5.1 *ADDDECK (*A) . . . . . . . . . . . . . . . . . 12 5.2 *ADDCOMD (*AC) . . . . . . . . . . . . . . . . 12 5.3 *CALL (*CA) . . . . . . . . . . . . . . . . . . 13 5.4 *COMPILE (*C) . . . . . . . . . . . . . . . . . 13 5.5 *DECK (*DK) . . . . . . . . . . . . . . . . . . 13 5.6 *DEFINE (*DF) . . . . . . . . . . . . . . . . . 13 5.7 *DELETE (*D) . . . . . . . . . . . . . . . . . 14 5.8 *EDIT (*E) . . . . . . . . . . . . . . . . . . 14 5.9 *ENDIF (*EI) . . . . . . . . . . . . . . . . . 14 5.10 *IDENT (*ID) . . . . . . . . . . . . . . . . . 14 5.11 *IF (*IF) . . . . . . . . . . . . . . . . . . . 14 5.12 *INSERT (*I) . . . . . . . . . . . . . . . . . 15 5.13 *MOVE (*M) . . . . . . . . . . . . . . . . . . 15 5.14 *PURGE (*P) . . . . . . . . . . . . . . . . . . 16 5.15 *READ (*RD) . . . . . . . . . . . . . . . . . . 16 5.16 *RENAME (*RN) . . . . . . . . . . . . . . . . . 16 5.17 *RESTORE (*R) . . . . . . . . . . . . . . . . . 16 5.18 *UPDATE (*U) . . . . . . . . . . . . . . . . . 17 5.19 *YANK (*Y) . . . . . . . . . . . . . . . . . . 17 6.0 SPECIAL NOTE FOR IBM USERS . . . . . . . . . . . . 18 7.0 FILES USED . . . . . . . . . . . . . . . . . . . . 19 7.1 TERMINAL . . . . . . . . . . . . . . . . . . . . 19 7.2 NEW LIBRARY (11) . . . . . . . . . . . . . . . . 19 7.3 SOURCE (12) . . . . . . . . . . . . . . . . . . 19 7.4 LIST OUTPUT (13) . . . . . . . . . . . . . . . 20 7.5 COMPILE (14) . . . . . . . . . . . . . . . . . 20 7.6 COMPATIBLE LIBRARY INPUT (15) . . . . . . . . . 20 7.7 COMPATIBLE LIBRARY OUTPUT (16) . . . . . . . . . 21 SLIB77 - USER GUIDE TABLE OF CONTENTS 31 Aug 83 7.8 BACKUP OUTPUT (17) . . . . . . . . . . . . . . . 21 7.9 BACKUP INPUT (18) . . . . . . . . . . . . . . . 21 7.10 CONTINUE OUTPUT (19) . . . . . . . . . . . . . . 21 7.11 CONTINUE INPUT (20) . . . . . . . . . . . . . . 22 7.12 OLD LIBRARY (31) . . . . . . . . . . . . . . . . 22 7.13 SCRATCH INPUT (49) . . . . . . . . . . . . . . . 22 7.14 SCRATCH LIBRARY (50) . . . . . . . . . . . . . . 22 7.15 INPUT (51 To 91) . . . . . . . . . . . . . . . . 23 8.0 SAMPLE RUNS . . . . . . . . . . . . . . . . . . . 24 8.1 DEMO 1 (Make A Library) . . . . . . . . . . . . 24 8.2 DEMO 2 (Modify To Correct) . . . . . . . . . . . 25 8.3 DEMO 3 (Add Common Deck And Switches) . . . . . 26 9.0 PROGRAM EXECUTION DESCRIPTION . . . . . . . . . . 29 10.0 INSTALLATION MANUAL . . . . . . . . . . . . . . . 30 10.1 COMPUTER PROGRAM REQUIREMENTS . . . . . . . . . 30 10.2 INSTALLATION OVERVIEW . . . . . . . . . . . . . 32 10.3 DISTRIBUTION INFORMATION . . . . . . . . . . . . 32 10.4 INSTALLATION PROCEDURE AND NOTES . . . . . . . . 33 10.5 PROGRAM SWITCHES . . . . . . . . . . . . . . . . 35 SLIB77 - USER GUIDE Page 4 INTRODUCTION 31 Aug 83 1.0 INTRODUCTION SLIB77 is a computer software program designed to maintain source or data records in a compressed form. SLIB77 operates in such a manner that the user always has available all the changes ever made. The program is written in FORTRAN 77 to be compatible with different computers. SLIB77 maintains the records on a program library (random access) file creating new copies at the users direction. The records are maintained as "decks" at the users direction. Each "deck" has a name (up to 8 alphabetic characters) and each record in a deck is identified with the deck name and a sequence number, assigned sequentially starting with 1. Decks may be identified as "common" and as such can be inserted into any other deck (except another common deck). Modifications made are grouped by and assigned a "modification" name (Up to 8 alphabetic characters) at the direction of the user, these records are identified with the modification name and a sequence number assigned sequentially starting with 1 for each deck. The program has a normal batch mode of operation (similar to that of other programs of this type), but it also has an interactive-edit mode with its own built-in user help messages. This program was written to fill a need Government agencies have to communicate computer program changes from one installation to another with different computers involved. The program was written and is being maintained by: Alex Lunsford (Chief System Modeling Branch - A2320) System Engineering Division Western Area Power Administration P. O. Box 3402 Golden, CO 80401 Commercial Telephone: 303-231-1723 FTS: 327-1723 The program is entirely coded in ANSI Fortran 77 to be compatible with as many computers as possible. The program has been parameterized and can be custom-tailored by modifying parameters. Currently the program is being run and maintained by WESTERN AREA POWER ADMINISTRATION (WESTERN) on a DEC VAX 11/780. Provisions are being made for installation on CRAY, HARRIS, HEWLETT-PACKARD IBM, and PRIME computers. SLIB77 - USER GUIDE Page 5 INTRODUCTION 31 Aug 83 The program has provisions to create a "compatible" library file which can be transported from one computer to a different model or type of computer without losing any of the information in the file. The program may be obtained from the author. No direct support will be given to any organization in program conversion, but WESTERN would like to keep the general program up to date on as many computer models as possible. To this end the author will accept "MODS" to the program and corresponding switches for different computers and will insert them in the master code. SLIB77 - USER GUIDE Page 6 MODES OF EXECUTION 31 Aug 83 2.0 MODES OF EXECUTION The program has two modes of execution BATCH, and EDIT. The BATCH mode is controlled by the input file (51) and the EDIT mode is controlled by interactive terminal input. The major differences are: a. The edit mode does not use the SLIB CONTROL STATEMENT nor DIRECTIVES. b. The edit mode is for modification of single decks using a built-in editor which allows the user to make changes interactively with the program. c. A new library cannot be made from an EDIT run. SLIB77 - USER GUIDE Page 7 EDIT MODE COMMANDS 31 Aug 83 3.0 EDIT MODE COMMANDS The following commands are currently available in edit mode: T top cursor set to TOP of file B bottom cursor set to BOTTOM of file Fstr find cursor set to record where string str is found 'str find cursor set to record where string str is found "str find cursor set to record where string str is found N or CR next cursor set to next record Pn or .n print print n (no.) records on terminal Istr insert str is inserted as a record following current record. If an I alone is entered the program will allow you to enter more than 1 record (records will be entered until a carriage-return or a blank line is entered). To enter a blank line enter I# or a # record during multi-line entry. I the program will expect a series of lines to be inserted following the current record and ending insertion when a blank line is entered. D delete current record is deleted +n plus set pointer n records forward -n minus set pointer n records back H help a set of messages is printed to assist the user. E end ends the current edit session and writes the appropriate files. S substitute substitutes string2 for string1 format - S(del)str1(del)str2(del) del is any character to be used as delimiter. Any character can be used as a delimeter and the third delimeter is not needed. SLIB77 - USER GUIDE Page 8 BATCH MODE CONTROL STATEMENT 31 Aug 83 4.0 BATCH MODE CONTROL STATEMENT SLIB77 Batch Mode control options are controlled by the first record(s) on the input file (51) which comprise the CONTROL STATEMENT. The CONTROL STATEMENT may be either one record or more (each record may be up to 80 characters each and there may be as many as 480 characters total). The CONTROL STATEMENT has the form: SLIB,a,b,c... where a, b, c etc. are parameters for the run. The first record MUST have SLIB as the first four characters. A continuation record is indicated by a - (minus) as the LAST character of the PRECEDING record. The parameters are: 4.1 P (Old Library File) This parameter controls the useage of the old library file to be used as input to this run. omitted or P - old program library is on file (31). P=filename - old program library is on file filename P=0 - no old program library file to read 4.2 PA (Old Compatible Library File) This parameter controls the useage of the old compatible library file to be used as input to this run. PA - old COMPATIBLE library is on file (15) PA=filename - old COMPATIBLE library is on file filename omitted or PA=0 - there is no old COMPATIBLE library to read 4.3 N (New Library File) This parameter controls the new program library to be created N - new program library is to be written on file (11) N=filename - new program library is to be written on file filename omitted or N=0 - do not write new program library SLIB77 - USER GUIDE Page 9 BATCH MODE CONTROL STATEMENT 31 Aug 83 4.4 NA (New Compatible Library File) This parameter controls the new compatible program library to be created NA - write new COMPATIBLE library on file (16) NA=filename - write new COMPATIBLE library on file filename omitted or NA=0 - do not write new COMPATIBLE library 4.5 F (Full) Indicates that a full modification is to be made (i. e. , all decks will be written on compile, source and listing files as defined by other parameters). Has no effect on new library file. ( This parameter cannot be used in conjuction with the Q parameter.) F - full update omitted - edit only decks modified or as otherwise requested (note F and Q cannot both be requested) 4.6 Q (Quick) Indicates that only decks as requested with edit/compile/modifications will be written on compile, source, and listing files. Has no effect on LIBRARY file. ( note Q and F cannot both be requested ) Q - only edit deck requested by edit/compile directives omitted - decks modified and as requested by edit/ compile directives and those which call common decks that have been modified will be written on appropriate files. (If the Q is omitted and a common deck is modified ALL records in ALL decks will be checked for a directive that CALLS the modified common deck) 4.7 C (Compile File) Compile file parameter. omitted - compile output will be written on file (14) C - compile output will be written on file (COMPILE.FOR) SLIB77 - USER GUIDE Page 10 BATCH MODE CONTROL STATEMENT 31 Aug 83 C=filename - compile output will be written on file filename C=0 - no compile file will be written. 4.8 S (Source File) Source file parameter. (The source file is a file containing records that would be used as input to another SLIB77 library.) S - write source records on file (12) S=filename - write source records on file filename omitted or S=0 - no source file requested 4.9 L (List File) This parameter controls list file output omitted or L - list output written on output file (13) L=filename - list output written on file filename L=0 - no list output written 4.10 LO (List File Output Options) This parameter controls the output list options omitted or LO - default list options are selected(ECDM) LO=abc...z - each character (a, b, etc. ) selects an option for output listing no blanks are permitted. option meaning A list active records D list deck status E list errors I list inactive records M list modification performed S list statistics T list text input C list directives other than those modifying records in the deck SLIB77 - USER GUIDE Page 11 BATCH MODE CONTROL STATEMENT 31 Aug 83 | 4.11 W (Maximum Record Length) | | This parameter controls the maximum record length of the | individual records in the library. Records of different lengths | are not allowed in the same library, thus this parameter should | only be used when creating a new library (this means when no old | library is present!). The maximum record length is restricted to | 160 characters by the program. | | omitted or W - Maximum width will be set to 72 | W=n - Maximum width will be set to n | | | | 4.12 SQ (Sequencing Control) | | This parameter controls the sequencing information that is to be | applied to the Compile file by the program. There are three | option as described below. | | omitted - Full - Identification name and sequence | number in full | SQ=F - Full - Identification name and sequence | number in full | SQ=C - Compressed - ID will be limited to 8 | characters | SQ=N - No sequencing information will be appended SLIB77 - USER GUIDE Page 12 BATCH MODE DIRECTIVES 31 Aug 83 5.0 BATCH MODE DIRECTIVES In batch mode the user communicates with the program through commands called DIRECTIVES. Directives are used to create decks and common decks, direct modifications, and call common decks and turn switches on and off. All directives begin with the master prefix character (an asterisk) followed by either the long or short form of the directives and other information (typical deck names and sequence numbers). A blank or comma must be inserted between the directives and the rest of the record. The directives and their functions are: 5.1 *ADDDECK (*A) This directive is used to declare the name of a deck and precedes the records for the deck. All records following this directive are assigned to the deck - until a directive is encountered which cannot be a part of a deck. The first name identifies the deck and the second the deck ahead of which this new deck will be inserted (END-OF-FILE if second name is not given). The first name cannot be omitted, the second can. example: *ADDDECK ALPHA XTRA *A BETA 5.2 *ADDCOMD (*AC) This directive is used to declare the name of a common deck (a common deck is similar to a deck except that it is flagged as such by the program and can the be CALLed by a record in any other deck and will thus be inserted on the compile file whenever the calling deck is edited.) and precedes the records for the deck. All records following this directive will be assigned to the named common deck until a directive is encountered that cannot be a part of a deck. The first name is that of the deck and the second is the deck ahead of which the new deck will be inserted.(END-OF-FILE if second name not present) example: *ADDCOMD GROUPCB GROUPC *AC COMMONA SLIB77 - USER GUIDE Page 13 BATCH MODE DIRECTIVES 31 Aug 83 5.3 *CALL (*CA) This directive is used to include records from a common deck (in the library) into another deck. A common deck may not call another common deck. This record is included as a part of the deck. example: *CALL GROUPA *CA COMMONA 5.4 *COMPILE (*C) This directive identifies decks to be edited - modified as necessary and written on files as requested (ignored if full edit F parameter is used). This record is not included on the library. example: *COMPILE ALPHA,BETA,GAMMA 5.5 *DECK (*DK) Each deck (or common deck) to be modified must be identified as such by this directive. Directives following this that add or delete records whose ident is that of the deck do not have to reference the deck, only the sequence number. This record does not itself become a part of the library. example: *DECK ALPHA *DK GROUP 5.6 *DEFINE (*DF) This directive is used to define a switch name which can be used in conjunction with the IF directive. The name defined by this directive becomes a permanent part of any new library created, but this record itself does not become a part of the library. example: *DEFINE BPA *DF WAPA *DF -VAX (note - to turn off a switch name defined use a minus sign in front of the name) SLIB77 - USER GUIDE Page 14 BATCH MODE DIRECTIVES 31 Aug 83 5.7 *DELETE (*D) This directive is used to deactivate individual record(s) in a deck. Input records which follow this one will replace the ones deleted (until a record is encountered that cannot be a part of a deck). Records thus de-activated can be re-activated with the *RESTORE directive. example: *DELETE GROUPA.10 *D ALPHA.10,MOD1.3 5.8 *EDIT (*E) (This directive is identical to *COMPILE directive and should not confused with the EDIT mode.) 5.9 *ENDIF (*EI) This directive is used to signal the end of a conditional range. This record is put on the library file and only has an effect if the previous IF is not set. (See *IF for information about nesting of *IF's). example: *ENDIF 5.10 *IDENT (*ID) This directive assigns a name to a modification set. All modification cards following it will be assigned the name on this directive. (up to 8 alphanumeric characters). Unlike some similar programs there is no default IDENT in this program. The program currently does not check for it but do not use an IDENT name the same as a DECK name (at least do not modify a deck with the same name as the IDENT name doing the modification)! (This deficiency will be corrected in the future.) example: *IDENT MOD1 *ID AGl91081 5.11 *IF (*IF) This record is put into the deck in the library file and is tested when writing the compile file. SLIB77 tests the named switch (up to 8 alphanumerics) on this card and if not set will skip the following records until an ENDIF directive is encountered. (NOTE: if a minus is in front of the switch name it has the OPPOSITE SLIB77 - USER GUIDE Page 15 BATCH MODE DIRECTIVES 31 Aug 83 effect). *IF's may be nested, but it must be realized that if the first IF is not set the inner IF will have no effect. examples: | *IF EDIT records | a record Switch written on | *IF VAX setings compile file | b record EDIT only a, c | *ENDIF VAX only none | c record EDIT and VAX a, b, c | *ENDIF neither none | *IF EDIT records a record Switch written on *IF VAX setings compile file b record EDIT only a, c, d, e *ENDIF VAX only none c record EDIT and VAX a, b, c, e *IF -VAX neither none d record *ENDIF e record *ENDIF 5.12 *INSERT (*I) This directive is used to precede records to be inserted into a deck of the library. The records following this will be inserted immediately following the record identified on this directive. There must be an *DECK directive prior to this record. This record is not put into the library. example: *INSERT ALPHA.1 *I MOD1.10 5.13 *MOVE (*M) This directive is used to re-arrange deck order in the library. the 2nd and suceeding named decks are moved to follow the first named deck on this record. example: *M A,B,C (decks B and C will be moved from their current locations to new locations following deck A) SLIB77 - USER GUIDE Page 16 BATCH MODE DIRECTIVES 31 Aug 83 5.14 *PURGE (*P) This directive is used to de-activate entire decks . The new library will still contain the decks but currently there is no way to access them. example: *PURGE ALFA,BETA *P ALFA 5.15 *READ (*RD) This directive is used to signal SLIB77 to stop reading the current input file and begin reading the named file until it encounters an end-of-file then resumes with the next record from the preceding input file (note: up to 50 nested input files are allowed). example: *READ ALT.DAT *RD A2.DAT 5.16 *RENAME (*RN) This directive is used to rename decks in the library. The deck with the first name on the record is renamed to the second name on the record. The old name will disappear immediatly and all of the records with the original deck name will now have the new name instead. Even UPDATE and YANK will never refer to the old name. example: *RENAME ALFA,ALFAO *RN OLD,NEW 5.17 *RESTORE (*R) This directive is used to reactivate a record or group of records previously deactivated (with *DELETE directive) within a deck. New records to be added can follow this directive and will be inserted following the last record reactivated. example: *RESTORE ALFA.1 *R MOD1.6,MOD1.8 SLIB77 - USER GUIDE Page 17 BATCH MODE DIRECTIVES 31 Aug 83 5.18 *UPDATE (*U) This directive is used to remove all deleted records and purged decks. The new library thus created will have only active records in each deck. example: *UPDATE *U 5.19 *YANK (*Y) This directive is used to completely remove modification sets. All decks are searched for all records affected by the named modification deck and any subsequent modification sets and the effect is reversed in the new library created. The modification sets are written on the source file. The net effect is to take the new library back to before this modification set and to produce the modification set records to bring this library up to the previous library status. example: *YANK MODAL *Y MOD23 SLIB77 - USER GUIDE Page 18 SPECIAL NOTE FOR IBM USERS 31 Aug 83 6.0 SPECIAL NOTE FOR IBM USERS This note is being included because of the special effects that will occur when the IBM switch is set. The IBM version DOESN'T open any files except the DIRECT ACCESS files. The NAME of the file is NEVER used on the OPEN statement and the files are opened as OLD and must have been created and initialized before the run. The files which will be opened as 11, 31, 49 and 50, as requested on the parameter records. The length of the records in files (11), (31) and (50) is 512 bytes and there are about 600 records in the current library. The length of the records on (49) is the length specified with the W parameter on the Control Statement- or as specified by the Library and the records are actually those that are input on file 51 (excluding any records in ADDed decks.). The DIRECT ACCESS files can be created as formatted files with each record written with the number of characters per record defined above and with the proper number of records necessary. SLIB77 - USER GUIDE Page 19 FILES USED 31 Aug 83 7.0 FILES USED The files used are: 7.1 TERMINAL (BATCH and EDIT) (1 and 2 for Prime) (5 and 6 for others) Formatted, Sequential This is the terminal the user communicates with the program with to signal EDIT or BATCH mode and to enter the EDIT mode commands with. Error messages from a BATCH mode run will also appear here. 7.2 NEW LIBRARY (11) (BATCH only) Unformatted, Direct access, Fixed record length (512 bytes) This is the master output from a BATCH run only. It contains all the decks, common decks, switches and other history information the user has input. 7.3 SOURCE (12) (BATCH and EDIT) Formatted, Sequential, Record length variable (1 to 72) This file is output from either mode of execution and contains: 1. For EDIT mode: The modification records necessary to use as input to a BATCH mode run to make the changes to the library that were made interactively. (It will have all the *DECK , *DELETE , *INSERT etc records, but it will NOT have an *IDENT record.) A separate file will be automatically written for each deck edited. 2. For BATCH mode: SLIB77 - USER GUIDE Page 20 FILES USED 31 Aug 83 (Only if requested using a C parameter on the Control Statement) It will contain all the active records of all decks 'processed' during the run. The records will not have the sequencing information on them. 7.4 LIST OUTPUT (13) (BATCH only) Formatted, sequential, Printer control character, record length variable (1-132) This file is output from a BATCH mode run only and contains the list output from the run. The output is controlled by the L and LO parameters on the Control Statement. It contains all the requested listings as well as any program messages for the user 7.5 COMPILE (14) (BATCH and EDIT) Formatted, Sequential, Record length fixed by the Width parameter. This file is output from either mode of execution and contains the active records of decks processed (in an EDIT run a separate file will be written for each deck edited), including the decks *CALLed, and excluding records bypassed with *IF's. (The record length is fixed at the width as specified by the W parameter plus that required by the SQ parameter (0 for N, 8 for C, and 15 for F). 7.6 COMPATIBLE LIBRARY INPUT (15) (BATCH only) Formatted, Sequential, Record length variable (1 to 80 characters) This file will be read (Batch run only) if the PA parameter is included on the Control Statement. It is a file previously written as COMPATIBLE LIBRARY OUTPUT (16) and contains all the information of a library file (including switches, deleted records etc). It will typically have been brought from a different make of computer on tape. (If the record length is greater than 80 and a record is longer than 80 the record will have been written as SLIB77 - USER GUIDE Page 21 FILES USED 31 Aug 83 two records and combined by the program when they are read). 7.7 COMPATIBLE LIBRARY OUTPUT (16) (BATCH only) Formatted, sequential, Record length variable (1 to 80) This file is created if the NA parameter is used on a BATCH run. it contains all the information to re-create the Library when used as COMPATIBLE LIBRARY INPUT (15) on a succeeding run. It is typically used to transfer a Library from one computer to another. 7.8 BACKUP OUTPUT (17) (EDIT only) Formatted, Sequential, Record length variable (1 to W characters) This file is written during an EDIT mode run automatically for each deck edited and is actually a copy of all the user input to the program. It is to be used if the computer goes down or if the user aborts the program as BACKUP INPUT (18) to recover to the abort point. 7.9 BACKUP INPUT (18) (EDIT only) Formatted, Sequential, Record length variable (1 to W characters) This file is input during an EDIT mode run at the user request and if used the program will recover to the point an abort was made on an earlier run. The file would have been written as BACKUP OUTPUT (17) and automatically saved when the abort run terminated. 7.10 CONTINUE OUTPUT (19) (EDIT only) Unformatted, Sequential, Record length variable (1 to 30000 bytes) This file is made at the end of the EDIT of a deck automatically and contains all the information neccesary for a succeeding run to be able to start at the point the previous run ends. It would be input as CONTINUE (20) on the succeeding run. SLIB77 - USER GUIDE Page 22 FILES USED 31 Aug 83 7.11 CONTINUE INPUT (20) (EDIT only) Unformatted, Sequential, Record length variable (1 to 30000 bytes) This file is input at the user request to CONTINUE from a previous EDIT run. It allows the user to start with all the changes to a particular deck that were made during a previous edit run and make more changes. 7.12 OLD LIBRARY (31) (BATCH and EDIT) Unformatted, Direct Access, Fixed record length (512 characters) This is the master input library file to both EDIT and BATCH mode runs and is the output from a previous BATCH run with the N parameter specified (it was output as NEW LIBRARY (11) on the previous run). It contains all the decks, common decks, switches, and other information about the decks/records being manipulated. 7.13 SCRATCH INPUT (49) (BATCH only) Unformatted, Direct Access, Scratch, Fixed record length (W characters) This is a scratch file made during a BATCH run to store input records on during the run. It is automatically deleted at the end of the run. 7.14 SCRATCH LIBRARY (50) (BATCH only) Unformatted, Direct Access, Scratch, Fixed record length (512 characters) This is a scratch file made during a BATCH run to store modified decks on during the run, it is automatically deleted at the end of the run. SLIB77 - USER GUIDE Page 23 FILES USED 31 Aug 83 7.15 INPUT (51 To 91) (BATCH only) Formatted, Sequential, Variable record length (1-W characters) This is the user input file for a BATCH run. The program reads the CONTROL STATEMENT (maximum width=80 for CONTROL STATEMENT records) from (51) and continues to read from this file until the end is reached. If a *READ directive is encountered it opens the named file as (52) and continues. If a *READ directive is encountered on this file it again increments the file number and continues. When it reaches the end of the current file it decrements the file number and goes back and continues reading that file until it returns to end of the original file (51) at which point it discontinues reading input. SLIB77 - USER GUIDE Page 24 SAMPLE RUNS 31 Aug 83 8.0 SAMPLE RUNS The following sample runs are to demonstrate some of the potential of the program and are for demonstration only ( Note: in many of the samples extra blanks have been removed to be able to fit this page - none of the essential data has been removed.) ( Also note that there are DELIBERATE errors in demo1 that are corrected in demo2 in order to demonstrate actual typical uses of the program). 8.1 DEMO 1 (Make A Library) this is the input file for demo 1 _________________________________ SLIB,P=0,N=DEMO1.L77,L=DEMO1.OUT,C=DEMO1.FOR *ID START *ADDDECK TEST PROGRAM TEST C DEMO C Demo program for SLIB77 COMMNO /A/ X(20),Y(30) C DO 20 I=1,10 X(I)=I Y)I)=X(I)*2 20 CONTINUE STOP END this is the output list file from demo 1 ________________________________________ ADDING DECK TEST LIBRARY STATISTICS 8/06/82 SLIB77 VERSION 2 PAGE 1 DECKS (#=PURGED, *=COMMON) TEST MODIFICATIONS START RUN STATISTICS MAXDCK 1 500 MAXWRD 257 75000 MAXMNA 0 500 SLIB77 - USER GUIDE Page 25 SAMPLE RUNS 31 Aug 83 MAXMDK 0 500 MAXMDD 0 500 MAXSWI 0 50 MAXDRR 2 500 this is the compile file created by demo 1 __________________________________________ PROGRAM TEST TEST 1 C DEMO TEST 2 C Demo program for SLIB77 TEST 3 COMMNO /A/ X(20),Y(30) TEST 4 C TEST 5 DO 20 I=1,10 TEST 6 X(I)=I TEST 7 Y)I)=X(I)*2 TEST 8 20 CONTINUE TEST 9 STOP TEST 10 END TEST 11 8.2 DEMO 2 (Modify To Correct) this is the input file for demo 2 _________________________________ SLIB,P=DEMO1.L77,C=DEMO2.FOR,N=DEMO2.L77,L=DEMO2.OUT *ID MOD2 *DECK TEST *D 4 COMMON /A/ X(20),Y(30) *D 8 Y(I)=X(I)*2 this is the output list file from demo 2 ________________________________________ MODIFICATIONS - IDENT -MOD2 8/06/82 SLIB77 VERSION 2 PAGE 1 DECK **** TEST **** DEL TEST 4 COMMNO /A/ X(20),Y(30) ADD MOD2 1 COMMON /A/ X(20),Y(30) DEL TEST 8 Y)I)=X(I)*2 ADD MOD2 2 Y(I)=X(I)*2 LIBRARY STATISTICS 8/06/82 SLIB77 VERSION 2 PAGE 2 DECKS (#=PURGED, *=COMMON) TEST MODIFICATIONS SLIB77 - USER GUIDE Page 26 SAMPLE RUNS 31 Aug 83 START MOD2 RUN STATISTICS MAXDCK 1 500 MAXWRD 37757 75000 MAXMNA 1 500 MAXMDK 0 500 MAXMDD 2 500 MAXSWI 0 50 MAXDRR 4 500 this is the compile file output from demo 2 ___________________________________________ PROGRAM TEST TEST 1 C DEMO TEST 2 C Demo program for SLIB77 TEST 3 COMMON /A/ X(20),Y(30) MOD2 1 C TEST 5 DO 20 I=1,10 TEST 6 X(I)=I TEST 7 Y(I)=X(I)*2 MOD2 2 20 CONTINUE TEST 9 STOP TEST 10 END TEST 11 8.3 DEMO 3 (Add Common Deck And Switches) this is the input file for demo 3 _________________________________ SLIB,P=DEMO2.L77,N=DEMO3.L77,L=DEMO3.OUT,C=DEMO3.FOR *DEFINE VAX *ID MOD3 *DECK TEST *D MOD2.1 *CALL COMONA *I TEST.9 CALL PRT *ADDCOMD COMONA,TEST C COMMON /A/ X(10),Y(10) C *ADDDECK PRT SUBROUTINE PRT C print arrayr *CA COMONA SLIB77 - USER GUIDE Page 27 SAMPLE RUNS 31 Aug 83 LU=9 *IF VAX LU=6 *ENDIF *IF PRIME LU=2 *ENDIF C WRITE(LU,11)X,Y 11 FORMAT(' X=',10F5.1,/,' Y=',10F5.1) RETURN END this is the output list file from demo 3 ________________________________________ ADDING DECK COMONA ADDING DECK PRT MODIFICATIONS - IDENT -MOD3 8/06/82 SLIB77 VERSION 2 PAGE 1 DECK **** TEST **** DEL MOD2 1 COMMON /A/ X(20),Y(30) ADD MOD3 1 *CALL COMONA ADD MOD3 2 CALL PRT LIBRARY STATISTICS 8/06/82 SLIB77 VERSION 2 PAGE 2 DECKS (#=PURGED, *=COMMON) *COMONA TEST PRT MODIFICATIONS START MOD2 MOD3 RUN STATISTICS MAXDCK 3 500 MAXWRD 37757 75000 MAXMNA 2 500 MAXMDK 0 500 MAXMDD 2 500 MAXSWI 1 50 MAXDRR 7 500 this is the compile file output for demo 3 __________________________________________ PROGRAM TEST TEST 1 SLIB77 - USER GUIDE Page 28 SAMPLE RUNS 31 Aug 83 C DEMO TEST 2 C Demo program for SLIB77 TEST 3 *CALL COMONA MOD3 1 C COMONA 1 COMMON /A/ X(10),Y(10) COMONA 2 C COMONA 3 *END COMONA .......0 C TEST 5 DO 20 I=1,10 TEST 6 X(I)=I TEST 7 Y(I)=X(I)*2 MOD2 2 20 CONTINUE TEST 9 CALL PRT MOD3 2 STOP TEST 10 END TEST 11 SUBROUTINE PRT PRT 1 C print arrayr PRT 2 *CA COMONA PRT 3 C COMONA 1 COMMON /A/ X(10),Y(10) COMONA 2 C COMONA 3 *END COMONA .......0 LU=9 PRT 4 *IF VAX PRT 5 LU=6 PRT 6 *ENDIF PRT 7 *IF PRIME PRT 8 *ENDIF PRT 10 C PRT 11 WRITE(LU,11)X,Y PRT 12 11 FORMAT(' X=',10F5.1,/,' Y=',10F5.1) PRT 13 RETURN PRT 14 END PRT 15 SLIB77 - USER GUIDE Page 29 PROGRAM EXECUTION DESCRIPTION 31 Aug 83 9.0 PROGRAM EXECUTION DESCRIPTION The program overall operation is: 1. Initialize. 2. Determine if run is to be EDIT or BATCH by reading terminal or terminal simulator). IF BATCH: 3. Read input records - write all records (except ADD deck records which are pre-processed) on random scratch file. 4. Read in old libraries if requested. 5. Process (one modification set at a time) all modifications and pre-processed ADD decks and create list of modifications made if requested. 6. Process decks to be written on COMPILE, SOURCE and LISTING files as requested. 7. Write new program libraries if requested. 8. Print case statistics. IF EDIT: 3. Interact with user to modify a single deck. 4. Write Compile, Source, and Backup files 5. Return to step 3 if user requests to edit another deck 6. End run SLIB77 - USER GUIDE Page 30 INSTALLATION MANUAL 31 Aug 83 10.0 INSTALLATION MANUAL This manual is being included in the Users Guide since it is such a short manual and might give the user some additional insight into the program. 10.1 COMPUTER PROGRAM REQUIREMENTS Some stipulations have been made due to the Authors computer installation - these may be modified in time but, for now: a. The program MAY require a compiler that will "SAVE" every variable in each subroutine. b. The program is designed around integer variables that are all the same length (on the VAX the program is currently using all integers as INTEGER*4). The program will probably work with INTEGER*2 but it has not yet been tested. c. There is an array in the program dimensioned large enough to hold any deck placed into the program twice. (Currently this is set to 75000 words dimensioned NCHRWD). d. Some of the FORTRAN 77 features used are: Character Type Random access files Parameter SLIB77 - USER GUIDE Page 31 INSTALLATION MANUAL 31 Aug 83 e. The computer system must allow the program to reference an array in common to be accessed as CHARACTER in one subroutine and INTEGER in another subroutine. i.e. PROGRAM A COMMON/X/AX(100) CHARACTER *4 AX CALL B CALL C(AX(2),20) CALL C(AX(8),20) CALL D(1) CALL E(2) CALL D(7) CALL E(8) STOP END SUBROUTINE B COMMON/X/IX(100) IX(1)=1111 IX(7)=7777 RETURN END SUBROUTINE C(ALF,N) CHARACTER*120 ALF ALF(1:N)='this is an alfa test' RETURN END SUBROUTINE D(N) COMMON /X/ IX(100) WRITE(6,FMT='(1X,I4)') IX(N) RETURN END SUBROUTINE E(N) COMMON /X/ AX(100) CHARACTER*4 AX WRITE(6,FMT='(1X,4A)')(AX(I),I=N,N+4) RETURN END When executed should give: 1111 this is an alfa test 7777 this is an alfa test SLIB77 - USER GUIDE Page 32 INSTALLATION MANUAL 31 Aug 83 10.2 INSTALLATION OVERVIEW Installation of the SLIB77 program consists of four major steps: 1. Creation of an appropriate directory structure to contain the program files. 2. Copying the two files from the tape to disk. 3. Compilation and linking of the program. (file no. 1) 4. Execution of the program using the COMPATIBLE file (file no. 2) as input to create a library file. Future changes to the program will then be applied to the library file to create a new library file and thus keep the program up to date. 10.3 DISTRIBUTION INFORMATION SLIB77 is distributed as two files on a 9-track magnetic tape, 1600 bpi, EBCDIC, 80 char/record, 50 rec/block unless requested otherwise. The first file will be the source for the current version of the program (in as close a format for the users' computer as possible). The second file is the COMPATIBLE input for the program, containing all records active and deleted. NO SWITCHES WILL BE SET IN THIS FILE - THEY MUST BE SET BY THE USER WHEN CREATING THE LIBRARY FILE! SLIB77 - USER GUIDE Page 33 INSTALLATION MANUAL 31 Aug 83 10.4 INSTALLATION PROCEDURE AND NOTES 1. Create an appropriate directory for the program files to reside in. 2. Copy the two files to the directory. The first file contains the program source records. The second is the COMPATIBLE file to be used as input to the program. 3. Compile and link the program. It may be necessary to modify the program to get it to compile. If modifications are necessary please inform the author. The program is being maintained on a computer that 'saves' all variables. No problems are expected if, on other computers, all the variables are not saved. Integer *4 was used as the default type for all variables in the program. A change to integer *2 is not expected to cause problems. The following parameters may have to be checked: (if these are changed, in the executing program after the library is made the library will not be useable, and would have to be re-created from the compatible file). NCHRWD - number of characters per word (4 for integer *4 default) (2 for integer *2 default) NWRDBK - number of words per block (...when dealing with random access files to put records on natural hardware boundaries), i.e., 128 words on the VAX when NCHRWD = 4 because the physical record size on the VAX is 512 characters. (it is probably not needed -maybe not even desired but for the Vax it was this programmers desire to put the records on physical boundaries, although with new information this may not have been accomplished). MAXWID - ( currently 72 ) maximum width of records ( in characters) to be used with the system. Discuss this with the author if some other size is needed. All other parameters can be modified later to accommodate the user environment. SPECIAL NOTE FOR IBM USERS: ___________________________ For IBM computers (because IBM does not supply a system DATE routine) it will be necessary to install in a Library on the computer a subroutine CLDATE(I,J,K) which will return I (month number), J (day number), and K (year - i.e. 82 ). I, J, and K will be INTEGER*4 variables in the calling subroutine XDATE. SLIB77 - USER GUIDE Page 34 INSTALLATION MANUAL 31 Aug 83 4. Set up an input (file 51) to request the program to use the COMPATIBLE file as input (on file 15) setting all switches necessary for the installing facility. Examples (input file 51): SLIB,P=0,PA,N *DEFINE PRIME *DEFINE FILEVN | *DEFINE REC2 *DEFINE TERM1 *DEFINE EDIT *DEFINE SALFRD SLIB,P=0,PA,N *DEFINE IBM *DEFINE REC1 *DEFINE TERM5 *DEFINE EDIT SLIB77 - USER GUIDE Page 35 INSTALLATION MANUAL 31 Aug 83 10.5 PROGRAM SWITCHES The following switches are referenced by decks in the library : CDC This is used if the program is running on CDC to obtain the system date and to set proper OPEN parameters. COS This switch is used if the program is running on a CRAY computer with Cray Operating System to obtain the system date. DGEN This switch is used if the program is running on a DATA GENERAL computer to obtain the system date and to set the proper OPEN parameters. EDIT This switch is used if the computer allows interactive edit mode (Actually it is turned off if the computer doesn't). FILEVN This switch is used if the computer does not allow version numbers on files. It will modify the EDIT MODE file names so that a new file name is created (ALFA.1 if ALFA is present) for each deck edited. (currently set for the PRIME) HARRIS This is used if the program is running on HARRIS to obtain the system date and to set proper OPEN parameters. HP1 This is used if the program is running on HP-1000 to obtain the system date and to set proper OPEN parameters. IBM This is used if the program is running on IBM to obtain the system date (with a subroutine CLDATE(I,J,K) that each IBM installation must supply) and to set proper OPEN parameters. I4 This is used if the program is compiled with INTEGER*2 to indicate those variables that must be INTEGER*4. PRIME This is used if the program is running on PRIME to obtain the system date and to set proper OPEN parameters. REC1 This is used if the length of direct access unformatted file records is to be specified in CHARACTERS (bytes) ( CDC, IBM, and HP-1000). | REC2 This is used if the length of direct access unformatted file | records is to be specified in WORDS (2-bytes) ( PRIME, Note - | the Prime manual says this is in CHARACTERS - but it is found | that the files are twice as long as they should be. If Prime | ever corrects this the program will be modified to whatever | Prime decides on). REC4 This is used if the length of direct access unformatted file records is to be specified in LONGWORDS (4 bytes) (VAX and UNIVAC). SALFRD This switch is used if the program is to be run on a PRIME SLIB77 - USER GUIDE Page 36 INSTALLATION MANUAL 31 Aug 83 with the UNIVERSITY OF SALFORD compiler. It will modify the OPEN parameters. TERM1 This is used if the terminal is file 1 and 2 (PRIME) TERM5 This is used to set the terminal file variables to 5 and 6 for the VAX, IBM, HP-1000, and UNIVAC. UNIVAC This is used if the program is running on UNIVAC to obtain the system date and to set proper OPEN parameters. VAX This switch is used with the VAX to: a. Modify input so the Vax user can use tabs b. Modify the VAX input so the INCLUDE 'fn records are changed to *CALL records so the user doesn't have to modify the source records. c. Obtain the system date d. Set the proper OPEN parameters. SLIB77 - USER GUIDE Page 37 INSTALLATION MANUAL 31 Aug 83 TABULATION OF SWITCH SETTINGS BY COMPUTER __________________________________________ This table indicates (by computer) switch settings that will be set (for the COMPILE file) by the author prior to sending the program. (NOTE: no switches will be set in the COMPATIBLE file) X = SET FOR: SWITCH CDC DATA GENL HP-1000 PRIME VAX CRAY HARRIS IBM UNIVAC REC1 X X X X X REC2 X REC4 X X X TERM1 X TERM5 X X X X X X X X CDC X COS X DGEN X HARRIS X HP1 X IBM X PRIME X UNIVAC X VAX X EDIT ( will be set unless requested otherwise ) I4 ( will not be set unless requested ) FILEVN ( will be set for PRIME and DATA GENERAL unless otherwise requested) SALFRD ( will be set for PRIME if requested)