home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-11-18 | 81.6 KB | 2,372 lines |
-
-
-
- JULY 3,1985
-
- FILER GROUP OF PROGRAMS
- =======================
-
-
- The FILER GROUP of programs permit the creation, maintenance,
- and use of very large data files. These programs are written in
- Turbo Pascal for PCDOS Microcomputer systems. ( CP/M versions are
- also available ) The programs which compose the FILER GROUP are
- FILER, SORTER, PICTOFRM, FRMTODAT, DATTOPIC, STARTER, and
- TRANSFER.
-
-
- PICTOFMR permits the translation of a picture of a desired
- data base screen to be translated into an intermediate form that
- records locations, data types, and label names. The intermediate
- file form permits the order of data entry to be modified to any
- desired sequence.
-
-
- FRMTODAT permits the rapid conversion of the file generated by
- PICTOFRM into an empty (null) FILER FILE.
-
-
- DATTOPIC permits the generation of a file which contains the
- screen picture of the file from a FILER FILE. This file can be
- printed or edited for record or modification purposes.
-
-
- FILER permits the user to display, add, correct, or delete
- data records from the disk file.
-
-
- SORTER permits the user to sort records within a file on up to
- ten of the fields which make up the data record. This program
- renames the source data by changing its file extension to "BAK".
- A new sorted file, with the extension "DAT", is created. REQUIRES
- THE FILE SORT.BOX FROM BORLAND'S TURBO TOOLBOX.
-
-
- STARTER is a source program written in Turbo Pascal source
- which contains all the logic to access a disk file, read records,
- print out data field labels and the data contained in each field
- of a data record. Provision is also made for page control,
- titles, sub totals and grand totals.
-
-
- TRANSFER is a program which permits data to be moved from any
- existing FILER FILE to a newly defined FILER FILE with a
- different file organization. The creation of a TRANSLATION TABLE
- makes it possible to transfer data from any SOURCE FIELD to any
- desired DESTINATION FIELD. This program makes possible the rapid
- revision of any FILER FILE to a new format.
-
-
-
- 1
-
-
-
-
-
-
-
-
- CREATING A FILER DATABASE FILE.
- ===============================
-
-
- CREATING A FILER DATABASE FILE IS A EASY PROCESS. FIRST, WITH
- A TEXT EDITOR, ENTER A PICTURE OF THE FILE TO BE CREATED. GIVE
- THE FILE A MEANINGFUL NAME AND USE THE FILE EXTENSION ".PIC" SO
- THAT IT CAN BE EASILY IDENTIFIED AS THE "PICTURE" OF THE FILE TO
- BE CREATED. FOR EXAMPLE, AN ACCOUNTS RECEIVABLE FILE MIGHT BE
- NAMED "ACCTREC.PIC." FOR NOW, THE GENERAL NAME "FILENAME.PIC",
- WILL BE USED.
-
-
- EXIT THE EDITOR, RETURN TO THE DISK OPERATING SYSTEM AND RUN
- THE PROGRAM "PICTOFRM". "PICTOFRM" IS SHORT FOR "PICTURE TO
- FORM", WHICH DESCRIBES WHAT THE PROGRAM DOES. THE PICTURE OF THE
- FILE WILL BE EXAMINED AND A FORM WILL BE CREATED WHICH TABULATES
- THE LOCATION, TYPE (ALPHA OR NUMERIC), DATA LENGTH, AND THE LABEL
- FOR EACH FIELD. DATA FIELDS ARE LISTED IN THE ORDER ENCOUNTERED
- IN THE PICTURE: FROM LEFT TO RIGHT AND FROM TOP LINE TO BOTTOM.
- THE FILE GENERATED BY THIS STEP WILL HAVE THE SAME NAME AS THE
- PICTURE OF THE FILE WITH THE FILE EXTENSION CHANGED TO ".FRM".
-
-
- FILER WILL EVENTUALLY STEP THRU THE FIELDS OF THE RECORD IN THE
- ORDER THAT THEY ARE LISTED IN THE "FILENAME.FRM" FILE. THIS ORDER
- MAY BE CHANGED BY EDITING THE FILE WITH YOUR EDITOR. USE BLOCK
- MOVES AND MOVE WHOLE LINES OF THE FORM UNTIL THE DESIRED FIELD
- SEQUENCE IS OBTAINED. DO NOT CHANGE THE RELATIVE POSITION OF DATA
- WITHIN THE LINES.
-
-
- RETURN TO THE DISK OPERATING SYSTEM AND RUN THE PROGRAM
- "FRMTODAT". "FRMTODAT", WHICH IS SHORT FOR "FORM TO DATA", WILL
- USE FILENAME.FRM AS SOURCE DATA AND WILL CREATE A FILER FILE WITH
- THE NAME FILENAME.DAT. THIS FILE IS A NULL (EMPTY) VERSION OF THE
- FILE AND MAY BE USED BY ALL THE FILER GROUP OF PROGRAMS.
-
-
- A LAST PROGRAM, "DATTOPIC", IS AVAILABLE TO CREATE A PICTURE OF
- THE FILE FROM A FILER GROUP FILE. "DATTOPIC", WHICH IS SHORT FOR
- DATA TO PICTURE WILL USE FILENAME.DAT AS SOURCE DATA AND WILL
- CREATE A PICTURE OF THE FILE WITH THE NAME FILENAME.PIC. THIS
- PROGRAM IS USEFUL WHEN YOU HAVE AS EXISTING FILER FILE AND THE
- SOURCE MATERIAL IS NOT READILY AVAILABLE.
-
-
-
-
-
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
-
- EXAMPLE OF CREATING A DATABASE FILE.
-
- USE ANY EDITOR THAT WILL PRODUCE CLEAN TEXT WITHOUT EMBEDDED, NON
- PRINTABLE CHARACTERS. WORDSTAR WITH OPTION 'N' WORKS FINE. ENTER
- THE DATA LABELS AND DATA FIELDS JUST AS THEY WILL APPEAR ON THE
- FIRST 22 LINES OF THE SCREEN. LINES 23 & 24 ARE RESERVED FOR
- USE BY FILER. A SAMPLE MAIL ADDRESS FILE MIGHT LOOK LIKE THIS:
-
- NAME : AAAAAAAAAAAAAAAAAAAA
- ADDR1 : AAAAAAAAAAAAAAAAAAAA
- ADDR2 : AAAAAAAAAAAAAAAAAAAA
- CITY : AAAAAAAAAAAAAAAAA
- STATE : AA ZIPCODE : AAAAA
-
- A FEW RULES TO MAKE THINGS GO SMOOTHLY:
-
- FIRST, ALWAYS ENTER THE LABEL OF THE DATA FIELD FIRST AND END
- IT WITH A ':' SO THAT THE PROGRAM KNOWS WHERE THE LABEL ENDS
- AND THE DATA FIELD BEGINS.
-
- SECOND, A SPACE BEFORE AND AFTER THE ':' KEEPS THE DATA EASY TO
- READ.
-
- THIRD, DEFINE THE FIELD WHERE DATA WILL BE ENTERED BY ENTERING
- A SERIES OF ANY ALPHA CHARACTER. THE EXAMPLE USES AAAA'S
- BECAUSE THE DATA IS ALPHA, BUT IT COULD HAVE BEEN ALMOST ANY
- OTHER CHARACTER EXCEPT THOSE DIGITS AND CHARACTERS WE USUALLY
- USE TO DISPLAY NUMBERS. SO 0,1,2,3,4,5,6,7,8,9,$,.,+,-, AND THE
- COMMA AND UNDERLINE (_) ARE ONLY USED FOR NUMBERS. MORE ON THAT
- SHORTLY.
-
- FOURTH, THE FIRST SPACE FOLLOWING THE DATA FIELD INDICATES THE
- END OF THE DATA ENTRY FIELD.
-
- FIFTH, A MAXIMUM OF 31 LABELS MAY BE USED IN A FILER FILE.
- MORE, AND THE FIELD DEFINITION WILL GET LOST.
-
- NOW, EXAMINE A FILE DEFINITION WHICH CONTAINS NUMERIC VALUES. IN
- A NUMERIC FIELD, A NUMBER ENTERED WILL BE EDITED WITH COMMAS AND
- RIGHT JUSTIFIED IN THE FIELD. LEADING ZEROS WILL BE REPLACED WITH
- LEADING SPACES AND A DEFINED NUMBER OF DIGITS FOLLOWING THE
- DECIMAL PLACE WILL BE SHOWN. ASCII FIELDS CAN HOLD NUMBERS - A
- TELEPHONE NUMBER IS A GOOD EXAMPLE - BUT THE VALUE ENTERED WILL
- BE TREATED AS THOUGH IT WAS ALPHA TEXT AND DISPLAYED WITHOUT
- EDITING OR JUSTIFICATION.
-
- ENTER THE DATA LABELS AND NUMERIC DATA FIELDS JUST AS THEY SHOULD
- APPEAR ON THE FIRST 22 LINES OF THE SCREEN. A SAMPLE ACCOUNTS
- RECEIVABLE FILE MIGHT LOOK LIKE THIS:
-
- NAME : AAAAAAAAAAAAAAAAAAAA ACCOUNT REC : 123,456.78
- ADDR1 : AAAAAAAAAAAAAAAAAAAA AMT PAST DUE : 123,456.78
- ADDR2 : AAAAAAAAAAAAAAAAAAAA
- CITY : AAAAAAAAAAAAAAAAA AREA CODE : AAA
- STATE : AA ZIPCODE : AAAAA PHONE NBR : AAAAAAA
-
-
- 3
-
-
-
-
-
-
-
-
-
- NAME : AAAAAAAAAAAAAAAAAAAA ACCOUNT REC : 123,456.78
- ADDR1 : AAAAAAAAAAAAAAAAAAAA AMT PAST DUE : 123,456.78
- ADDR2 : AAAAAAAAAAAAAAAAAAAA
- CITY : AAAAAAAAAAAAAAAAA AREA CODE : AAA
- STATE : AA ZIPCODE : AAAAA PHONE NBR : AAAAAAA
-
- NOW, MORE RULES FOR NUMBERS:
-
- FIRST, USE ONLY DIGITS OR THE UNDERLINE CHARACTER TO DISPLAY
- THE DATA FIELD. IF ANY ALPHA CHARACTER IS ENTERED, THE PROGRAM
- WILL TREAT THE DATA FIELD AS ALPHA.
-
- SECOND, USE COMMAS IN YOUR NUMERIC FIELDS WHERE APPROPRIATE.
- THE NUMBER OF CHARACTERS IN THE FIELD, LESS THE NUMBER OF
- COMMAS IS USED TO DETERMINE THE AMOUNT OF MEMORY STORAGE
- REQUIRED FOR THAT NUMERIC FIELD.
-
- THIRD, IF A NUMBER IS NEGATIVE, IT WILL DISPLAY AS A LEADING
- MINUS SIGN AND CAN REDUCE THE NUMERIC DISPLAY BY ONE CHARACTER.
-
- FOURTH, THE UNDERLINE CHARACTER CAN BE USED TO DEFINE A NUMERIC
- FIELD SO THAT THE AMOUNT PAST DUE FIELD COULD BE ENTERED AS
- ___,___.__ INSTEAD OF AS 123,456.78.
-
- WHEN THE PICTURE OF THE DATABASE FILE HAS BEEN COMPLETED, WRITE
- THE FILE TO DISK USING THE FILE NAME "ACCTREC.PIC". THE ".PIC"
- FILE EXTENSION IDENTIFIES THE FILE AS A PICTURE OF THE FILE TO BE
- CREATED. FROM THIS POINT, THE PROCESS OF CREATING A DATA BASE
- FILE FOR FILER IS A TWO STEP PROCESS:
-
- FIRST, RUN THE PROGRAM "PICTOFRM" AND USING "ACCTREC.PIC",THE
- PICTURE FILE JUST CREATED. THE OUTPUT OF THIS PROGRAM WILL BE
- ANOTHER FILE WITH THE NAME "ACCTREC.FRM". "ACCTREC.FRM" IS AN
- ASCII FILE THAT CAN BE READ WITH YOUR TEXT EDITOR. IF DESIRED,
- THE CONTENTS OF THE FILE CAN BE EDITED TO REARRANGE THE ORDER IN
- WHICH THE FIELDS IN THE RECORD ARE DISPLAYED BY THE FILER
- PROGRAM.
-
- NUMERIC FIELDS CAN HOLD VERY LARGE AND VERY SMALL NUMBERS--
- PROBABLY LARGER AND SMALLER THAN ARE USUALLY NEEDED. THE LARGEST
- NUMBER IS 99,999,999,999 AND HAS 11 NUMERIC DIGITS. LARGER FIELDS
- CAN BE SPECIFIED, BUT TURBO PASCAL CAN NOT HOLD DATA TO A GREATER
- PRECISION AND DATA WILL BE ROUNDED OFF TO 11 NUMERIC DIGITS. THE
- SMALLEST NUMBER THAT CAN BE DISPLAYED IS 0.00000001 AND HAS 8
- DIGITS TO THE RIGHT OF THE DECIMAL POINT. ATTEMPTS TO SPECIFY A
- FIELDS WITH 9 DECIMAL DIGITS WILL CAUSE SPURIOUS DIGITS TO BE
- DISPLAYED... ALTHOUGH THE DATA IS PROBABLY STILL CORRECT. FIELDS
- WHICH CONTAIN NUMBERS TO THE RIGHT AND LEFT OF THE DECIMAL POINT
- SHOULD BE LIMITED TO A MAXIMUM OF 12 NUMERIC DIGITS. FOR EXAMPLE,
- THE FIELD 12,345.1234567 WORKS OK. IF YOU HAVE ANY DOUBT ABOUT A
- PARTICULAR COMBINATION, TRY IT AND SEE IF IT WORKS IN THE FINAL
- FILER FILE!
-
-
-
-
- 4
-
-
-
-
-
-
-
-
- THE USE OF THE PROGRAM "PICTOFRM" ON ACCTREC.PIC GENERATES THE
- FOLLOWING RESULTS:
-
-
- "PICTOFRM" CONVERTS FILES FROM XXX.PIC TO XXX.FRM.
- ENTER FILENAME OF PICTURE FILE : ACCTREC
-
- NAME : AAAAAAAAAAAAAAAAAAAA ACCOUNT REC : 123,456.78
- ADDR1 : AAAAAAAAAAAAAAAAAAAA AMT PAST DUE : 123,456.78
- ADDR2 : AAAAAAAAAAAAAAAAAAAA
- CITY : AAAAAAAAAAAAAAAAA AREA CODE : AAA
- STATE : AA ZIPCODE : AAAAA PHONE NBR : AAAAAAA
-
- ROW 1, COL 1, FORM 15, LEN 20, MISC ___, LABEL >NAME <
- ROW 1, COL 36, FORM 2, LEN 9, MISC ___, LABEL >ACCOUNT REC <
- ROW 2, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR1 <
- ROW 2, COL 36, FORM 2, LEN 9, MISC ___, LABEL >AMT PAST DUE <
- ROW 3, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR2 <
- ROW 4, COL 1, FORM 15, LEN 17, MISC ___, LABEL >CITY <
- ROW 4, COL 36, FORM 3, LEN 20, MISC ___, LABEL >AREA CODE <
- ROW 5, COL 1, FORM 15, LEN 2, MISC ___, LABEL >STATE <
- ROW 5, COL 14, FORM 15, LEN 5, MISC ___, LABEL >ZIPCODE <
- ROW 5, COL 36, FORM 15, LEN 7, MISC ___, LABEL >PHONE NBR <
-
- ENTER ANY KEY TO CONTINUE
-
- BEGINNING WITH A PICTURE OF THE FILE, "PICTOFRM" HAS
- TRANSLATED THIS INFORMATION INTO AN INTERMEDIATE FORM AND
- STORED IT IN A FILE WITH THE SAME NAME AND THE FILE EXTENSION
- ".FRM".
-
- THIS FILE MAY NOW BE EDITED WITH ANY EDITOR SUCH AS WORDSTAR
- TO REVISE THE ORDER OF THE FIELDS IN THE FILE.
-
- FINALLY, TO CONVERT THE ".FRM" INTERMEDIATE FILE INTO A ".DAT"
- FILE THAT CAN BE USED BY THE FILER GROUP OF PROGRAMS, USE THE
- PROGRAM "FRMTODAT".
-
- RECORD LENGTH : 112 BYTES
- BLOCKING FACTOR : 2
- BYTES LEFT IN BLOCK : 32
- CHANGE RECORD LENGTH BY -27 BYTES TO INCREASE BLOCKING FACTOR
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
-
-
-
- THE FILER PROGRAM WILL ULTIMATELY STEP THROUGH THE FIELDS OF THE
- RECORD IN THE ORDER THAT THE FIELDS WERE ENCOUNTERED IN THE
- PICTURE STARTING FROM TOP AND PROCESSING EACH LINE FROM LEFT TO
- RIGHT. THIS WILL GIVE THE FOLLOWING ORDER:
-
- LABEL >NAME <
- LABEL >ACCOUNT REC <
- LABEL >ADDR1 <
- LABEL >AMT PAST DUE <
- LABEL >ADDR2 <
- LABEL >CITY <
- LABEL >AREA CODE <
- LABEL >STATE <
- LABEL >ZIPCODE <
- LABEL >PHONE NBR <
-
- THIS ORDER MAY BE MODIFIED BY USING A TEXT EDITOR AND MOVING THE
- LINES TO THE ORDER DESIRED. FOR EXAMPLE, TO PLACE THE "ACCOUNT
- REC" AND "AMT PAST DUE" AT THE END AFTER THE NAME AND ADDRESS
- INFORMATION, EDIT THE ACCTREC.FRM FILE AS FOLLOWS:
-
- ROW 1, COL 1, FORM 15, LEN 20, MISC ___, LABEL >NAME <
- ROW 2, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR1 <
- ROW 3, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR2 <
- ROW 4, COL 1, FORM 15, LEN 17, MISC ___, LABEL >CITY <
- ROW 4, COL 36, FORM 3, LEN 20, MISC ___, LABEL >AREA CODE <
- ROW 5, COL 1, FORM 15, LEN 2, MISC ___, LABEL >STATE <
- ROW 5, COL 14, FORM 15, LEN 5, MISC ___, LABEL >ZIPCODE <
- ROW 5, COL 36, FORM 15, LEN 7, MISC ___, LABEL >PHONE NBR <
- ROW 1, COL 36, FORM 2, LEN 9, MISC ___, LABEL >ACCOUNT REC <
- ROW 2, COL 36, FORM 2, LEN 9, MISC ___, LABEL >AMT PAST DUE <
-
- NOTICE IN PARTICULAR HOW THE LINES FOR ACCOUNT REC AND AMT PAST
- DUE HAVE BEEN RELOCATED FROM THE ORIGINAL ACCTREC.FRM.
-
- THE CONTENTS OF THE ACCTREC.FRM FILE HAVE THE FOLLOWING MEANINGS:
-
- ROW 2, COL 36, FORM 2, LEN 9, MISC ___, LABEL >AMT PAST DUE <
- \ \ \ \ \ \
- \ \ \ \ \ \__ FIELD LABEL
- \ \ \ \ \__ MISC FIELD (NOT USED)
- \ \ \ \__ LENGTH OF DATA FIELD (MAX 60 CHAR)
- \ \ \__ FORM OF THE DATA FIELD:
- \ \ 15 = ASCII (ALPHA) DATA
- \ \ 0 = NUMERIC DATA WITH NO DECIMAL DIGITS
- \ \ 1 = NUMERIC DATA WITH 1 DECIMAL DIGITS
- \ \ 2 = NUMERIC DATA WITH 2 DECIMAL DIGITS
- \ \ N = NUMERIC DATA WITH N DECIMAL DIGITS
- \ \ 14 = NUMERIC DATA WITH 14 DECIMAL DIGITS
- \ \__ COLUMN OF FIRST CHARACTER OF FIELD LABEL
- \__ ROW OF FIRST CHARACTER OF FIELD LABEL
-
- Information in the "FRM" file may be edited to change position,
- data form, field length, and label name. It is only necessary to
- ensure that the original column spacing is maintained.
-
-
- 6
-
-
-
-
-
-
-
-
- FINALLY, TO CREATE THE FINAL ".DAT" FORM OF THE FILE THAT CAN
- BE ACCESSED BY THE FILER GROUP OF PROGRAMS, RUN THE PROGRAM
- "FRMTODAT". THE OUTPUT OF THIS PROGRAM IS A FILER DATA FILE WITH
- THE NAME "ACCTREC.DAT".
-
- "FRMTODAT" CONVERTS FILE FROM XXX.FRM TO XXX.DAT
-
- ENTER FILENAME OF SOURCE FILE : ACCTREC.FRM
-
- ROW 1, COL 1, FORM 15, LEN 20, MISC ___, LABEL >NAME <
- ROW 2, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR1 <
- ROW 3, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR2 <
- ROW 4, COL 1, FORM 15, LEN 17, MISC ___, LABEL >CITY <
- ROW 4, COL 36, FORM 3, LEN 20, MISC ___, LABEL >AREA CODE <
- ROW 5, COL 1, FORM 15, LEN 2, MISC ___, LABEL >STATE <
- ROW 5, COL 14, FORM 15, LEN 5, MISC ___, LABEL >ZIPCODE <
- ROW 5, COL 36, FORM 15, LEN 7, MISC ___, LABEL >PHONE NBR <
- ROW 1, COL 36, FORM 2, LEN 9, MISC ___, LABEL >ACCOUNT REC <
- ROW 2, COL 36, FORM 2, LEN 9, MISC ___, LABEL >AMT PAST DUE <
-
- ENTER CURRENT DATE (MM/DD/YY) : 05/20/85
-
- ACCTREC.DAT HAS BEEN CREATED FOR USE WITH FILER PROGRAMS.
-
-
- NOW, THE CREATION OF A FILER DATABASE FILE HAS BEEN COMPLETED.
- LOAD IN THE FILER DATABASE PROGRAM AND ENTER ACCTREC WHEN THE
- PROGRAM ASKS FOR THE SOURCE FILE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 7
-
-
-
-
-
-
-
-
- FILER PROGRAM
- =============
-
- THE FILER PROGRAM permits the user to display, add, correct,
- or delete data records from the disk file. Upon entry to the
- program, the user will be asked to input the name of the FILER
- FILE to be opened and the current date. FILER FILE names must
- conform to the rules for file names required by the Disk
- Operating System and have a file extension of either ".DAT" or
- ".BAK". FILER FILES with the ".BAK" file extension are the back
- up of the most current version.
-
- DATA DISPLAY MODES : The FILER PROGRAM uses two modes or
- levels when data records are being displayed (1) DATA RECORD MODE
- and (2) FIELD DATA MODE. In the DATA RECORD MODE, only complete
- data records are displayed with special keys referring to the
- data record as a whole. For example, if RETURN key is depressed,
- the next whole data record to be displayed on the screen. On the
- other hand, while in the FIELD DATA MODE, special keys are
- defined to act on the individual data fields which make up the
- whole data record. For example, while in the FIELD DATA MODE,
- depressing the CTRL X key will cause the next field in the data
- record to be available for editing or data entry. Note that the
- item referenced is the field as opposed to the whole record.
- Using two display modes makes it possible to step thru a data
- file, examining whole records at a time with a minimum number of
- keystrokes to advance from one record to the next. When it is
- desired to change from DATA RECORD MODE to FIELD DATA MODE, this
- may be accomplished by depressing the F2 FUNCTION key. To change
- back from FIELD DATA MODE to DATA RECORD MODE, depress the F1
- FUNCTION key.
-
- FILER MENU : The FILER MENU is utilized to select the various
- functions that will be performed by the program on the data
- contained within a FILER FILE :
-
- (1) ADD / ENTER RECORDS
-
- (2) DISPLAY RECORDS
-
- (3) CORRECT RECORD
-
- (4) DELETE RECORD
-
- (5) END FILER PROGRAM
-
-
-
-
-
-
-
-
-
-
-
-
- 8
-
-
-
-
-
-
-
-
- ADD / ENTER RECORDS
- ===================
-
- Selection of the ADD / ENTER RECORD option on the menu will
- begin a loop to continuously enter new records. The screen will
- clear and a null or empty data record will be displayed on the
- screen. Data field names will be displayed with blank (filled
- with spaces) fields after each field label. The program will be
- in FIELD DATA MODE in which data can be successively entered into
- each data field. After entries have been made, the program will
- prompt, DATA OK (Y/N) ? A response of "N" will cause the program
- to return to the first field and permit correction of data. Any
- response other than "N" will cause the program to build a new
- data record , append this new data record to the end of the
- existing data records in the FILER FILE and update the number of
- records. If the F1 FUNCTION key is depressed, the program will
- return to the FILER MENU. A "Y" key will cause the record to be
- saved and the screen cleared for the entry of another record. The
- only means of ending the continuous input of new records is to
- use the F1 FUNCTION key.
-
-
- DISPLAY RECORDS
- ===============
-
- Selection of the DISPLAY RECORDS option will cause the program
- to request the number of the first record to be displayed. Then
- in DATA RECORD MODE, the program will successively display whole
- records. When a given data record is displayed on the screen, the
- 24th line will contain the prompt "RETURN TO CONTINUE" and the
- record number.
-
- There are several special keys that will facilitate use of the
- FILER PROGRAM :
-
- RETURN KEY, Causes the next DATA RECORD to be displayed
- CTRL F, CTRL G, or if the current record is the last one in
- F10 FUNCTION KEY the file causes the MENU to be displayed.
-
- F9 FUNCTION, If the current record is not already the
- CTRL D, CTRL A first record in the file, the DOWN ARROW KEY
- will Cause the previous DATA RECORD to be
- displayed.
-
- F2 FUNCTION KEY, Causes the program to change from DATA RECORD
- CTRL E, CTRL X MODE to FIELD DATA MODE thereby making it
- possible to edit or modify the data in each
- DATA FIELD.
-
- F1 FUNCTION KEY Causes the program to leave the DATA RECORD
- MODE and return to the program MENU.
-
- BACK ARROW KEY Causes a OK TO DELETE (Y/N) ? prompt and on
- a "Y" answer causes the current record to be
- replaced with a NULL or EMPTY data record
-
-
- 9
-
-
-
-
-
-
-
-
- When in the DISPLAY RECORDS mode, the entry of the F2 FUNCTION
- KEY or the CTRL X or CTRL E will cause the program to enter the
- FIELD DATA MODE. In this mode, the cursor will move from field to
- field in the record to identify which field is available for data
- entry or modification.
-
- In the FIELD DATA EDIT MODE, WORDSTAR like commands are
- available to edit data in the active field. The special key
- functions are : CTRL A, CTRL S, CTRL D, CTRL F, CTRL T, CTRL Q,
- CTRL W, FUNCTION KEY 6, FUNCTION KEY 8, FUNCTION KEY 9 and
- FUNCTION KEY 10. These keys control the data in the edit field
- and the position of the cursor. In general, new characters and
- entered under the cursor position with the cursor moving one
- position to the right. When characters are deleted, the character
- PRIOR to the cursor position is deleted.
-
-
- RETURN KEY Causes the cursor to move to the next field.
- If the field just edited is the last field,
- the record will be saved for writing to disk
- and the program will return to the DATA
- RECORD MODE.
-
- CTRL S Causes the cursor to move one character to
- the left in the edit field.
-
- CTRL D Causes the cursor to move one character to
- the right in the edit field.
-
- CTRL A Causes the cursor to move one word to the
- left in the edit field.
-
- CTRL F Causes the cursor to move one word to the
- right in the edit field.
-
- CTRL G Causes the character under the cursor to be
- deleted. (The BACK ARROW key causes the
- character before the cursor to be deleted.)
-
- CTRL T Causes the word to the right of the cursor to
- be deleted and all characters to the right to
- be moved to the left to close the gap
- created.
-
- CTRL Y Causes the entire field to be replaced with
- spaces.
-
- CTRL Q Causes the cursor to move to the left margin
- of the current field.
-
- CTRL W Causes the cursor to move to the right margin
- of the current field.
-
-
-
-
-
- 10
-
-
-
-
-
-
-
-
- BACK ARROW KEY Causes the character preceding the cursor to
- be deleted and subsequent characters to the
- right to all be moved one position to the
- left.
-
-
- TAB KEY Causes the cursor to move 6 spaces to the
- right in the data field. Existing data in the
- field is not changed by use of the TAB KEY.
-
- In addition to the special keys used to edit or enter data,
- there are several keys to permit manipulation of data or movement
- between fields. These keys are FUNCTION 1, FUNCTION 6, FUNCTION
- 8, FUNCTION 9, FUNCTION 10, BACKSLASH, CTRL E, CTRL X, CTRL C,
- and CTRL R.
-
- FUNCTION 6, Causes the cursor to move to the field
- CTRL E preceding the current data field.
-
- FUNCTION 8, Causes the cursor to move to the next field
- CTRL X in the file.
-
- CTRL R Causes the cursor to move to the first field
- in the record.
-
- BACK SLASH KEY This key when depressed causes the program to
- display the message : "FIND LABEL ..... ENTER
- TARGET : ". Date entered in response to this
- message is compared with the data labels
- which identify each data field. If a match is
- found with any of the data field labels, the
- cursor will move to that field. If no match
- can be found, the first field of the data
- record will be displayed. For example if
- after the entry of the "\", the data "NAM" is
- entered, the program will examine all field
- names starting with the first field for an
- field name that begins with the three letters
- "NAM". If for example, one field was named
- "NAME" a match would be found and the cursor
- will move to that field.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 11
-
-
-
-
-
-
-
-
- F10 FUNCTION KEY This key when depressed causes FILER to
- display the message : "SEARCH UP... ENTER
- TARGET :". Data entered in response will
- cause the program to search all higher data
- records for a match on the characters which
- are identified as the TARGET. For example if
- the user is in DATA FIELD # N and the
- characters "HARLAN" are entered in response
- to the TARGET : prompt, the program will
- examine each data record with higher record
- numbers for data in DATA FIELD # N for
- characters which match with the letters
- "HARLAN". THIS COMPARISON FUNCTION IS NOT
- POSITION SENSITIVE. If the target is matched
- anywhere in the field, that record will be
- displayed so the user may edit or enter new
- or revised data. This feature makes it
- possible for a user to search a file for any
- given name or value without having to read,
- display, and examine the contents of each
- DATA RECORD.
-
- If the search is being made for data in a
- numeric field, the number value entered will
- be converted to REAL NUMERIC FORMAT and the
- search will be for an exact match of the
- numeric value. If the search is being made in
- an ASCII field, then the search will be made
- by comparing the data input as the search
- target with all the data in the comparison
- fields. Note that in this ASCII comparison, a
- match is not dependent upon the position of
- the data.
-
- When searching a numeric field, it is
- possible to look for values greater than or
- less than the TARGET VALUE by including the
- greater than sign ">" or the less than sign
- "<" as the first character of the field. For
- example, if it was desired to find values
- greater than, say, 12.45, enter >12.45 after
- the ENTER TARGET request. To find a number
- smaller than, say, 99.9, enter <99.9 after
- the ENTER TARGET request.
-
- FILER saves the target value that is entered
- in a search and makes it possible to repeat
- the search for the same target. To start the
- search again, first depress the F10 KEY. Then
- to search for the same target, depress the
- F10 KEY a second time without entering other
- data. FILER will display the target value
- saved and commence the search.
-
-
-
-
- 12
-
-
-
-
-
-
-
-
- F9 FUNCTION KEY This key causes the FILER program to search
- all LOWER data records for a match on the
- data which was entered in response to the
- message "SEARCH DOWN.... ENTER TARGET :".
- Operation is otherwise the same as the
- GREATER THAN KEY above.
-
-
- F1 FUNCTION KEY This key will cause the program to skip the
- CTRL C remaining fields in the data record and go to
- the DATA OK prompt which occurs at the end of
- data input to the fields of a DATA RECORD. In
- essence it permits the user to exit the FIELD
- DATA MODE and return to the DATA RECORD MODE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 13
-
-
-
-
-
-
-
-
- CORRECT RECORD
- ==============
-
- Selection of the CORRECT RECORD option permits the user to
- make changes to the data held in any given DATA RECORD. After
- this option has been selected, the FILER program will request the
- record number of the DATA RECORD which is to be modified. After
- receiving a valid number, the program will display the DATA
- RECORD in FIELD DATA MODE with the first field available for edit
- or data entry.
-
- All special key functions detailed under the DISPLAY RECORDS,
- FIELD DATA MODE are operative at this time. Data fields are
- processed sequentially and at the end the prompt DATA RECORD OK?
- (Y/N) is shown. A "N" response will cause the first field to be
- displayed again for edit or data entry. Any other response will
- cause the program to store the DATA RECORD as modified and return
- to the MENU.
-
-
- DELETE RECORD
- =============
-
- This option permits the user to replace the data stored in any
- given DATA RECORD with a NULL or EMPTY data record. After the
- option is selected, the program will ask for a record number to
- be entered. After a valid number is entered, the program will
- display the contents of that DATA RECORD and display the prompt
- OK TO DELETE? A "Y" response will cause the record to be deleted
- by being replaced with a NULL or EMPTY data record. The record
- still exists, but there is nothing stored in it. NULL records can
- be eliminated from a FILER FILE by sorting the file with the
- SORTER program.
-
-
-
- END FILER PROGRAM
- =================
-
- At the conclusion of using the FILER PROGRAM, it is IMPERATIVE
- that the return to the DISK OPERATING SYSTEM be made via OPTION
- NUMBER 5. In this option, the program performs the housekeeping
- function of closing open files to ensure that data stored in the
- file will be available in the future. If the program "blows up"
- and exits to the DISK OPERATING SYSTEM without closing the FILER
- FILE, it is possible that recently added data in the file may be
- lost. It is highly recommended that regular backup procedures be
- followed so that recovery is as painless as possible!
-
-
-
-
-
-
-
-
-
- 14
-
-
-
-
-
-
-
-
- SORTER
- ======
-
- The SORTER program permits the user to sort any FILER FILE. The
- program utilizes the following steps:
-
- First, the order of sort is determined by designating one or
- more fields within the record as the KEY fields. A maximum of ten
- fields may be used to define the KEY.
- Second, each record of the file is read and data from the
- fields designated as KEY fields is assembled in the order
- selected into a file held in computer memory.
- Third, the KEY field file is sorted to determine the desired
- order of each record in the file.
- Fourth, Using this order, records are read from the old file
- and written to the replacement file in the desired sorted order.
-
-
- EXAMPLE OF SORTING A FILE
- =========================
-
- To sort a file, such as the ACCTREC.DAT, get to the Disk
- Operating System prompt for your computer and enter the program
- name "SORTER". The program will load, the screen will clear and
- display the message "SORT A LA PASCAL" followed by the prompt
- "ENTER SOURCE FILE NAME : ". Enter "ACCTREC", the name of the
- FILER FILE that is to be sorted. If the file name entered exists
- as a disk file, the program will perform the following steps:
-
- 1. If a file of the same name with the file extension ".BAK"
- exists, it will be deleted and the message "ACCTREC.BAK HAS
- BEEN DELETED." will be displayed.
-
- 2. The file that is to be sorted will be renamed from
- "ACCTREC.DAT" TO "ACCTREC.BAK". Next the message
- "ACCTREC.DAT RENAMED ACCTREC.BAK" will be displayed on the
- screen.
-
- The source FILER FILE will not be modified in any way by the sort
- procedure. If for any reason, the sort process does not complete
- successfully and create a replacement FILER FILE, it is possible
- to recover the original file by using the rename capability of
- the Disk Operating System:
-
- REN ACCTREC.DAT = ACCTREC.BAK (FOR CP/M COMPUTER DOS)
- RENAME ACCTREC.BAK ACCTREC.DAT (FOR PC DOS COMPUTERS )
-
-
-
-
-
-
-
-
-
-
-
- 15
-
-
-
-
-
-
-
-
- The screen will clear and the labels for each field followed by
- an equals and a field number will be displayed. For the ACCTREC
- FILER FILE, the screen looks like this:
-
-
- NAME = 1 ACCOUNT REC = 9
- ADDR1 = 2 AMT PAST DUE = 10
- ADDR2 = 3
- CITY = 4 AREA CODE = 7
- STATE = 5 ZIPCODE = 6 PHONE NBR = 8
-
- IN ORDER OF IMPORTANCE :
-
- ENTER KEY FIELD NUMBER :
-
-
-
- If, for example, it was desired to sort the FILER FILE by AREA
- CODE as the first criteria and then to sort the records by NAME
- as the second criteria, first enter the digit "7" which is found
- as the field number corresponding to the label AREA CODE.
-
-
-
- NAME = 1 ACCOUNT REC = 9
- ADDR1 = 2 AMT PAST DUE = 10
- ADDR2 = 3
- CITY = 4 AREA CODE = 7
- STATE = 5 ZIPCODE = 6 PHONE NBR = 8
-
- IN ORDER OF IMPORTANCE :
-
- ENTER KEY FIELD NUMBER : 7
-
-
- The screen will change on the 23rd and 24th lines of the screen
- to prompt for the entry of the NEXT KEY FIELD:
-
-
- NAME = 1 ACCOUNT REC = 9
- ADDR1 = 2 AMT PAST DUE = 10
- ADDR2 = 3
- CITY = 4 AREA CODE = 7
- STATE = 5 ZIPCODE = 6 PHONE NBR = 8
-
- IN ORDER OF IMPORTANCE :
-
- ENTER NEXT KEY FIELD :
- ENTER RETURN ONLY TO END KEY DEFINITION
-
-
-
-
-
-
-
-
- 16
-
-
-
-
-
-
-
-
- Next enter the digit "1" as the field number which corresponds to
- the label NAME :
-
-
- NAME = 1 ACCOUNT REC = 9
- ADDR1 = 2 AMT PAST DUE = 10
- ADDR2 = 3
- CITY = 4 AREA CODE = 7
- STATE = 5 ZIPCODE = 6 PHONE NBR = 8
-
- IN ORDER OF IMPORTANCE :
-
- ENTER NEXT KEY FIELD : 1
- ENTER RETURN ONLY TO END KEY DEFINITION
-
-
- To end the KEY DEFINITION, depress the return key without
- entering a digit (null entry). The program will clear the screen
- and display :
-
-
- KEY FIELDS SELECTED ARE :
- =========================
-
- 1 : AREA CODE
- 2 : NAME
-
- =========================
-
- KEYLENGTH = 25
- IS THIS OK (Y/N) :
-
- If the KEY FIELDS selected are correct and in the desired order,
- enter "Y" or else enter "N". If "N" is entered, the process of
- selecting KEY FIELDS will begin again. If "Y" is selected, then
- the actual sort process will begin. As records are read and the
- key fields assembled, the KEY FIELD data and the RECORD NUMBER
- will be displayed on the screen. For the "ACCTREC" FILE, the
- display might look like this:
-
- 313John Doe 1
- 317Sam Spade 2
- 419K. Philip 3
- 215Ben Dogood 4
-
- ===___________________===
- \ \ \
- \ \ \__ Record Number
- \ \__ NAME
- \
- \__ AREA CODE
-
-
-
-
-
-
- 17
-
-
-
-
-
-
-
-
- Following the reading of the records of the file and the creation
- of the KEY FIELDS, the screen will clear and the following
- messages will be displayed:
-
-
- DATA INPUT COMPLETED
-
- ..oO[ SORTING ]Oo..
-
- ..oO[ KEY SORT DONE ]Oo..
-
- ..oO[ MOVING RECORDS ]Oo.
-
- ..oO[ RECORDS MOVED ]Oo..
-
- 0 [ 0 INDICATES SUCCESSFUL SORT ]
-
- ..oO[ HAVE A GREAT DAY! ]Oo..
-
-
- The source FILER FILE will not be modified in any way by the sort
- procedure. If for any reason, the sort process does not complete
- successfully and create a replacement FILER FILE, it is possible
- to recover the original file by using the rename capability of
- the Disk Operating System:
-
- REN ACCTREC.DAT = ACCTREC.BAK (FOR CP/M COMPUTER DOS)
- RENAME ACCTREC.BAK ACCTREC.DAT (FOR PC DOS COMPUTERS )
-
- Disk sorts fail most often due to lack of available storage space
- on the disk. If this is the case, correct the situation before a
- second attempt is made to sort the disk. FOR SAFETY, IF YOUR SORT
- FAILS, EXIT THE SORT PROGRAM AND IMMEDIATELY COPY ALL FILES WITH
- THE NAME OF YOUR FILER FILE AND ANY FILE EXTENSION TO ANOTHER
- DISK. In this way, you will protect yourself from accidentally
- "BACKING UP YOUR FILES OUT OF EXISTENCE".
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 18
-
-
-
-
-
-
-
-
- STARTER PROGRAM
- ===============
-
- The STARTER program is a beginning framework for a report
- program that assists the user in preparing custom output reports.
- The program has been divided into two parts "STARTER.PAS" and
- "STARTER1.PAS". In general, STARTER.PAS, contains the procedures
- necessary to access a FILER FILE, read data within each record,
- and edit the data into a from suitable for display. STARTER1.PAS
- contains the code to open a specific FILER FILE and write data
- into a custom report.
-
- To utilize the STARTER program, it is necessary to be able to
- modify the program which is written in TURBO PASCAL. The
- procedure to modify a source program and create a executable
- program is as follows:
- (1) Select the disk which contains the TURBO PASCAL programs,
- STARTER.PAS AND STARTER1.PAS. Bring your computer up and if
- necessary go to the drive which will activate this disk.
- (2) Make copies of the files "STARTER.PAS" and "STARTER1.PAS"
- giving the copies a name appropriate to the application report
- that you are creating. For this discussion, it is assumed that
- the application is an ACCOUNTS RECEIVABLE report and the file
- will be renamed "ACCTREC.PAS" AND "ACCTREC1.PAS".
- (3) Enter "TURBO" and depress the return key.
- (4) Respond "Y" when turbo asks if you wish to include error
- messages.
- (5) Depress "M" for main file and enter "ACCTREC" and the
- return key. This instructs TURBO PASCAL to begin any
- compilation using the file "ACCTREC.PAS".
- (6) Depress "E" for edit and the source code contained in
- "ACCTREC.PAS" will be displayed on the screen. In general, the
- code in this source file does not have to be modified to create
- a custom report file with one important exception. The source
- code is divided into two parts and the first part chains or
- links to the second part with a compiler directive. It is
- necessary to modify this compiler directive which is in the
- last line of code in this file. Change the code
- "{$ISTARTER1.PAS}" TO "{$IACCTREC1.PAS}". This instruction causes
- the compiler to load the file "ACCTREC1" and to continue the
- compilation with this code. See "COMPILER DIRECTIVES" in the
- TURBO PASCAL manual for further information.
- (7) Key in "CTRL K" AND "D" to exit the TURBO PASCAL editor.
- (8) Depress "S" to cause TURBO PASCAL to save the changed file.
- (9) Depress "W" for work file and enter "ACCTREC1" and the
- depress the return key. This establishes "ACCTREC1.PAS" as the
- file that you which to work with to modify the program.
- (10) Depress "E" and the TURBO PASCAL editor will display the
- contents of "ACCTREC1.PAS". Make the modifications to the
- source code to customize the report program to the desired
- form.
- (11) Key in "CTRL K" AND "D" to exit the editor and return to
- TURBO PASCAL.
- (12) Key in "S" to save the file by writing it to disk.
- (13) Key in "O" for "Options"
-
-
- 19
-
-
-
-
-
-
-
-
- (14) Key in "C" to build a "COM" FILE.
- (15) KEY IN "Q" to quit the options loop.
- (16) Key in "C" to compile the program and build an executable
- com file on disk under the file name "ACCTREC.COM".
- (17) Key in "Q" to quit TURBO PASCAL and return to DOS.
- (18) Key in "ACCTREC" and depress return to run the customized
- report program. (Make sure the printer is on and selected).
-
-
-
- CONTENTS OF STARTER.PAS
- =====================
-
- "STARTER" contains the following functions / procedures:
-
- BCDTOIN: CONVERT BINARY CODED DECIMAL TO AN
- INTEGER VALUE.
-
- CHTOIN: CONVERT A PORTION OF AN ASCII STRING INTO
- AN INTEGER VALUE.
-
- GETDATAFROMARRAY: EXTRACT DATA FROM AN ARRAY OF CHARACTERS
- AND CONVERT INTO A STRING EXPRESSION.
-
- TIDE: DELETE COMMAS, DOLLAR SIGNS AND PLUS
- SIGNS FROM THE ASCII STRING DISPLAY OF A
- NUMBER.
-
- EDITNBR: EDIT A NUMBER TO DISPLAY DOLLAR SIGNS,
- COMMAS, AND MINUS SIGN TO IMPROVE CLARITY
- IN READING THE VALUE.
-
- STRINGTOREAL: CONVERT A ASCII STRING REPRESENTATION OF
- A NUMBER INTO A REAL DATA FORM TO PERMIT
- USE TO THE VALUE WITHIN THE COMPUTER
- PROGRAM.
-
- CALCULATE: CALCULATE DATA RECORD NUMBER AND
- PRECEDING BYTE FOR USE WITH GETDATAREC
- PROCEDURE.
-
- GETDATAREC: PROCEDURE TO READ AND WRITE DATA RECORD
- FROM DISK AND PLACE IT IN A CHARACTER
- ARRAY NAMED "GETDATA".
-
- EXIST: FUNCTION TO DETERMINE IF A FILENAME
- EXISTS IN THE DISK DIRECTORY.
-
-
-
-
-
-
-
-
-
-
- 20
-
-
-
-
-
-
-
-
- MOVERECORDDATATOARRAY: PROCEDURE TO READ A FILER RECORD AND
- PLACE THE FIELD DATA INTO AN ARRAY. IF
- THE DATA IS ASCII AND IN THE NTH FIELD OF
- THE RECORD, THIS PROCEDURE WILL PLACE THE
- ASCII DATA IN ASCIIFIELD[N]. IF THE DATA
- IS NUMERIC AND IN THE NTH FIELD, THIS
- PROCEDURE WILL PLACE THE NUMERIC VALUE IN
- NUMFIELD[N]. THE VARIABLES ASCIIFIELD[N]
- AND NUMFIELD[N] MAY BE USED IN PASCAL
- STATEMENTS TO DISPLAY OR MANIPULATE DATA
- IN ANY DESIRED FASHION.
-
- STARTER.PAS ENDS WITH THE STATEMENT {$ISTARTER1.PAS} WHICH
- INSTRUCTS THE COMPILER TO INCLUDE THE SOURCE CODE CONTAINED IN
- THE PROGRAM "STARTER1.PAS". WHEN THE STARTER PROGRAM IS USED AS
- THE BASIS FOR A CUSTOM REPORT, IT MUST BE COPIED AND RENAMED TO
- REFLECT THE NATURE OF THE REPORT. FOR EXAMPLE, IF THE REPORT IS
- AN ACCOUNTS RECEIVABLE REPORT, THEN STARTER.PAS MIGHT BE COPIED
- AND RENAMED ACCTREC.PAS AND STARTER1.PAS MIGHT BE RENAMED
- ACCTREC1.PAS. AT THIS TIME IT IS NECESSARY TO RENAME THE LAST
- STATEMENT IN ACCTREC.PAS FROM {$ISTARTER1.PAS} TO
- {$IACCTREC1.PAS} SO THAT THE COMPILER INCLUDES THE PROPER CODE
- WHEN ACCTREC.PAS IS COMPILED.
-
-
- CONTENTS OF STARTER1.PAS
- =======================
-
- "STARTER1" CONTAINS THE FOLLOWING PROCEDURES:
-
- INITIALIZE: PROVIDES CODE TO IDENTIFY THE REPORT NAME AND
- INPUT THE FILER FILE NAME AND CURRENT DATE.
- READS HEADER INFORMATION FROM FILER FILE AND
- INITIALIZES VARIABLES FOR ENTRY INTO THE
- REPORT PROGRAM.
-
- NEWPAGE: CAUSES PRINTER TO EXECUTE A FORMFEED.
-
- PAGETITLE: PRINTS THE TITLE OF THE REPORT AND THE PAGE
- NUMBER.
-
- DATAHEADINGS: PRINTS A DATA HEADING TO IDENTIFY THE USE OF
- EACH COLUMN OF DATA.
-
- PRINTSUBTOTALS: PRINTS SUB TOTALS FOR THE COLUMNS OF DATA AND
- THEN SETS THE SUB TOTAL TO ZERO.
-
- PRINTGRANDTOTALS PRINTS THE GRAND TOTALS FOR THE DATA THAT HAS
- BEEN PRINTED.
-
- These procedures are then followed by the code for the actual
- program that uses all the functions and procedures listed above.
-
-
-
-
-
- 21
-
-
-
-
-
-
-
-
- CREATING A CUSTOMIZED REPORT PROGRAM
- ====================================
-
- The FILER FILE "ACCTREC" will be used as an example of the
- process of creating a customized report program. "ACCTREC" was
- selected as the name for the report program. The first step is
- then to copy the STARTER.PAS AND STARTER1.PAS programs to files
- called "ACCTREC.PAS " and "ACCTREC1.PAS". This leaves the
- STARTER PROGRAMS available for use with another report program.
- Since all modifications will be made to ACCTREC.PAS and
- ACCTREC1.PAS, the program generated will automatically be named
- "ACCTREC.COM".
-
- The "STARTER" programs refer to data in the filer file by the
- array names ASCIIFIELD[N] and NUMFIELD[N]. The easiest way of
- getting a list of the fields in the FILER FILE is to print a copy
- of the file generated by the "PICTOFRM" PROGRAM. In this example,
- the contents of "ACCTREC.FRM" look like this:
-
-
- NAME : AAAAAAAAAAAAAAAAAAAA ACCOUNT REC : 123,456.78
- ADDR1 : AAAAAAAAAAAAAAAAAAAA AMT PAST DUE : 123,456.78
- ADDR2 : AAAAAAAAAAAAAAAAAAAA
- CITY : AAAAAAAAAAAAAAAAA AREA CODE : AAA
- STATE : AA ZIPCODE : AAAAA PHONE NBR : AAAAAAA
-
- ROW 1, COL 1, FORM 15, LEN 20, MISC ___, LABEL >NAME <
- ROW 1, COL 36, FORM 2, LEN 9, MISC ___, LABEL >ACCOUNT REC <
- ROW 2, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR1 <
- ROW 2, COL 36, FORM 2, LEN 9, MISC ___, LABEL >AMT PAST DUE <
- ROW 3, COL 1, FORM 15, LEN 20, MISC ___, LABEL >ADDR2 <
- ROW 4, COL 1, FORM 15, LEN 17, MISC ___, LABEL >CITY <
- ROW 4, COL 36, FORM 3, LEN 20, MISC ___, LABEL >AREA CODE <
- ROW 5, COL 1, FORM 15, LEN 2, MISC ___, LABEL >STATE <
- ROW 5, COL 14, FORM 15, LEN 5, MISC ___, LABEL >ZIPCODE <
- ROW 5, COL 36, FORM 15, LEN 7, MISC ___, LABEL >PHONE NBR <
-
- Extract the information on FORM and LABEL as follows:
-
-
- FORM 15, LABEL >NAME < FIELD 1 ASCIIFIELD[1]
- FORM 2, LABEL >ACCOUNT REC < FIELD 2 NUMFIELD[2]
- FORM 15, LABEL >ADDR1 < FIELD 3 ASCIIFIELD[3]
- FORM 2, LABEL >AMT PAST DUE < FIELD 4 NUMFIELD[4]
- FORM 15, LABEL >ADDR2 < FIELD 5 ASCIIFIELD[5]
- FORM 15, LABEL >CITY < FIELD 6 ASCIIFIELD[6]
- FORM 15, LABEL >AREA CODE < FIELD 7 ASCIIFIELD[7]
- FORM 15, LABEL >STATE < FIELD 8 ASCIIFIELD[8]
- FORM 15, LABEL >ZIPCODE < FIELD 9 ASCIIFIELD[9]
- FORM 15, LABEL >PHONE NBR < FIELD 10 ASCIIFIELD[10]
-
-
-
-
-
-
-
- 22
-
-
-
-
-
-
-
-
- Field numbers start with 1 and are numbered in the same order
- that the cursor moves from field to field. Any field with a FORM
- 15 is an ascii field. Any field with a digit other than 15 is a
- numeric field with the decimal value determining how many digits
- are displayed to the right of the decimal point.
-
- IN WRITING A CUSTOMIZED REPORT, DATA IN EACH FIELD CAN BE
- REFERENCED USING THE VARIABLE ARRAY NAMES "ASCIIFIELD[N] FOR
- ALPHA DATA AND NUMFIELD[N] FOR NUMERIC DATA WHERE N STANDS FOR
- THE FIELD NUMBER. For example, to print the alpha data in field
- 1, use the code : "WRITELN(LST,ASCIIFIELD[1];". Or, to print the
- number in field 4, use the code : "WRITELN(LST,NUMFIELD[4];".
-
- To customize the title of the report, search source code for
- the following PASCAL CODE:
- {================================================================}
- { PROCEDURE PAGE TITLE }
- {================================================================}
- PROCEDURE PAGETITLE;
- BEGIN
- WRITE(LST,' SAMPLE REPORT TITLE ');
- WRITELN(LST,'PAGE ',PAGE);
- WRITELN(LST);
- WRITELN(LST);
- PAGE := PAGE +1;
- LINE := LINE +3;
- END;
- Revise the line that include the text "SAMPLE REPORT TITLE" to
- the desired report title. Add spaces after the title so that the
- location of the page number is correct in the final document.
-
-
- To customize the DATA HEADINGS, search the source code for the
- following PASCAL CODE :
- {================================================================}
- { PROCEDURE DATA HEADING }
- {================================================================}
- PROCEDURE DATAHEADING;
- BEGIN
- WRITELN(LST,' NAME ADDRESS ACCOUNT 1 ACCOUNT 2');
- WRITELN(LST,'===========================================================');
- WRITELN(LST);
- LINE := LINE +3;
- END;
- Modify the lines which list the column names and the underline to
- conform to the desired report format and data content.
-
-
-
-
-
-
-
-
-
-
-
- 23
-
-
-
-
-
-
-
-
- To customize the SUB TOTALS, find the source code for the
- following PASCAL CODE :
- {================================================================}
- { PROCEDURE PRINT SUB TOTALS }
- {================================================================}
- PROCEDURE PRINTSUBTOTALS;
- BEGIN
- WRITELN(LST,' ============ ==========');
- WRITE(LST,'SUB TOTAL : ');
- ANS := EDITNBR(SUBTOTAL[5],10,2,'$'); { SUB TOTAL FOR ACCOUNT 1 }
- WRITE (LST,ANS);
- ANS := EDITNBR(SUBTOTAL[6],13,1,' '); { SUB TOTAL FOR ACCOUNT 2 }
- WRITELN(LST,ANS);
- WRITELN(LST);
-
- SUBTOTAL[5] := 0;
- SUBTOTAL[6] := 0;
-
- LINE := LINE + 3;
-
- IF LINE > PAGEFULLLINECOUNT - 3 THEN
- BEGIN
- NEWPAGE;
- PAGETITLE;
- END;
- END;
- Modify the source code to position the title "SUB TOTAL :". Now
- examine the code which is used to edit a value stored in
- SUBTOTAL[N] and print the answer :
- ANS := EDITNBR(SUBTOTAL[5],10,2,'$'); { SUB TOTAL FOR ACCOUNT 1 }
- \ \ \ \ \ \ \
- \ \ \ \ \ \ \__ EDIT CHARACTER, EITHER "$"
- \ \ \ \ \ \ OR SPACE, PLACED BEFORE
- \ \ \ \ \ \ PRINTED NUMERIC VALUE.
- \ \ \ \ \ \__ NUMBER OF DIGITS AFTER THE
- \ \ \ \ \ DECIMAL POINT.
- \ \ \ \ \__ WIDTH OF THE NUMERIC FIELD
- \ \ \ \
- \ \ \ \____ FIELD NUMBER OF DATA.
- \ \ \
- \ \ \___ NAME OF VARIABLE TO BE EDITED.
- \ \
- \ \__ PASCAL FUNCTION TO EDIT NUMBER, ADD $
- \ AND COMMAS AND PLACE RESULT IN AN ASCII
- \ FIELD OF A SPECIFIED LENGTH.
- \
- \__ ASCII STRING TO HOLD RESULT OF EDIT.
-
- WRITE (LST,ANS);
- Using a similar pattern of instructions, modify the code to
- output all the desired subtotals.
-
-
-
-
-
-
- 24
-
-
-
-
-
-
-
-
- To customize the GRAND TOTALS, find the source code for the
- following PASCAL CODE :
- {================================================================}
- { PROCEDURE PRINT GRAND TOTALS }
- {================================================================}
- PROCEDURE PRINTGRANDTOTALS;
- BEGIN
- WRITELN(LST,' ============ ==========');
- WRITE(LST,'GRAND TOTAL : ');
- ANS := EDITNBR(GRANDTOTAL[5],13,2,'$'); { SUB TOTAL FOR ACCOUNT 1 }
- WRITE (LST,ANS);
- ANS := EDITNBR(GRANDTOTAL[6],13,1,' '); { SUB TOTAL FOR ACCOUNT 2 }
- WRITELN(LST,ANS);
- END;
- Customizing GRAND TOTALS is identical in form to customizing the
- SUB TOTALS, as explained above.
-
-
- Subtotals are printed when the contents of a designated field
- change in contents. For example, if it was desired to have a
- subtotal printed every time the NAME in FIELD 1 changed it is
- necessary to set two lines of code. First, it is necessary to
- initialize the contents of a comparison field so that we do not
- do a SUB TOTAL at the beginning of the report. Find the source
- code which contains the following :
-
- {================================================================}
- { OUTPUT CODE GOES HERE }
- {================================================================}
- BEGIN
-
- INITIALIZE; { ID AND READ IN FILE PARAMETERS }
-
- PAGE := 1; { INITIALIZE FOR REPORT }
- LINE := 1;
- PAGEFULLLINECOUNT := 60;
- DATARECORD := 1; { SET UP SUB TOTAL TEST }
- MOVERECORDDATATOARRAY;
- PREVCONTENTS := ASCIIFIELD[1];
- Modify the contents of the last line of code to insert the field
- number that will be used for comparison purposes. ASCIIFIELD[1]
- is the correct comparison field if we wish to have SUB TOTALS
- every time the NAME changes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 25
-
-
-
-
-
-
-
-
- Second, it is necessary to modify the line of code that actually
- tests to see if the field has changed and then call the SUB
- TOTALS PROCEDURE if it has. Find the SOURCE CODE which contains
- the following:
- {==============================================================}
- { PROCESS BODY OF REPORT }
- {==============================================================}
-
- FOR DATARECORD := 1 TO NBRRECUSED DO
- BEGIN
- MOVERECORDDATATOARRAY;
- {========================================}
- { CHECK TO SEE IF SUB TOTAL IS REQD }
- {========================================}
- IF ASCIIFIELD[1] <> PREVCONTENTS THEN
- BEGIN
- PREVCONTENTS := ASCIIFIELD[1];
- PRINTSUBTOTALS;
- END;
- Modify the IF statement above so that the field designated refers
- to the field which controls the SUB TOTAL. In this case the code
- "IF ASCIIFIELD[1] <> PREVCONTENTS THEN..." is correct.
-
- To customize the body of the report where the data from the
- FILER FILE is actually printed, find the source code that
- contains the following :
-
- {========================================}
- { WRITE LINE OF DATA HERE }
- {========================================}
- WRITE(LST,ASCIIFIELD[1],' ',ASCIIFIELD[2],' ');
- ANS := EDITNBR(NUMFIELD[5],10,2,'$'); { ACCOUNT 1 }
- WRITE(LST,ANS);
- ANS := EDITNBR(NUMFIELD[6],13,1,' '); { ACCOUNT 2 }
- WRITELN(LST,ANS);
-
- This code outputs the contents of ASCII FIELDS NUMBER 1 & 2
- followed by edited numeric data from NUMERIC FIELDS NUMBER 5 & 6.
- NUMERIC FIELD 5 is displayed in a field 10 characters wide with 2
- digits after the decimal point and a leading $. NUMERIC FIELD 6
- is displayed in a field 13 characters wide, with 1 digit after
- the decimal point and with no dollar sign. (See the discussion
- under SUB TOTALS for additional information on the functioning of
- the EDITNBR function). Use a similar pattern of code to customize
- the report to display the desired information.
-
- This concludes the steps required to generate a custom report.
- EXIT the TURBO PASCAL EDITOR, compile the program as detailed
- previously and you have powerful customized output program.
-
-
-
-
-
-
-
-
- 26
-
-
-
-
-
-
-
-
- TRANSFER PROGRAM
- ================
-
- The TRANSFER PROGRAM permits the transfer of data within one
- FILER FILE to a second FILER FILE with a different file
- organization. Data in a record is transferred on a field by field
- basis from the source FILER FILE to the DESTINATION FILER FILE.
- Where data is transferred between fields with differing data
- formats, data is converted to the new data format and inserted in
- the field. At the conclusion of the program, the SOURCE FILER
- FILE is left unchanged and the DESTINATION FILER FILE is expanded
- to contain the translated data.
-
- Before the TRANSFER PROGRAM can be used, both the SOURCE FILER
- FILE and the DESTINATION FILER FILE must be created and resident
- on the disk with the TRANSFER PROGRAM. The DESTINATION FILER FILE
- should preferably be empty although this is not mandatory. The
- empty DESTINATION FILER FILE can be easily created from the
- SOURCE FILER FILE with the use of the programs DATTOPIC,
- PICTOFRM, FRMTODAT, and any convenient WORD EDITOR that can
- produce clean text. Refer to the documentation on each of these
- programs.
-
- At the start the program will display
-
-
- TRANSFER A LA PASCAL
- ENTER SOURCE FILE NAME : ________
- ENTER DESTINATION FILE NAME : _________
-
- Enter the name of the older FILER FILE that contains the data you
- wish to transfer after the request for the SOURCE FILE NAME.
- Entry of the file extension '.dat' is optional. Enter the name of
- the new FILER FILE that you wish to transfer data to after the
- request for the DESTINATION FILE NAME. Again the extension is
- optional. Transfer will open both files and display the field
- labels and a field label number of the DESTINATION FILER FILE on
- the screen:
-
-
- NAME = 1 ACCOUNT REC = 7
- ADDR1 = 2 AMT PAST DUE = 8
- ADDR2 = 3
- CITY = 4
- STATE = 5 ZIPCODE = 6
-
-
- NAME OF SOURCE FIELD TO BE TRANSLATED : NAME
- ENTER DESTINATION FIELD NUMBER (ABOVE) : 1
-
-
-
-
-
-
-
-
- 27
-
-
-
-
-
-
-
-
- THE TRANSFER SCREEN :
-
-
- NAME = 1 ACCOUNT REC = 7
- ADDR1 = 2 AMT PAST DUE = 8
- ADDR2 = 3
- CITY = 4
- STATE = 5 ZIPCODE = 6
-
-
- NAME OF SOURCE FIELD TO BE TRANSLATED : NAME
- ENTER DESTINATION FIELD NUMBER (ABOVE) : 1
-
- In this example, the DESTINATION FILER FILE differs from the
- SOURCE FILER FILE only in that the fields for AREA CODE and PHONE
- have been eliminated. The name of the SOURCE FIELDS are displayed
- in succession on line 23 of the screen. Line 24 provides the
- means of entering the field number where data from the SOURCE
- FIELD will ultimately be stored. In the screen displayed above,
- the number '1' would be entered so that data from the SOURCE
- FIELD 'NAME' will be transferred to the DESTINATION FIELD 'NAME'.
- If a RETURN is depressed without entering data or if a '0' is
- entered, no data will be transferred to the DESTINATION FIELD. If
- a '-' is entered, the screen will display the previous field for
- entry. When all of the SOURCE FILE fields have been displayed,
- the screen will clear and a TRANSLATION TABLE will be displayed :
-
- OLD NEW OLD LABEL ==> NEW LABEL
- FLD # FLD #
-
- 1 ===> 1 | NAME ===> NAME
- 2 ===> 2 | ADDR1 ===> ADDR
- 3 ===> 3 | ADDR2 ===> ADDR2
- 4 ===> 4 | CITY ===> CITY
- 5 ===> 5 | STATE ===> STATE
- 6 ===> 6 | ZIPCODE ===> ZIPCODE
- 7 ===> 0 | AREA CODE ===> { NO DATA
- 8 ===> 0 | PHONE NBR ===> { TRANSFERRED
- 9 ===> 9 | ACCOUNT REC ===> ACCOUNT REC
- 10 ===> 10 | AMT PAST DUE ===> AMT PAST DUE
-
- IS TRANSFER TABLE OK (Y/N) :
-
- A response other than 'Y' will cause the process of defining the
- transfer fields to begin again. A 'Y' response will cause the
- program to continue and ask if a printed copy of the table is
- desired. A 'Y' response will cause the table to be printed.
-
- After the TRANSFER TABLE has been defined, Transfer will read all
- records from the SOURCE FILER FILE and transfer data on a field
- by field basis in accordance with the transfer table. During the
- actual transfer, the screen will display the number of records
- transferred.
-
-
-
-
- 28
-
-
-
-
-
-
-
-
- FILER PROGRAMMING INFORMATION
- =============================
-
- INFORMATION ON THE STRUCTURE OF ANY FILER FILE IS CONTAINED IN
- THE FIRST 896 BYTES OF THE RECORD. A DEBUG DUMP OF THE
- ACCTREC.DAT FILE GIVES THE FOLLOWING DATA:
-
- 0100 00 01 06 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- 0180 41 43 43 54 53 52 30 30-30 30 20 20 20 35 31 31 ACCTR0000 511
- 0190 32 30 32 31 30 30 35 2F-32 33 2F 38 35 20 20 20 2021005/23/85
- 01A0 06 06 06 06 06 08 10 10-12 13 30 30 30 30 30 30 ..........000000
- 01B0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
- 01C0 20 20 20 17 02 05 03 07-09 09 30 30 30 30 30 30 .......000000
- 01D0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
- 01E0 3F 3F 3F 3F 3F 3F 3F 3F-32 32 30 30 30 30 30 30 ????????22000000
- 01F0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
-
- 0200 4E 41 4D 45 20 20 41 44-44 52 31 20 41 44 44 52 NAME ADDR1 ADDR
- 0210 32 20 43 49 54 59 20 20-53 54 41 54 45 20 5A 49 2 CITY STATE ZI
- 0220 50 43 4F 44 45 20 41 52-45 41 20 43 4F 44 45 20 PCODE AREA CODE
- 0230 50 48 4F 4E 45 20 4E 42-52 20 41 43 43 4F 55 4E PHONE NBR ACCOUN
- 0240 54 20 52 45 43 20 41 4D-54 20 50 41 53 54 20 44 T REC AMT PAST D
- 0250 55 45 20 00 00 00 00 00-00 00 00 00 00 00 00 00 UE .............
- 0260 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0270 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0280 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0290 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- 0300 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0310 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0320 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0330 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0340 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0350 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0360 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0370 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- CONTINUED NEXT PAGE
-
-
-
-
-
- 29
-
-
-
-
-
-
-
-
- 0380 56 32 2E 30 01 00 10 FF-02 00 10 FF 03 00 10 FF V2.0............
- 0390 04 00 10 FF 05 00 10 FF-05 01 40 FF 04 03 60 FF ..........@...`.
- 03A0 05 03 60 FF 01 03 60 FF-02 03 60 FF 00 00 00 00 ..`...`...`.....
- 03B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- 0400 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0410 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0420 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0430 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0440 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0450 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0460 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0470 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
-
-
- DATA STORED BY THE FILER PROGRAM IN ACCTREC.DAT FOLLOWS THE
- FIRST 896 BYTES SHOWN ABOVE. ACTUAL DATA STORED IN THE FILES IS
- SHOWN BELOW :
-
- 0480 52 4F 42 45 52 54 20 42-4C 41 4B 45 20 20 20 20 ROBERT BLAKE
- 0490 20 20 20 20 4D 49 4C 4C-20 57 41 4C 4C 20 43 4F MILL WALL CO
- 04A0 56 45 52 49 4E 47 53 20-31 30 32 32 32 20 45 20 VERINGS 10222 E
- 04B0 54 45 4E 20 4D 49 4C 45-20 52 44 2E 54 52 4F 59 TEN MILE RD.TROY
- 04C0 20 20 20 20 20 20 20 20-20 20 20 20 20 4E 54 31 NT1
- 04D0 32 33 34 35 32 31 32 31-32 33 34 35 36 37 20 20 23452121234567
- 04E0 20 31 30 31 2E 31 32 20-20 20 20 20 30 2E 30 30 101.12 0.00
- 04F0 54 48 4F 4D 41 53 20 46-2E 20 53 4D 49 54 48 20 THOMAS F. SMITH
-
- 0500 20 20 20 20 54 52 49 4E-49 54 59 20 43 4F 52 50 TRINITY CORP
- 0510 4F 52 41 54 49 4F 4E 20-33 30 38 30 30 20 45 41 ORATION 30800 EA
- 0520 53 54 20 53 49 44 45 20-44 52 2E 20 53 55 4E 20 ST SIDE DR. SUN
- 0530 43 49 54 59 20 20 20 20-20 20 20 20 20 41 52 38 CITY AR8
- 0540 33 38 33 32 37 32 38 31-32 33 34 34 35 35 20 20 38327281234455
- 0550 20 32 31 30 2E 30 30 20-20 20 20 31 35 2E 30 30 210.00 15.00
- 0560 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0570 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
-
- 0580 53 54 55 41 52 54 20 53-2E 20 57 49 4E 44 53 4C STUART S. WINDSL
- 0590 4F 57 20 20 47 52 4F 57-20 52 49 54 45 20 47 52 OW GROW RITE GR
- 05A0 45 45 4E 48 4F 55 53 45-31 32 33 20 41 4D 45 52 EENHOUSE123 AMER
- 05B0 49 43 41 4E 20 52 4F 41-44 20 20 20 42 4C 4F 4F ICAN ROAD BLOO
- 05C0 4D 49 4E 47 54 4F 4E 20-20 20 20 20 20 4E 4A 30 MINGTON NJ0
- 05D0 31 32 33 34 33 38 31 31-32 33 34 35 36 37 20 20 12343811234567
- 05E0 20 20 20 30 2E 30 30 20-20 20 20 20 30 2E 30 30 0.00 0.00
-
- OTHER DATA ENTRIES WOULD BE APPENDED TO THIS DATA IN A MANNER
- SIMILAR TO THE ENTRIES ABOVE.
-
-
-
-
-
-
- 30
-
-
-
-
-
-
-
-
- THE FIRST 128 BYTES OF THE ACCTREC.DAT :
-
- 0100 00 01 06 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- THIS BLOCK OF DATA IS REQUIRED TO MAINTAIN COMPATIBILITY OF THE
- FILER PROGRAMS WITH DATAFILES CREATED UNDER AN EARLIER VERSION
- WRITTEN IN BASIC-Z. THE SECOND AND THIRD BYTES ARE UTILIZED BY
- BASIC-Z TO STORE THE LENGTH OF THE FILE. FOR VERSIONS OF FILER
- WRITTEN IN TURBO PASCAL, THESE FIRST 128 BYTES ARE NOT UTILIZED.
-
-
- THE NEXT 128 BYTES OF ACCTREC.DAT CONTAIN A FILE NAME, NUMBER OF
- RECORDS USED, RECORD LENGTH, BLOCKING FACTOR, NUMBER OF FIELDS
- PER RECORD, DATE OF LAST DATA ENTRY, THE LENGTH OF EACH OF THE
- FIELD LABELS, THE LENGTH OF EACH OF THE DATA FIELDS, AND THE DATA
- TYPE FOR EACH FIELD :
-
- 0180 41 43 43 54 53 52 30 30-30 30 20 20 20 35 31 31 ACCTR0000 511
- 0190 32 30 32 31 30 30 35 2F-32 33 2F 38 35 20 20 20 2021005/23/85
- 01A0 06 06 06 06 06 08 10 10-12 13 30 30 30 30 30 30 ..........000000
- 01B0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
- 01C0 20 20 20 17 02 05 03 07-09 09 30 30 30 30 30 30 .......000000
- 01D0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
- 01E0 3F 3F 3F 3F 3F 3F 3F 3F-32 32 30 30 30 30 30 30 ????????22000000
- 01F0 30 30 30 30 30 30 30 30-30 30 30 30 30 30 30 30 0000000000000000
-
- FILE NAME, NUMBER OF RECORD USED :
- 0180 41 43 43 54 53 52 30 30-30 30 20 20 20 35 31 31 ACCTR0000 511
- ================= =========== =========== =====
- \ \ \
- \ \ \___" 5" = NBR RECORDS USED
- \ \
- \ \___ "0000" = THIS FIELD NOT USED
- \
- \__ "ACCTR" = FIRST 6 LETTERS OF FILE NAME USED WHEN
- FILE WAS CREATED.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 31
-
-
-
-
-
-
-
-
- RECORD SIZE, BLOCKING FACTOR, NBR FIELDS/RECORD, DATE LAST ENTRY :
- 0180 41 43 43 54 53 52 30 30-30 30 20 20 20 35 31 31 ACCTR0000 511
- =====
-
- 0190 32 30 32 31 30 30 35 2F-32 33 2F 38 35 20 20 20 2021005/23/85
- == ===== ===== ======================= ========
- \ \ \ \ \
- \ \ \ \ \__ " " = NOT USED
- \ \ \ \
- \ \ \ \__ "05/23/85" = DATE OF LAST DATA
- \ \ \ ENTRY TO FILE.
- \ \ \
- \ \ \__ "10" = NUMBER OF FIELDS IN EACH RECORD.
- \ \
- \ \__ "02" = BLOCKING FACTOR ( NUMBER OF RECORDS THAT
- \ CAN BE HELD IN A 256 BYTE BLOCK OF DATA )
- \
- \__ "112" = NUMBER OF BYTES IN EACH RECORD.
-
-
- LENGTH OF LABEL FOR EACH FIELDS :
- 01A0 06 06 06 06 06 08 10 10-12 13 30 30 30 30 30 30 ..........000000
- == == == == == == == == == ==
- \ \ \ \
- \ \ <== ETC ==> \ \__ "13" = 13 BYTES LENGTH FOR LABEL
- \ \ \ "AMT PAST DUE "
- \ \ \__ "12" = 12 BYTES LENGTH FOR LABEL
- \ \ "ACCOUNT REC "
- \ \__ "06" = 6 BYTE LENGTH FOR LABEL "ADDR1 "
- \__ "06" = 6 BYTE LENGTH FOR LABEL "NAME "
-
-
- LENGTH OF EACH DATA FIELD "
- 01C0 20 20 20 17 02 05 03 07-09 09 30 30 30 30 30 30 .......000000
- == == == == == == == == == ==
- \ \ \ \
- \ \ \ \__ "09" = 9 BYTES REQUIRED TO STORE
- \ \ <== ETC ==> \ DATA FOR FIELD 10 WHOSE
- \ \ \ PICTURE IS "123,456.78".
- \ \ \ ( COMMAS ARE NOT STORED )
- \ \ \__ "09" = 9 BYTES REQUIRED TO STORE
- \ \ DATA FOR FIELD 9.
- \ \__ "20" = 20 BYTES REQUIRED TO STORE DATA FOR FIELD 1.
- \__ "20" = 20 BYTES REQUIRED TO STORE DATA FOR FIELD 2.
-
-
- DATA TYPE (ASCII OR NUMERIC & NUMBER OF DIGITS AFTER DECIMAL POINT :
- 01E0 3F 3F 3F 3F 3F 3F 3F 3F-32 32 30 30 30 30 30 30 ????????22000000
- == == == == == == == == == ==
- \ \__ "32" = NUMERIC VALUE WITH TWO
- <== "3F" IS ALPHA ==> \ DIGITS AFTER THE DECIMAL
- \ POINT.
- \__ "3F" = ALPHA DATA.
- VALUES OF "30" TO "3E" ARE NUMERIC VALUES WITH THE HEX VALUE OF THE SECOND
- DIGIT DETERMINING THE NUMBER OF DECIMAL DIGITS AFTER THE DECIMAL POINT.
-
-
- 32
-
-
-
-
-
-
-
-
- THE NEXT 384 BYTES ARE USED TO STORE THE LABELS FOR THE FIELDS IN
- THE RECORD :
-
- 0200 4E 41 4D 45 20 20 41 44-44 52 31 20 41 44 44 52 NAME ADDR1 ADDR
- 0210 32 20 43 49 54 59 20 20-53 54 41 54 45 20 5A 49 2 CITY STATE ZI
- 0220 50 43 4F 44 45 20 41 52-45 41 20 43 4F 44 45 20 PCODE AREA CODE
- 0230 50 48 4F 4E 45 20 4E 42-52 20 41 43 43 4F 55 4E PHONE NBR ACCOUN
- 0240 54 20 52 45 43 20 41 4D-54 20 50 41 53 54 20 44 T REC AMT PAST D
- 0250 55 45 20 00 00 00 00 00-00 00 00 00 00 00 00 00 UE .............
- 0260 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0270 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0280 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0290 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 02F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
- 0300 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0310 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0320 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0330 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0340 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0350 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0360 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 0370 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
-
- 0200 4E 41 4D 45 20 20 41 44-44 52 31 20 41 44 44 52 NAME ADDR1 ADDR
- ================= ================= ===========
- | | |
- NAME ADDR1 ADDR
-
- 0210 32 20 43 49 54 59 20 20-53 54 41 54 45 20 5A 49 2 CITY STATE ZI
- ===== ================= ================= =====
- | | | |
- 2 CITY STATE ZI
-
- 0220 50 43 4F 44 45 20 41 52-45 41 20 43 4F 44 45 20 PCODE AREA CODE
- ================= ============== ==============
- | | |
- PCODE AREA CODE
-
-
-
-
-
-
-
-
-
-
-
-
-
- 33
-
-
-
-
-
-
-
-
- THE NEXT 128 BYTES ARE USED TO STORE SCREEN FORMAT INFORMATION
- FOR EACH FIELD. DATA FOR EACH FIELD'S ROW AND COLUMN LOCATION IS
- HELD IN A 4 BYTE GROUP.
-
- 0380 56 32 2E 30 01 00 10 FF-02 00 10 FF 03 00 10 FF V2.0............
- 0390 04 00 10 FF 05 00 10 FF-05 01 40 FF 04 03 60 FF ..........@...`.
- 03A0 05 03 60 FF 01 03 60 FF-02 03 60 FF 00 00 00 00 ..`...`...`.....
- 03B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
- 03F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
-
-
- SCREEN INFORMATION :
- 0380 56 32 2E 30 01 00 10 FF-02 00 10 FF 03 00 10 FF V2.0............
- =========== =========== =========== ===========
- |
- |
- RR CC C FF
- == == == ==
- \ \ \ \__ FIELD NUMBER ( NOT USED )
- \ \ \
- \ \__\___ COLUMN NUMBER
- \
- \_______ ROW NUMBER
-
-
- 0380 56 32 2E 30 01 00 10 FF-02 00 10 FF 03 00 10 FF V2.0............
- == ==== ==
- \ \ \__ "FF" = FIELD NUMBER (NOT USED)
- \ \
- \ \__ "001" = COLUMN NBR 1
- \
- \____ "01" = ROW NBR 1
-
-
- 0390 04 00 10 FF 05 00 10 FF-05 01 40 FF 04 03 60 FF ..........@...`.
- == ==== ==
- \ \ \__ "FF" = FIELD NUMBER (NOT USED)
- \ \
- \ \__ "001" = COLUMN NBR 1
- \
- \____ "05" = ROW NBR 5
-
-
- 03A0 05 03 60 FF 01 03 60 FF-02 03 60 FF 00 00 00 00 ..`...`...`.....
- == ==== ==
- \ \ \__ "FF" = FIELD NUMBER (NOT USED)
- \ \
- \ \__ "036" = COLUMN NBR 36
- \
- \____ "01" = ROW NBR 1
-
-
-
-
- 34
-
-
-
-
-
-
-
-
- DATA STORED BY THE FILER PROGRAM IN ACCTREC.DAT FOLLOWS THE
- FIRST 896 BYTES SHOWN ABOVE. ACTUAL DATA STORED IN THE FILES IS
- SHOWN BELOW :
-
- 0480 52 4F 42 45 52 54 20 42-4C 41 4B 45 20 20 20 20 ROBERT BLAKE
- 0490 20 20 20 20 4D 49 4C 4C-20 57 41 4C 4C 20 43 4F MILL WALL CO
- 04A0 56 45 52 49 4E 47 53 20-31 30 32 32 32 20 45 20 VERINGS 10222 E
- 04B0 54 45 4E 20 4D 49 4C 45-20 52 44 2E 54 52 4F 59 TEN MILE RD.TROY
- 04C0 20 20 20 20 20 20 20 20-20 20 20 20 20 4E 54 31 NT1
- 04D0 32 33 34 35 32 31 32 31-32 33 34 35 36 37 20 20 23452121234567
- 04E0 20 31 30 31 2E 31 32 20-20 20 20 20 30 2E 30 30 101.12 0.00
- 04F0 54 48 4F 4D 41 53 20 46-2E 20 53 4D 49 54 48 20 THOMAS F. SMITH
-
- 0500 20 20 20 20 54 52 49 4E-49 54 59 20 43 4F 52 50 TRINITY CORP
- 0510 4F 52 41 54 49 4F 4E 20-33 30 38 30 30 20 45 41 ORATION 30800 EA
- 0520 53 54 20 53 49 44 45 20-44 52 2E 20 53 55 4E 20 ST SIDE DR. SUN
- 0530 43 49 54 59 20 20 20 20-20 20 20 20 20 41 52 38 CITY AR8
- 0540 33 38 33 32 37 32 38 31-32 33 34 34 35 35 20 20 38327281234455
- 0550 20 32 31 30 2E 30 30 20-20 20 20 31 35 2E 30 30 210.00 15.00
- 0560 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
- 0570 20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
-
-
-
- BREAKDOWN OF FIELDS IN FIRST RECORD :
-
- 0480 52 4F 42 45 52 54 20 42-4C 41 4B 45 20 20 20 20 ROBERT BLAKE
- 0490 20 20 20 20
-
- 0490 4D 49 4C 4C-20 57 41 4C 4C 20 43 4F MILL WALL CO
- 04A0 56 45 52 49 4E 47 53 20- VERINGS
-
- 04A0 -31 30 32 32 32 20 45 20 VERINGS 10222 E
- 04B0 54 45 4E 20 4D 49 4C 45-20 52 44 2E TEN MILE RD.
-
- 04B0 54 52 4F 59 TROY
- 04C0 20 20 20 20 20 20 20 20-20 20 20 20 20
-
- 04C0 4E 54 NT
-
- 04C0 31 1
- 04D0 32 33 34 35 2345
-
- 04D0 32 31 32 212
-
- 04D0 31-32 33 34 35 36 37 1234567
-
- 04D0 20 20
- 04E0 20 31 30 31 2E 31 32 101.12
-
- 04E0 20-20 20 20 20 30 2E 30 30 0.00
-
-
-
-
-
-
- 35
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (***************************************************************)
- (* *)
- (* FILER A LA PASCAL DATA BASE SOURCE CODE FILE *)
- (* *)
- (* (C) 1985 by John M. Harlan *)
- (* 24000 Telegraph *)
- (* Southfield, MI. 48034 *)
- (* *)
- (* The FILER GROUP of programs is released on a "FREE *)
- (* SOFTWARE" basis. The recipient is free to examine *)
- (* and use the software with the understanding that if *)
- (* the FILER GROUP of programs prove to be of use and *)
- (* value, a contribution to the author is encouraged. *)
- (* *)
- (* While reasonable effort has been made to ensure the *)
- (* reliability of the FILER GROUP of programs, no war- *)
- (* ranty is given. The recipient uses the programs at *)
- (* his own risk and in no event shall the author be *)
- (* liable for damages arising from their use. *)
- (* *)
- (* *)
- (***************************************************************)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 36