Digital PDFs
Documents
Guest
Register
Log In
DEC-08-WDIA-D
2000
41 pages
Original
1.6MB
view
download
Document:
DIBOL Programming Example
Order Number:
DEC-08-WDIA-D
Revision:
Pages:
41
Original Filename:
http://bitsavers.org/pdf/dec/pdp8/dibol/DEC-08-WDIA-D_DIBOL_Programming_Example.pdf
OCR Text
Maynard ........... - iii l-l'LJJ.l•X/! • _... • ......- ' e DIBOL Programming Example DEC-08-WDIA-D PDP-8/1 DIBOL PROGRAMMlt'1G EXAMPLE DIGITAL EQUIPMENT CORPORATION • MAYNARD, MASSACHUSETTS TM DIBOL TABLE OF EXAMPLE CONTENTS Page No. 1 I. INTRODUCTION II. SYSTEM FLOW CHART 2-3 III. FILE DEFINITIONS 4 IV. DESIGN OF INPUT TRANSACTION 5 v. GENERALIZED INPUT FACILITY 6-13 1) 2) 3) 4) 5) Data Field Statement (A Lines) Output Statement (B&C Lines) Input Statement (D&E Lines) Output Devices (F Lines) Sununary SORT 14-17 VII. STOCK STATUS PROGRAM 18-23 VIII. STOCK STATUS REPORT 24 FILE MAINTENANCE-GENERALIZED UPDATE FACILITY 25-32 VI. IX. 1) 2) 3) 4) Update control Input Data Record Update Sort Update Report (Audit Trial) APPENDIX -1- I. INTRODUCTION This document gives a detailed description of an inventory control system using the DIBOL language and the DIBOL data management facilities. The data management facilities described are: 1) Generalized Input 2) SORT 3) Generalized Update The appendix to this document contains additional information on the components of the DIBOL Software System. It is suggested that you review the Appendix before continuing with this example. All the necessary steps required for a commercial application are contained in this description. -2- II. SYSTEM FLOW CHART The first step is to lay out the system flowchart. This establishes the sequence of operation, the various uses of input and output files and the reports generated. The system flow chart for this inventory system is: * I(-·--------------d Inventory ** ~~a~~-i~. rGeneraliz d Input - ITransactionj ! Listing j ~-- Transactio Listing eneralized Update Input Inpub. Trans-\ action ; ,_p·1 e_]j J I __s_o_R.--T_ _ Stock Status I~ Report __.J ..--- J Update ..:Rep[_J·rt Audit .'···-... Trial __ -3- The Stock Status Program is the only user created program. All other programs are part of the Data Management Facility and the user need only to define the parameters. * The first step in the flowchart is the data capture phase. It uses the generalized input to convert inventory transactions (receipts, orders, and amount used) to individual records on DECtape, and also produces a proof listing of all input transactions. The second step sorts these transactions into inventory master order. Finally, the third steps runs the sorted inventory transactions against the old master and creates a new inventory master file. In addition, a stock statup print-out is generated showing current activity and year-to-date totals. ** In the case of maintenance transactions, the generalized update input converts the maintenance transactions (changes, insertions, deletions) to individual records on DECtape, while also generating a proof listing. The ~econd step sorts these transactions into inventory master file order. The third step, runs the sorted updated transactions against the old master, and creates a new inventory master file. In addition, an update report (audit trail) is generated showing the old inventory item value and its new value after upaa'ting. -4- III. FILE DEFINITIONS After the flowchart has been designed, the content and format of all of the DECtape files must be precisely defined. In the case of this example, there are two files - the inventory master and the transaction file. The formats are: Inventory Master Field Number 1 2 3 4 5 6 7 Description Commodity Identification Description Number on Hand Number on Order Number Used Year-to-Date Minimum Balance Unit Cost Size Decimal Alpha Decimal Decimal Decimal Decimal Decimal 4 16 4 4 4 4 6 42/Each inventory record is 42 characters long There is one inventory master record for each item stocked. The record contains a commodity identification number, a description of the item, the number on hand, the number on order, the number that has been used, a minimum balance and a unit cost. These are referred to as fields within the record. Transaction File Field Number 1 2 3 Description Commodity Identification *Key Amount *Key: 1 = order 2 = receipt 3 = use Size Decimal Decimal Decimal 4 1 3 8/Each input transaction is 8 characters long There are three types of transactions. An "order" means an increase to the number on order. A receipt means an increase to the number on hand and a corresponding decrease to the number on order. Finally a "use" transaction means a decrease to the number on hand. Each transaction record contains a commodity identification, the key indicating transaction type and the number of items affected for that commodity. -5IV. DESIGN OF INPUT TRANSACTION The next step is to design the input transactions~ In this case, order, receipt and use are referred to as commands.For this application, the input format is: the command, followed by the commodity identification, followed by the amount. The command will indicate the transaction type. The commodity identification refers to the appropriate record in the inventory master. Finally, the amount indicates the number of units ordered, received, or used. An example of the input might be: e ID Amount) *ORDER 13 20 I ORDER 30 50 49 50 ORDER 22 26 *REC PT 23 20 REC PT 28 50 REC PT 50 90 REC PT Punched on paper tape or cards. 20 5 *USE USE 15 1 USE 14 1 22 USE 7 22 USE 10 USE 11 4 34 USE 3 35 USE 11 19 USE 15 USE 47 17 *These transactions specify that 20 units of item 13 were ordered, 26 units of item 22 were received, and item 20 was used five times. -6V. GENERALIZED INPUT FACILITY The Generalized Input Facility provides an easy means for capturing, editing and translating data which will later be used to update the master file. Once the transaction inputs have been created, the Generalized Input Control will read the transaction items as defined, convert them to the proper DECtape format, and perform careful error checking. The procedure for the Generalized Input is: First, the Generalized Input Program from the subsystem tape is loaded into memory by the Monitor. This program enables the computer to read in the Generalized Input Control and the transaction data; Second, the Generalized Input control is read from paper tape, card reader, or magtape (DECtape), which describes the inpui and output record formats; Third, the transaction paper tape is read in and converted to DECtape. There may be any number of paper tapes, each ending with a $ carriage return. After the paper tape has been read the teletype will write an asterisk. The user responds with a carriage return after loading the next paper tape or with an N followed by a carriage return at the end of the input. The Generalized Input Control facility requires the following information: 1. Definition of all data field, both input and output. 2. Definition of each output record stating which fields the record contains, their order and the output device (normally DECtape) . 3. Definition of each input record stating which fields the record contains, their order of occurrence (if they are required) and a replacement or alternate field. 4. A summary of the output devices. This information is recorded on a series of statements or lines, with each unique statement assigned a letter from A through F. The Generalize input control must follow this indicated sequence; i.e., A,B-C,D-E,F. -7In our Inventory Control problem the Generalized Input Control is: A A A A A B l l 2 3 4 5 1 1 1 1 , ,.L .i. c c 1 3 c 2 B 2 c c c B 4 3 1 1 1 Definition of Data Fields 1 2 3 Definition of Output Record (Order) 1 1 4 Definition of Output Record (Recpt) 2 3 c c c 1 1 5 I I I 2 Definition of Output Record (Use) ~---;;~;;-~----:-----;-\' E 2 D RECPT 2 1 E E D E E 2 USE 1 I~ Definition of Input Record Definition of Input Record 1 1 3 1 2 1 1 Definition of Input Record ' I ---------------------1 F 1 1 l- ~~~~~~~~~~~~-l Summary of Output Devices Let's examine each line in detail to understand the parameters. 1. Data F ield--Statement( A l_ines) Each Field is assigned a number, and defined as to size (number of characters) and type (alphanumeric or decimal). If a field is used as both input and output, it need be defined only once. A field may be input only, output only or both input and output. For the output only field, an option is available to initialize the field with a constant. -8The A statement format is: <field Numbe:r;> A <§onstan9 Field Number-- a one or two digit number Type-~=Alpha, l=Decimal Any one or two digit number Size-Constant-Any value up to 30 alphanumeric characters or 15 decimal digits long. The constant must be consistent with the field type and with.an alpha constant enclosed in quotes. This value may be changed by some command received later. In our inventory example, the input and output formats are defined as: Input Field # (3,or 4,or 5) ( 1) (2) DescriEtion Transaction Key Commodity ID Amount Type Size Dl D4 D3 Output Field # DescriEtion (1) Commodity ID (3,4,or 5) Transaction Key (2) Amount Type Size D4 Dl D3 The Data Fields would then be: ~ ......f '°' s:: ~ ~ s:: ::s ~ ~ 'fl A A A 1 2 3 1 1 1 4 3 1 A A 4 5 1 1 1 1 2. OutEut Statements (B & c lines) Q) ·r-1 ~ ~ 0 ta ..µ Ul s:: 0 v /field 1 is a decimal number 4 characters lon l(order) /field 3 is a decimal number 1 character long with an initial constant value of one at the beginning of the run (remember values 1,2,3, ref er to transaction key order, receipt, and use, respectively) • 2 (receipt) 3 (use) Each output record is assigned a record number, a device or file number, and the fields (in order) which make up the record. Each record may be written to a different device, or multiple records may be written on the same device. -9- The B statement format is: B 4-ecord numbey ~ile nurnbei) Record number-- any two digit number which is referenced by an input statement. (D line) File Number-any one digit number which is assigned to an output file. Output files are normally DECtapes 1-4. The C statement format is: ~ield numbe~ c Field Nurnber-- any number previously assigned in an A statement. In our example: B 1 c c c B 1 3 2 2 c c c B 1 2 /output record for the input command ORDER (1), on DECtape #1. The following C lines describe the output format. /data field 1, commodity ID /data field 3, transaction key 1, ORDER /data field 2, amount /output record for the input command RECPT (2) on DECtape #1. 1 4 2 3 1 /output record for the input command USE (3) on DECtape #1. c c c 3. 1 5 2 Input Statements (D & E lines) Each input record contains a transaction code or command, the fields (in order) which comprise the record, if they are required, and the options for field substitutions. Additionally, the output record number for the· transaction is identified. Options allow sequence counts to be kept, fields to be cleared before output, and indicators to be set which discloses the presence of a field. This last option is useful when a legal value for the field is zero. The D & E statement formats are: D <:Transaction Code:> ~utput Recorct> ~ero Field)> <fncrement)i or Command Number Field Transaction Code-- --up to a 6 character code or command Output Record Number-any one or two digit number that has previously been defined by a B statement. The B statement describes the output -10- Output Re~ord Number-format for this input command. This (continued) number may be zero which indicates this transaction is not to be written out. This can be used to initial fields via input data. Ze~o Field-If this parameter contains a number other than zero, it refers to a field number as defined in an A statement. This field will be set to zero prior to writing out the record. Increment Field-If this parameter contains a number other than zero, it refers to a field number as defined in an A statement. This field must be decimal and it is incremented by one each time the transaction code or command is encountered. This is useful as a sequence number or counter, e.g. invoice numbering. E <field> Number ~ecessar:i> Switch Field Number-- Necessary Switch- Present Field-- <(present> Field <Pefault> Field Any two digit number which refers to a field previously defined by an A statement. A one digit number which has a value of zero or one. Zero indicates the field is optional; (i.e., it may or may not be present) . One indicates the field is required. When required, if the field is missing from the input record, it is flagged as an error; e.g. in a payroll program, the input must contain the employee's name. A one or two digit number which refers to a field, previous defined by an A statement. This is used in conjunction with the necessary switch. If the necessary switch is zero, theh the field referenced by the present switch is set to one when the field is found on the input record and set to zero when the field is missing. The field referenced by the present field must be defined as decimal t (Dl) •· In our inventory example the present field was set to zero. See end of this section for a detailed explanation of the present field. Default Field-- -11A one or two digit number which refers tc a field previously defined by an A statement. This is used in conjunction with the necessary switch. If the necessary switch is set to zero, (indicating an optional field) and the default field is non-zero, then the field referenced (by the default field) is substituted when the input field is missing. The fields must be the same size= For example, E 3 O O 5 says if field 3 data is missing, substitute field 5 in its place. Note, only the present field or the default. field may be used. They cannot be used together, and they may be used only when the necessary switch is zero. In our example, the D & E lines are: D ORDER ., E E D .1. 2 REC PT E E D E E 1 2 1 ·2 USE l 1 /Every time there is a transaction ORDER input it will be outputted according to Bl /Item number-must be present /Amount--must be present 1 1 3 1 2 1 1 DETAILED EXPLANATION OF PRESENT FIELD In order to give you a better understanding of the usage of the present field, another example might be helpful. Suppose we had a billing operation in which there could be price overrides. The inputs to this example would be: Commodity ID, # shipped, and price override (if present) . The output would be: Commodity ID, # shipped, price override present (yes/no) price override -12The Generalized Input Control for this example would be: Data Fields A A 1 2 3 4 0 1 1 1 B 1 1 c c c c Output Records D Input Records 4. /Commodity ID /# Shipped /price present /price override 5 4 1 6 /output the input command 1 on DECtape 1 1 2 3 4 I E E E /output this input transaction I according to Bl 1 1 2 4 1 1 0 /Commodity ID-required /# shipped-required /override price not_required but,if present, Set A3 to 1 and use override price (special price) of A4. If override price not. present the A3 would be zero and the price on the commodity master would be used. In this manner, a special price to customers may be recorded. 3 Summary of Output Devices (F line) F statement defines file specifications. This simply indicates the number of different DECtapes· specified as the file number on all the B lines. The format is: F In our inventory example: F 1 1 /says ..total number of one file, on DECtape #1 -13Now, let's put all of these statements back together in our Generalized Input Control to see the entire operation. A A A l l 2 3 1 1 4 3 1 1 A 4 1 1 2 A 5 l l 3 B l 1 c B 1 2 1 c c l 4 c 2 B 3 c c c D 1 5 2 ORDER 1 1 E D E E 2 D T:"I .c /Output record for the input command 3 on DECtape #1 1 E E E /Data Field for commodity number,4 digitE /Data field for amount, 3 digits /Data field for order transaction key, constant of 1 /Data Field for receipt transaction key, constant of 2 /Data Field for use transaction key, constant of 3 /Output record for the input command 1 (ORDER) on DECtape #1 /(Output format) field 1-item nurr~er field 3-order key field 2-amount /Output record for the input command 2 (RECPT) on DECtape #1 REC PT USE , J.. 2 1 2 3 1 2 , 1 1 /Input transaction record ORDER to be outputted according to Bl /Input item number--required /Input Amount--required 1 1 l 1 ..L. /Total number of files 1, on DECtape #1 As each transaction is read by the Generalized Input program, it is listed and any transactions in error will have an error message printed to tbe left. Only valid transactio~s are written on the output tape. From the transaction input, i.e.,, USE 20 5, this would be outputted on DECtape 1 as: 20 3 (use key) 5 This would be continued for all valid in:pu l:r.ansactions. -14VI. SORT The sort package allows the user to arrange a data file in any specified order. The user defines the records to be sorted and gives "sort keys" within the record. The sort run is a two or three phase process, depending on the number of input DECtape files. The system's tape contains the programs for sort phase 1, sort phase 2, and sort phase 3. Each program enables the system to perform specific sort operating instructions. These programs are called into core by the DIBOL monitor. The user must create the sort control program defining the sort parameters. The three phases of the sort operation follow: The first phase is an internal sort. It reads in a predetermined number of records from the input file, sorts them as specified by the sort control, and writes them out on DECtape #3. This operation is continued until the end of the input DECtape. The output from Phase I will contain a string of sorted subfiles on DECtape 3. The number of input DECtapes will normally equal the number of output DECtapes after Phase I. In the case of a single reel input, the Phase I output will be a single subfile. In the case of multi-reel inputs, when an output subfile is filled, the operator is requested to take it down and put up a new tape for the next Phase I output subfile. Phase II then uses a multi-phase merge to sort each output from Phase I; i.e., strings of sorted subfiles so that only one sorted string remains. Phase II requires the use of all four DECtapes. Phase II must be run as many times as there are output files from Phase I. The Phase III sort is used only in the case of multi-reel files. Phase III merges the Phase II outputs into a single multi-reel output file. (Phase III is not required if there is only. one output subfile from Phase I) . If there are 2 input files (DECtapes), then there would be 2 output files (DECtapes) after Phase I; each containing strings of sorted subfiles. Each output file would then be individually sorted (sort strings of subfiles into one) so that after Phase II there are two files, each on DECtape and each separately sorted. However, this still means there are two sorted subfiles. Phase III will merge the two sorted subfiles into one sorted file. -15- has the following process chart: ' ' DTA3 - Perform this operation only if 2 input files \. (DECtapes) ' DTA3 / sort phase II \ \ sort phase II I \ I DTA2 or DTA4 DTAl DTA2 DTA3 DTA2 or DTA4 sort phase III , I / / \ '" (output) file j I DTA4 / '-~;-:: . In our inventory exampie, now -that/ the transactions are converte d from input format to DECtape format, vou need to sort them into the order of the inventory masten.that is by commodity identification.To do so, order the records in· the ascending, order of the first four characters (commodity identification). The sort control for this is simply: first linE ¢¢518¢¢1¢1¢5¢ sec. line ¢¢2¢2¢¢ (Punched on paper tape, cards s or magnetic tape) The first line (13 characters) defines the sort keys. The second line (7 characters) defines the record (sort field} to be sorted, and its position on the DECtape file. In our example the sort field is by commodity identification. Let's examine what each character means: -161-3 (005) /Record input size in words to calculate the size of the input record in words, add 1 to the record character length divided by 2 (drop any remainder) plus 1. In our example the transaction input record is 8 characters long7 i.e., commodity ID, key, and amount (refer to transaction file) 8 + 1 = 9 2= 4 + l= 5 (coded as 005) 4-7 (1800) /Internal Sort Buffer Size Must be a multiple of record size in words and less than 2000. One normally chooses this number as large as possible in order to sort as many records internally in Phase I. (There is no common practice for determining this buffer size, it is dependent on the record size) 1800= (5 x 360 a constant) 8 (1) Number of sort fields (If two sort fields are contiguous, they are considered as 1) . In our example there is only one sort field-commodity identification. 9-12 (0105) /Number of Blocks per DECtape This field times the size of the internal sort buffer must be less than 190,000 (words per DECtape). This is calculated by dividing internal sort buffer into 190,000 190, 000 ~ ... 1800= 105 (coded as 0105) 13 (0) /Phase 2 Input Save Switch If the input from Phase 2 should be saved, Code 17 If not, Code 0. Sort coded 0 will write over the input to Phase 2. Normally this field is 0 and the input tapes to Phase 2 are written over as part of the multiphase merge. SECOND LINE (One for each sort field) 7 charactersll 2 314 51617 .olo l1_ol2_0_0 1-3 (OOl)Beginning Location of field on the DECtape file First position of field+ 2 (drop remainder) In our example commodity ID begins in Position 1 (See Transaction file) i-:- l+l~ ' 4-5 2=1 (02)Number of words spanned The formula for calculating words spanned is dependent on the beginning position of the field on the DECtape file, i.e., even or odd, and the number of characters in the field, again even or odd. The formula for words spanned is: -17Beginning Position # of Characters Calculation in Field Even Even Odd Odd Even Odd Odd Even = # of Characters : 2+1 = = # ,....-i= Characters : 2+1 # of Characters~ 2+1 = # of C'l?-aracters+ 2 (all remainders are dropped) \J.1- In our example Commodity ID begins in Position 1, and is four characters long 4 -;- 2=2 (Odd,Even) 6 (0) 7 (0) /First word switch If final character of sort key is even, code as l; if odd, code 0 (it's odd in our example, it starts in Position 1) /Last word switch If ending position for sort key is odd, code as l; if even, code 0. In our example commodity ID ends in Position 4 (4 characters) VII. STOCK STATUS PROGRAM The major portion of this application is the user created program which updates the inventory master and prints the stock status report. This program consists of only 164 DIBOL statements, of which 80 are executable. The other 84 statements are used to define the various data elements. The program is: START BLOCK M ;X¢\1l3 - DEMO UPD + Ml, M2, M3, M4, M5, M6, M7, D4 Al6 D4 D4 D4 D4 D6 Tl, T2, T3, BLOCK HOF,C D4 Dl D3 Pl, RP~ P2 P3, ?4, P5, BLOCK T ?6, P7, PB D2,7~ Al Dl BLOCK CHD, P9, c . D2 All, ' ID DESC' A14 A9, 'POH XCP ' All,'#CUR #YTD A13,'NOH ORD MBAL' A4 A5, 'ucos·r' PHD2, D2 Al\ll,'STOCK STAT' Al¢,' US REPORT ' A2¢ AB D2 Al Dl Q6 BLOCK P,C D2 PP, AB\1l Dl Q5 Q3 BLOCK,X D2 A2 USE, Q2, Q4, D4 D4 D4 D3 D2 D9 D6,P Dl,P D9 Dl Dl Ql, PROC BLOCK BLK,C . P11 MB, BLOCK PHD,C A24 A4,'PAGE' A4 Dl AB Al A12 Dl M9, Ml¢, PG, LN, TOT, DATE, TRAN, XCOST, EOFM, EOF'r, AB PHDl, Pl\1l REC, BLOCK A5,'XCOST' Dl . A4 Al A16 Al A4 Al A4 Al A4 Al A4 Al A4 Al A4 Al A4 Al ORD, TOT= PG= LN=5!1l INIT(2,V,IN) IF(TRAN.EQ.\ll)GO TO Q6 INIT(l,V,IN) INIT(3,V,OUT) CALL READM CALL READT IF(EOFM.EQ.l)GO TO Ql IF(EOFT.EQ.l)GO TO Q2 IF(Tl.GT.Ml)GO TO Q2 GO TO (ORD,RED,USE),T2 M4=M4+T3 CALL R~ADT READM, GO TO Q3 M4=M4+T3 M3=M3+T3 M9=M9+T3 CALL READT GO TO Q3 M3=M3+T3 M5=M5+T3 Ml\1l=Ml(4+T3 CALL READT GO TO Q3 PP= IF(M3,GE,M6)GO TO Q4 PP(l,1)='*' Pl=Ml P2=M2 P3=MB P4=M9 P5.,M1¢ P6=M5 P7=M3 PB=M4 P9=M6 Plf4=M7,'X,XXX,XX' XCOST=M3*M7 Pll=XCOST,'X,XXX,XXX.XX' TOT=TOT+XCOST CALL PRINT XMIT ( 3,M) CALL READM GO TO Q5 XMIT(6,BLK) PP= PP(67,67)='*' Pll=TOT,'X,XXX,XXX.XX' XMIT ( 6 ,P) FINI(3) XMIT (6,HOF) STOP EOFM=l XMIT(2,M,Zl) EOFM= MB=M3 Zl, READT, M9= Ml\ll= RETURN EOFT=l IF(TRAN,EQ,\1l)GOTOZ2 SMIT(l,T,Z2) EOFT= Z2, PRINT, RETURN LN=LN+l IF(LN.LE,50)GO TO Z3 LN= PG=PG+l PHDl=DATE,'XX/XX/XX' PHD2=PG XMIT(6,HOF) XMIT(6,PHD) XMIT(6,BLK) XMIT(6,CHD) XMIT(6,BLK) Z3, XMIT(6,P) RETURN END (\1l43\1l,\1l481) I I-' co I -19- EXPLANATION OF PROGRAM START BLOCK M ;(INVENTORY MASTER FILE) ;Commodity ID, 4 digits ;Description 0 16 character alpha word ;Number on hand, 4 digits ;Number on order, 4 digits ;Number used year to date, 4 digits ;Minimum balance, 4 digits ;Unit cost, 6 digits Ml, M2, D4 Al6 M3, M4, MS, M6, M7, D4 D4 D4 D4 D6 Tl, T2, D4 Dl ;(TRANSACTION FILE) ;Commodity ID ;Transaction key (order, receipt, used) T3, D3 ; &'llount BLOCK T BLOCK HOF,C ;(HEAD OF FORM) Required for line printer D2,70 Al Dl BLOCK CHD,C D2 I All, I ID DESC' Al4 A9, 'POH XCP All, '#CUR #YTD' Al3, 'NOH ORD MBAL' A4 A5, 'UCOST' AB AS, 'XCOST' Dl ; (RECORD HEADING ON PAGEj-See sample report ;When using line printer as output, start block with D2. Tn1s is a device control and does not mean 2 zeros 1 BLOCK PHD 0 C I PHDl, 6 PHD2, D2 AlOQ I STOCK STAT I AlO I I us REPORT I A20 AB A24 A4' I PAGE I A4 Dl Column Headings ~When using line printer as output End Block with Dl. This is a control and does not mean 1 zero (PAGE DESCRIPTION)-See sample report ;Start block with printer control ;Stock Status Report ;Date location to be referenced in program ;Page number location ;End Block with printer control -20- BLOCK BLK,C ; (BLANK LINE) D2 Al Dl ;Prints blank digits BLOCK P,C ; (PRINTER BUFFER) I D2 PP, ABO ;Printer buffer BO columns Dl BLOCK,X ; (DATA) -Data Overlay into printer buff er D2 I A'.2 Pl, A4 I Al Al6 Al P3, A4 I Al P4, A4 I Al PS, A4 I P2, , P6, , P7, , PB, , ;2 spaces ;ID Number (in columns 3-7) ;Space ;Description ;Previous on hand ;Receipt ;Current # Al A4 ;Year to date # Al A4 ;New on hand Al A4 ;Ordered Al P9, A4 I Al PlO, AB ;Unit Cost Al Al2 Dl ;.Extended Cost I Pll, ;Minimum Balance ; (TEMPORARY STORAGE) ;Temporary Storage BLOCK MB, M9, MlO, PG, LN, TOT, DATE, D4 D4 D4 D3 D2 D9 D6,P TRAN Dl,P XCOST D9 EOFM Dl EOFT Dl PROC TOT= PG= LN= 50 INIT (2, v I IN) ;Temporary Storage for page number ;Temporary Storage for line count ;Temporary Storage for Total ;Allows er-try of DATE from console before program execution ;Allows entry of parameter from console. If no input transactions =O, if there are transaction ;Temporary storage for extended cost ;End of Master Indicator ;End of Transaction ;BEGIN PROCESSING SECTION .set TOTAL to zero ;Set page to zero ;Set 1.ine count to 50 ;Initialize DECtape #2 (old master) as an input file with variable length recoras I -21IF (TRAN.EQ.0) Go to Q6 !NIT ( 1, v I IN) Q6, INIT (3 Iv I OUT) CALL READM CALL READT Q3,· ;If end of master=l (all records read) go to Ql (print Total) IF (EOFT.EQ.l) Go To Q2 ;If end of transaction=l go to Q2 ;If transaction commodity ID# is greater than master ID# go to Q2 (see footnote) ;If T2 {transaction file key) equals 1, go to ORD, If=2 go to REC, If=3 go to USE Go To (ORD,REC, USE),T2 M4 = M4 + T3 CALL READT Go To Q3 REC, M4 = M4 ~ T3 M3 = M3 + T3 M9 = M9 + T3 CALL READT Go To Q3 USE, ;Initialize DECtape #3 (new master) as an input file ;Execute subroutine READM (read ol.d master) ;Execute subroutine READT (reads transaction record) IF (EOFM.EQ.l) Go To Ql IF (Tl..GT .Ml) Go To Q2 ORD, ;If no transaction(Trans=O) go to Q6--would rewrite inventory master and produce a listing of the master filE ;Initialize DECtape #1 (sorted transaction) as an input file M3 = M3 - T3 MS = MS + T3 MlO = MlO + T3 CALL READT Go To Q3 ;Number on order in old master + number 'ordered in transaction will be new number on order figure held in M4 ;Execute subroutine {reads another transaction record) ;Jump statement ;Number on order in new master will be number on order {old master)-number received {transaction record) held in M4 ;Number on hand in new master will be number on hand (old ·master) + amount received {transaction record) -he1-0 in M3 ;M9 will store amount received ;Execute subroutine READT (reads another transaction record) ;Jump statement ;Number on hand in new master will equal number on hand (old master) minus amount used ;Number used year to date in new master will equal number used year to date plus amount (transaction record) held in MS ;MlO will store current amount used ;Execute subroutine (read another transaction record) ;Jump statement -22- Q2 1 PP= If (M.3. GE .M6) Go To Q4 pp Q4, (1,1) = '*' Pl=Ml P2=M2 P3=M8 P4=M9 P5=Ml0 P6=M5 P7=M3 P8=M4 P9=M6 Pl0=M7, 'X,XXX.XX' XCOST = M3 * M7 Pll=XCdst, 'X,XXX,XXX.XX' TOT=TOT + xcost CALL PRINT XMIT (3,M) CALL READM Go To Q5 Ql, XMIT (6,BLK) PP= (67,67)='*' Pll=TOT, 'X,XXX,XXX.XX' XMIT (6,P) pp FINI (3) XMIT {6,HOF) STOP READM, EOFM=l XMIT (2,M, Zl) EOFM= M8=M3 M9= MIO= Zl, RETURN ;Set printer buffer to zero ;If number on hand is greater than or equal to minimum balance go to Q4 ;Print an * when number on hand is less than MBAL ;Commodity ID will be in Pl ;Description ;Previous on hand(see MB) ;Amount received ;Current number used ;Total used year to date ;Total number on hand ;Total number on order ;Minimum balance ;Unit cost (formatted) ;Extended cost=number on hand x unit cost ;Stores extended cost (formatted) in Pll ;Incremental Total Cost by adding XCost for each record ~xecute subroutine print ;Write onto DECtape #3 (new master) block M (master file) 7Execute subroutine (read oid maeti;:r) ;Jump statement ;Write onto device 6 {line printer) contents of block BLK which is blank line ;Set print buffer to zero ;Print * in column 67 ;Store total cost in Pll ;Write onto line printer block P (Block P will now contain only the total figure) ;Finalize DECtape #3 (new master) is rewound ;Write Head of Forms Block ;Return control to DIBOL monitor ;Set EOF Master file to 1 ;Read a record from DECtape #2 old inventory master; at end of file go to Zl ;Set end of master to zero ;Put number on hand into location MS ;Set location M9 to zero ;Set location MIO to zero ;Return to next statement after CALL RE.ADM -23READT EOFT=l IF(TRAN.EQ.O)Go To Z2 Set end of transaction to 1 If no transaction(O) go to Z2 When no more transactions, the program could continue to read the rest of the older inventory items ;Read from DECtape #1 a transaction record; at end of file go to Z2 ;Set end of transaction to zero XMIT (l.T.Z2) EOFT~ Z2 0 RETURN ;Return to statement after CALL READT PRINT, LN=LN+l IF (t.N.LE.SO)Go To Z3 ;Increment line count ;If line number is equal to or less than 50, go to Z3 ;Set line count to zero ;Increment page number iFormat date for page header ;Inserts page number for page description ;Write on device 6 (line printer) block HOF (head of forms) ;Write on device 6 (line printer) block PHD (page description) ;Write on device 6 (line printer) block BLK (blank line) ;Write on device 6 (line printer) block CHD (record heading) ;Write on device 6 (line printer) block BLK (blank line) LN= PG=PG+l PHDl=DATE, 'XX/XX/XX' PHD2=PG XMIT (6 11 HOF) XMIT (6 I PHD) XMIT (6 I BLK) XMIT (6,CHD) 2L.1\1IT {6 I BLK) Z3, ;Write on device 6 (line printer) block P (data) ;Return to statement after CALL PRINT ;1st set of numbers is the number of words used in the DATA section. (Maximum is 1170) 2nd set of numbers is the number of words used in the Procedure Sectionafter PROC. (maximum 1050) XMIT (6 IP) RETURN End ( 0430, 0481) Footnote * Master Commodity ID 1 2 Transaction after sorted commodity ID 3 1 1 1 4 2 etc. 3 4 4 At this point trans commodity ID is greater than master ID go to Q2 (print subroutine) -24- VIII. STOCK STATUS REPORT Suppose that the transactions shown in Section IV were run against the master file; you would receive the fOllowing report print out: 3/10/70 STOCK STATUS REPORT PAGE 1 ID DESC ?OH XCP #CUR #YTD NOH 1 FLANGE, PURPLE 2 SCREW, BLACK 3 NUT,, D'ROWN 4 BmKET, BLACK 5 BRACKET, WHITE 6 RIVIT, WHITE 7 PIN, YELLOW 8 RIVIT, RED 9 SCREW, PURPLE lr/J DOWEL, GREEN 11 HINGE, GREEN 12 CLIP, RED 13 FLANGE, GREEN 14 FLANGE, PURPLE 15 BRACKET, BLACK 16 PIN, BLUE 17 DOWEL, BLACK 18 NUT, YELLOW 19 PIN, BLUE 20 RIVIT, YELLOW 21 BRACKET, PINK 22 HINGE, YELLOW 23 DOWEL, RED 24 FLANGE, RED 25 PIN, BROWN 26 FLANGE, WHITE 27 BJLT, BROWN 28 iJiJ'.i', BLACK 29 HINGE, BROWN 30 FLANGE, PURPLE 31 HHJGE, BLUE 32 DO\·JE::,, ?H:K 33 CLIP, GREE;J 34 PIN, RE:'.:l 35 PIN, BLACK 36 PII'l, C:'RANGE 37 CLIP, R:2D 3 8 FLA:::;:;::, '.}RES:; 39 DOWEL, BLUE 40 NUT, PURPLE 41 FLAN'.}E, BLUE 4 2 ? I N , ':'. E LL 0 \·l ).f3 NUT, YELL'J\-J 44 HINGE, ORANGE 45 ?B, BLACK 46 BOLT, RED 47 SCREW, YELLOW 48 BRACKET, GREEN 49 BRACKET, YELLO~ 50 RIVIT, RED 51 D0 1•./EL, BRO'.,.Jl'Z 118 106 699 793 17 334 797 323 440 808 301 542 6 80 441 115 451 407 330 465 976 89 160 ll8 106 119 154 109 14t 146 ll3 107 94 170 143 83 168 79 154 97 171 84 87 81 193 156 99 7'7 I I 2\!13 47 4\!13 394 802 473 l\!l 221 380 377 615 125 276 215 728 320 306 484 133 942 164 200 670 320 128 705 661 119 154 109 146 146 113 lr/;7 94 174 143 83 169 99 154 97 171 84 92 81 147 79 80 122 146 144 156 134 81 167 114 147 91 82 146 83 97 93 91 109 143 162 174 162 89 125 172 97 640 740 439 80 122 146 144 206 134 81 167 114 147 88 71 146 83 97 93 77 133 164 91 109 143 162 157 162 89 ORD MBAL UCOST XCOST 74 57 35 86 873.79 835.57 675.72 931.05 59.87 755.73 912.\!14 295.69 273.15 50.29 537.16 717.93 161.63 815.25 343.08 981. 77 693.31 786.61 401. 80 431. 21 956.19 940.37 265.32 37\!l.25 958.27 92.53 165.64 462.89 427.55 499.09 214.76 133.13 612.\!13 456.05 604.68 964.97 79.71 899.41 807.40 102.41 518.59 5.17 774.92 649.45 536.67 789.33 139.24 70. 09 461.95 707.89 412.36 103,107.22 88,57\ll.42 80,410.68 143,381.70 6,525.83 110' 336. 58 133,157.84 33,412.97 29,227.05 4,727.26 91,317.20 102,663.99 13,415.29 136.962.00 27,1¢3.32 151,192.58 67,251.07 134,510.31 33,751.20 37,515.27 77,451.39 146,697.72 26,266.68 29 '621,ii. 00 116,908.94 13,5¢9.38 23,852.16 95,355.34 57,291.7\11 91 31 54 95 62 50 35 73 78 95 20 62 86 19 94 94 27 0 27 8 81 53 33 22 1 100 29 0 38 57 97 76 79 86 43 70 85 3 75 63 35 4 69 60 114 215 8 172 20 57 52 79 90 31 95 66 38 60 54 93 8\!l 11 20 62 61 53 92 90 59 20 97 54 62 69 10 22 51 42 76 2 79 24 24 75 50 6 94 41 2 39 53 53 83 4 17 62 33 60 69 54 (Page Description) (Record Heading) !~0,426.29 35,864.92 15,176.82 89,968.41 40,132.4¢ 42,932.28 14¢,885.62 6,615.93 87,242.77 75,\1188.2¢ 7,885.57 68,972.47 847.88 7¢,517.72 70,79¢.¢5 76,743.81 127,871.46 21,86¢.68 11,354.58 41,ll3.55 152,196.35 70,925.92 Notice that item 14 was used once. Item 22 was received 26 times and used 17 times - for a total change of nine in the 11 on hand" column. The new on-hand balance for item 19 is less than the minimum balance thus an asterisk is printed out to the left. -25- IX. FILE MAINTENANCE - GENERALIZED UPDATE FACILITY In addition to the regular master file activity update and stock status report, it is necessary to have some means of creating and changing a master file. For example, it may be necessary -to change the minimum balance or description of some existing item, or completely delete an item from stock. The Generalized Update Facility proviaes ~ne means for the user to perform insertions, changes, and deletions. The update run is a three stage process: First, the Generalized Update Input Program is read into memory from the system tape by the monitor (this enables the computer to read data from paper tape) . The update control, defining file parameters, is then read into memory before the transaction data. The transactions are then converted from paper tape to DECtape according to the update control. Second, the sort program is read into memory by the monitor. The sort control program, which will define the sort arrangement, (refer to Sort Transaction) is then read from paper tape. The transaction DECtape would then be sorted according to the sort control. In our example, the transaction data is sorted by Commodity ID. Third, the Generalize Update Process Program (enables computer to read DECtape data formats from transactions and old master, compare, write a new master, and generate updat.e report) is read int.a memory. .The upd.ate process program and the update control program will run the sorted transactions against the old master, producing a new master and an update report (audit trail). As each transaction is read by the Generalize Update Input Program, it is listed and any transactions in error will have an error message printed to the left. Only valid transactions are written on the output tape. -26- The process chart for any generalized update is: Paper tape or cards * Generalize Update Input Transaction Listing DECtape 1 Mag tape Paper tape Cards * Sort Paper tape Card Magnetic tape Process Line Printer DECtape 3 * The user would have to create the input transactions,the update control, and the sort control. Theinput_transaction contains transaction code for insert or delete. The insert code is used either to insert a new item or change an existing itemo Through these connnands, the transactions are passed against a master file, resulting, in an update master tape and a listing of transactions on the line printer (audit trail). The update transaction statements are limited to 50 characters per transaction. The update control defines the content of the file records and the format of the desired "audit trail" report. This control is read by both sections of the update (input and process) before execution. Let's examine each of the programs generated by the user, i.e., update control and input transaction programs, sort and the audit trail report. -271. Update Control The update control has three sections. The fir~t section consists of one line and contains information as to the number of fields and the record size. The second section consists of four lines and gives the column headings for the update report. Finally, the third section has one line for each field on the inventory master and describes where the field is, how big it is, the data type, and where and if it should be printed on the update report. The generalized update control for our inventory example would be: 07042001041 +-~~~~~~~~~~~~~~~~~~~~~~~--t- Q:i)UfND ORD IDNT DESCRIPTION #YTD MBAL Section I (Control line) I UCOST / / 0010410091 0051600151 0210410351 0250410411 0290410471 0330410531 0370610591 Section II (Column headings) I Section III (Field Specification) SECTION !--Control Line, 11 characters; for our example it is: 1 2 3 4 5 6 7 8 lg 10 11 0 7 0 4 2 0 0 1 0 4 1 Characters Explanation 1-2 (07) /The number of fields in the master file. In our example there are 7; i.e. IDNT DESCRIPTION, ONHND, ORD, #YTD, MBAL, UCOST, from the inventory master file. 3-5 (042) /Record size: Total number of characters for the field on the inventory master. The total in our example is 42 characters. Explanation Characters 6-8 (001) /Process key base, starting position (character position of the sort key as it is on the Inventory Master File). In this example the sort key is commodity ID and it occupies first four characters in each master file record. Beginning position is 1. 9-10 (04) /Number of characters in the process key (Commodity ID 4 characters). 11 /Process key type (O = alpha, 1 = decimal). In our example commodity ID is a decimal number. ( 1) SECTION II The column heading section consists of four lines with 132 characters of column heading. The first line contains character positions 1-33, the second line contains character positions 34-66, the.third line contains character positions 100-132. In the inventory example the column heading section is: ONHND IDNT DESCRIPTION ORD #YTD MBAL UCOST I I I I All four lines must be there with a / in column 34.Presently we utilize only the first two lines because we only offer an 80-colurnn line printer. (A 132 line printer will be available in the near future). The column headings are only for those headings you want printed on the audit trail. These headings may correspond to all of the heading fields that are on the master file, or only a few. In our example we have all. SECTION III The field specification section contains one line for each field in the master file. In our inventory example there are 7 fields, therefore, 7 lines. Each line is 10 characters. The format for each line is: Characters 1-3 Explanation /Field position; the first character position of the field as it is on each inventory master record. -29- Explanation Characters 4-5 /Field size; the number of characters in the field. 6 /Data type; 0 = alpha, 1 = decimal. 7-9 /Print left index; the first print position. This will be zeroes if this column is not p~inted. /Fiel~ print switch; 0 means, do not print on the update report; 1 means print on update report. 10 (If th~ file to be updated is fairly small, it will be possible to print all fields on the update report. However, if more than 132 characters are needed, it will be necessary to "non-print" some fields by giving them an 0 in character position 7-10 of the field specification section). In our inventory example the 7 field lines are: (l) Ul cu ,.Q 'O r-f Q) ·r-1 li.i (l) N ·r-1 U) .µ s:: .µ Q) Ci >t .µ 'O cu Q) .µ ·r-1 cu r-f li.i Cl 4-{ (]) ·.-1 r-f ~ Q) .µro l--1 111 ..c: u 'O .µ s:: s:: r-f ·r-1 ·r-IH (l) ;3 l--1 ·r-1 (/) 111 li.i 001 04 1 009 1 005 16 0 015 1 021 04 1 035 1 025 04 l 04~1 1 029 04 1 047 1 033 04 1 053 1 037 06 1 059 1 Commodity ID* Description Number on hand Number on order Number used YTD Minimum Balance Unit Cost *Line one is for the commodity ID. It says: the field base start at first position in inventory master, it's a 4-digit number, the data is decimal. On the update report, commodity ID will start in column 9 and it is to be printed on the update report. -30- 2. Input Data Records Now suppose the following records are to be updated: delete item 30, insert a new item number 125, change the unit cost on item 23, input would be prepared for the above changes D I I I I I I $ 30 125 125 125 125 23 27 1 2 4 7 7 2 125 'HOOK, COPPER' 100 10000 28000 'BOLT, RED' The I line is used either for an insert or change. It specifies; the process key (Commodity ID), the field number, and the data to be inserted. To change one item of an existing record, the I line is used with the process key (Commodity ID) of the existing record, the field to be changed, and the new data. To add a record, simply use an I line for each field on the inventory master, where the process key is the new record identification. To delete an item, simply use the D line with the appropriate process key. The input data records have the following general format: I D <process key) <process key> <field number/' In our inventory example: D 30 125 125 1 2 125 'HOOK,COPPER' I 125 125 4 7 100 1000 I 23 7 2800 I 27 2 .'BOLT,RED' * * I * * * I I /delete item 30 /insert new item number 125 in ID field /insert HOOK,COPPER in description field of item 125 /insert 100 in order field of item 125 /insert 1000 in unit cost field of item 125 /insert 2800 in unit cost field of item 23 (this would be a change to an existing i tern). /insert BOLT,RED in description field of item 27. A new item number - 125 is inserted with the description, number on order, and unit cost. The other field, i.e. number on hand and #YTD would be zeroed since no data was inserted into these fields (see Audit Trail). As each input transaction is read, it is listed, and any transaction in error will have an error message printed to the left. Only valid transactions are written on the output tape. -31- 3., Update Sort The sort control has already been discussed - refer back to explanation of SORT TRANSACTION. The only difference, in the update sort is, First; Update records must be regarded as 50 characters long for the sort record input size {this is a maximum figure, and even though your update records may not be that long, 50 is still the number used in the sort control) and Secondt the field sorted must always be regarded as beginning in Position one{l).The user does not have to concern himself with the update record Format on DECtape - he need only remember the two above rules. The update sort program puts the transactions (Insertions, Changes, Deletions) into the order of the appropriate master file to be updated. In our example the inventory master is sorted by commodity I.D. The sort control for our update would be 026130010460 0010200 $ First Line 1-3 {026) - Record input size, normal practice is to use 50 for update record size {Rule 1) 50 + 1 = 51 ! 2 = 25 + 1 = 26 " 4-7 {1300)- Internal sort buffer size 1300 = 26 x 50 {result must be less than 2000) 8 (1) - Number of sort fields 9-12 (0146)- Number of blocks per DECtape 190,000 ~ 1300 = 146 13 (0) - Phase 2 input save switch Second Line 1-3 4-5 6 7 {001) - First position of sort field. This will always be Position 1 {Rule 2). (02) - Number of words spanned (0) - First word switch (0) - Last word switch -324. Update Report (Audit Trail) After the generalize update process program and the update control have been loaded into core, they will run the sorted transaction against the old master, producing a new master and an update report on the. line prin\ter. The update report in our example would be: IDNT DESCRIPTION ONHND ORD #YTD MBAL UC OST OLD NEW 0023 0023 DOWEL, RED DOWEL, RED 0079 0079 0047 0047 0203 0203 0054 0054 026532 028000 OLD NEW 0027 0027 BOLT, BROWN BOLT, RED 0144 0144 0033 0033 0802 0802 0022 0022 016564 016564 DLT 0030 FLANGE, PURPLE 0081 0050 0221 0076 049909 NEW 0125 HOOK, COPPER 0000 0100 0000 0000 001000 Notice that the old item for the deleted record is displayed. For the inserted item, 125, the new master record is printed. For each of the changed items (23 and 27), both the old and the new master records are printed. ******************* This example has created a complete application package for inventory control. All of the program and control statements for the entire application appear in this memo. Not one additional line of code is needed. Even relatively inexperienced programmers can quickly learn to produce additional applications--billing, sales analysis, payroll, etc. DIBOL and the PDP-8 can bring you into the world of data processing, quickly and at an extremely low cost. APPENDIX Brief Description of the DIBOL Software System The DIBOL Software System contains a DIBOL language, Generalize Input Facility, Sort Package, Generalized Update Facility and a DIBOL Monitor. The following is a summary of the features of the system: 1. DIBOL Language Each DIBOL program is divided into two sections - the data section and the procedure section. The data section is used to describe the information used in the program and to allocate memory. The procedure section contains the executable statements. The data section is broken up into a number of "blocks", each of which contains a number of "data elements". An example is: BLOCK MASTER CUSTNO, NAME, AMOUNT, BLOCK WORK, C TEMP, TABLE, D4 A30 D8 AlO 6DS In the exampl.e, the data is cont:ained in two o.Locks; !!master== and "work". The first block has 42 bytes and is divided into data elements "customer number", "name", and "amount". The customer number is specified to be decimal (D) and to contain four bytes. The name is specified alphanumeric (A) with thirty bytes. The second block is specified with the clear option (C). This implies that a load time, TEMP will be filled with alphanumeric blanks and TABLE with decimal zeros. TABLE is specified to be an array of six elements, each of which contains five decimal bytes. The procedure section contains statements to control input/ output, compute arithmetic expressions, move data and control the program sequence of execution. Examples of each of the ten types of DIBOL statements are: 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) !NIT (1, V, OUT) XMIT (1, MASTER) FINI (1) PRINT (21, 45) = NAME PRICE = LIST * (100 - DISCT) / 100 PRINT (60, 70) =AMOUNT, 'XXX,XXX.XX-' BUFF = GO TO LOOP GO TO (MASS, CONN, RI, NY), TAXCD IF (CODEl CODE2 .NE. 0) GO TO PRINT IF (ONHAND .LT. MINBAL) GO TO ORDER CALL INPUT RETURN STOP The initialization statement (1) opens file-1 as an output file. The transmit statement (2) sends data from the block "master" to file-1. The finalization statement (3) performs the necessary operations to close file-1. There are three examples of the data manipulation statement (4). In the first, the contents of "name: are moved into character positions 21 through 45 of the data element "print". In the second, a selling price is computed by marking down a "list price" by a "discount percentage" . The last example is similar to the first in that data is moved into specified positions or "print". The difference is that the move is formatted with a comma for the thousands digit, a decimal point for the units digit and a minus sign if "amount" is negative. Statement type (5) clears the contents of the specified data element. Decimal elements are set to zero and alphanumeric elements to blank. Statement type (6) is used for conditional and unconditional program branches. In the first example, control goes to the statement with the tag LOOP. In the second example, control goes to MASS,CONN, RI or NY depending on whether "tax code" is one, two, three or four. Statement type (7) may also be used for conditional branching. In the first example, control goes to "print" if either code-1 or code-2 is not equal to zero. Otherwise, control goes to the next statement. In the second example, control goes to ".order" if the number "on hand" is less than the "minimum·balance". The CALL statement (8) transfers control to the first statement of a closed subroutine. The RETURN statement (9) transfers control back to the statement after the last executed CALL statement. Finally, the STOP statement (10) causes a return to the DIBOL monitor. 2. Generalized Input Facility The Generalized Input Facility provides a simple means for getting data into the computer. The user specifies his data fields, the desired output record contents and the input line formats. The Generalized Input Facility reads the input data, converts it to the specified output formats and performs careful error checking. The format of the Generalized Input control is: D E field number type count optional constant record number file number field number command record number zero field increment field field number necessary switch present field default field 3. Sort Package A B c The sort package allows the user to arrange a data file in any specified order. The user defines the records to be sorted and gives "sort keys" within the record. The sort runs in' two phases. In the first phase (the internal sort), as many records as possible are read into memory and sorted. The sorted groups of records are written as strings onto an intermediate file. In the second phase (the poly-phase merge), the original strings are successviely made longer by merging until there is only one string remaining. This last string is the sorted output file. A third phase of the sort ( a general single-pass merge) is used only in the case of multi-reel files. The format for the sort control is: record size field base 4. buffer size field size number fields buffers/tape tape save first word split last word split Generalized Update Facility The Generalized Update Facility provides a simple means for the user to perform insertions, changes and deletions on existing data files of arbitrary format. The user defines the content of the file records and the format of the desired "audit trail" report. He prepares the transaction input referring to records by "process key and to individual fields by field number. DIBOL then performs all necessary inputting, sorting and updating to apply the transactions to the old master and produce a new master. As a by-product, the audit trail report shows which records have been deleted or inserted and which fields of existing records have been changed. 11 The format of the Generalized Update Control is: key size key type key base record size number fields report heading 1-33 report heading 34-66 report heading 67-99 report heading 100-132 data type print? field base field count print left index The general format for the user transactions are: I D 5. process key process key field number data DIBOL Monitor The DIBOL monitor ties the various DIBOL facilities together into a unified data processing system. By means of a simple interactive dialog, the monitor executes the subsystems according to operator commands. The commands to call subsystems are: Command Snbsystem COMP RSYS SR Tl SRT2 SRT3 GENI GUPI GUPP EDIT DUMP CDDT DTPR PTDT DTFX DIBOL Compiler Run Time System Sort Phase I Sort Phase II Sort Phase III Generalized Input Facility Generalized Update Facility-input Generalized Update Facility-process DIBOL Editor Tape Dump Card to DECtape utility DECtape to printer utility Paper Tape to DECtape utility DECtape data edit utility The DIBOL compiler (COMP) takes it input from a source master file on DECtape. Its output goes onto an updated object master, also on DECtape. The run time system (RSYS) executes DIBOL programs which have been compiled. The three phases of the sort may be called by the commands SRT1,SRT2, and SRT3. The Generalized Input Facility (GENI), when loaded into ·memory, asks the user for the name of the control. After the user responds, the control is fetched from the system DECtape and the input process begins. The Generalized Update Facility is operated in three phases--input, sort and process. The input phase (GUPI) reads in the transactions in an operation similar to that of the Generalized Input Facility. Then the sort (SRT1,SRT2 and possibly SRT3) is used to order the transactions on master file order. Finally, the process phase (GUPP) does the file update. The DIBOL Editor (EDIT) provides a source program file maintenance capability. It is used for the creation and editing of DIBOL source programs, sort controls, generalized input controls and generalized update controls. It is also used to perform maintenance of the DIBOL system tap~. The tape dump (DUMP) is used to print any DIBOL generated data DECtape. It gives record count, record size and all data printed in both alphanumeric and decimal formats~ The Card to DECtape utility (CDDT) creates DECtape files of alphanumeric card images. The DECtape to Printer utility (PTDT) is the same as CDDT, except the input comes from paper tape. The DECtape Fix utility (DTFX) provides a simple means of checking and/or changing any field within any record of a DIBOL generated data tape. * * * * * * * * * * * * * * * * * * * * * * * * * The DIBOL Software System provides a simple, but complete capability for commercial applications on the PDP-8 family of computers. It is the most easily learned total data processing package in the industry. DIBOL is ready to solve the data processing problems of small to medium sized businesses. Digital Equipment Corporation Maynard, Massachusetts printed in U.S.A. mnmnomn
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies