home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Egull PC COBOL Advanced Function Library
-
- Version 3.0
-
- File Definition Facility
-
-
- Copyright (C) Scott Richard McLeod 1989, 1990
- All Rights Reserved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $50 Shareware Contribution Requested
-
-
-
-
-
- Egull PC-COBOL Advanced Function Library
- File Definition Facility
-
-
- File Definition
- ═══════════════
- The File Definition Facility is a simple, yet important utility
- in the Egull COBOL Toolset. This utility allows you to define a
- COBOL file, in a manner that the Egull Report Painter can use to
- generate a COBOL program. When you first create a report with
- the Egull Report Painter, it will prompt you for the file of a
- File Definition File. It is the output of this utility that you
- will supply to that screen.
-
- You start the system by typing "FILEDEF" at the DOS prompt.
-
- The first screen you will see is a request for a file name.
- This name has several purposes. The COBOL file name will assume
- the name of the File Definition File. For example, say that you
- enter a name of "EMPLOYEE". When used in a COBOL program, the
- file named assigned in a COBOL FD would be demonstrated below:
-
- FD EMPLOYEE-FILE.
- 01 EMPLOYEE-RECORD PICTURE X(??).
-
- The name that you assign to the file will also be the name used
- to save you file definition. The file extension will be ".FD".
- In the case of our EMPLOYEE file, the file definition will be
- saved in a file called "EMPLOYEE.FD".
-
- Once you enter a file name you will be presented with the main
- definition screen. This screen contains a "More" indicator in
- the upper right corner of the screen. When additional data is
- present on the screen below the current screen, a down arrow
- will follow the indicator. When additional data is present
- above the current screen, an up arrow will appear after the
- indicator. If data is present both above and below the current
- screen both an up and down arrow will be present. You can use
- the F7 and F8 keys to scroll your list a page up and a page down
- respectively.
-
- The end of your list of data is marked by the word "***END***".
- You can scroll through your list on the screen using the up and
- down arrow keys.
-
- You insert a new data element in the list with the F2 key. The
- new element will be inserted before the current highlighted
- item. When inserting new data, you will be requested for
- several pieces of information. When you enter data incorrectly,
- a "thud" sound will be made and the cursor will move to the
- field in error. The data you enter is defined below:
-
- Element Name : This is the COBOL name of the data element.
- This name may be up to 30 characters long but you should try
- to limit the length. In the Report Painter, when a field is
- used in several different ways, such as column totaling, the
- element name may have a prefix attached to it to create a new
- data element for totaling.
-
-
-
- 1.
-
-
-
-
- Egull PC-COBOL Advanced Function Library
- File Definition Facility
-
-
- Level Number : This is the actual COBOL level number to
- assign to this element in the file. Under the current system
- design, a level number must be a 5, 10, 15, or 20. Level
- number 01 is reserved for the high level record of the file
- that will be assign by the Report Painter so you may not use
- that.
-
- Usage : This field allows you to attach a COBOL usage to a
- data element when it is required to define its storage
- method. The values for this field and their meaning are:
-
- 0 = COMP
- 1 = COMP-1
- 3 = COMP-3
- 5 = COMP-5
- X = COMP-X
-
- Picture : This is the COBOL data picture for this field to
- define its storage.
-
- Report Picture : This is the COBOL data picture for this
- field to define its picture in a report line.
-
- Report Length : This is the number of character positions the
- field will require, give the picture above, in a report data
- line.
-
- Total : This field is only used on numeric data elements. It
- is used to indicate if the numeric field should be included
- in column totals, when requested on a report. For example,
- in our employee file, say we have a four digit numeric field
- called employee department number. It would make very little
- sense to total this field on a report. Now say you have a
- field called employee salary. This is in fact a field that
- you would want to total in summary reports. A value of "Y"
- in this field says the data element should be included in
- totals when requested in a report.
-
-
- You can delete a data element in the list with the F3 key. The
- data element that is currently highlighted will be removed from
- the list.
-
- You modify the currently highlighted data element by pressing
- the F4 key. You will be presented with the same screen that you
- used to enter your data element with the existing data already
- loaded.
-
- When all your changes are done, you press the ESC key. If you
- have any data elements in your list, you will be presented with
- the save file screen.
-
-
-
-
-
-
- 2.
-
-
-
-
- Egull PC-COBOL Advanced Function Library
- File Definition Facility
-
-
- The save file screen allows you to define a files
- characteristics. Pressing F3 from this screen will commit your
- changes to the file and exit. Pressing ESC again will cancel
- all changes you made and return you to the DOS prompt. The data
- that you enter for a file is defined below:
-
- File Name : This is the name of the file that you entered
- when you started the software. By changing the name here you
- can effect save your changes to a new file and keep the old
- file in tact.
-
- Assign : This is the value that will follow the ASSIGN clause
- of the COBOL SELECT statement. Under normal conditions, you
- should enter your file name (In quotations). It is possible
- to use the DYNAMIC and EXTERNAL options on your file ASSIGN
- but all spaces between words must be replaced with a "^"
- (Shift-6) character. This will allow the Code generator
- STRING statement to work properly since they are delimited by
- spaces.
-
- Organization : This is the actual file organization of your
- file. Values here are any valid COBOL organization like
- INDEXED, SEQUENTIAL. Like the ASSIGN statement, spaces
- between words, like LINE SEQUENTIAL must be replaced with
- Shift-6 (^) characters like LINE^SEQUENTIAL.
-
- Key : If your file organization is indexed, you must supply a
- key data element here. An edit will be performed to
- determine if the element even exits in you data list.
-
- Alternate Key : This field is optional. If your file is
- indexed and you need an alternate key, you can define that
- key here. This filed, if not spaces, will be verified
- against the data list to see that the element actually exits.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3.