home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / cobol / library / egull / filedef.doc < prev    next >
Encoding:
Text File  |  1990-11-18  |  7.8 KB  |  264 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                     Egull PC COBOL Advanced Function Library
  28.  
  29.                                   Version 3.0
  30.  
  31.                              File Definition Facility
  32.  
  33.  
  34.                  Copyright (C) Scott Richard McLeod 1989, 1990
  35.                               All Rights Reserved
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                     $50 Shareware Contribution Requested
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                   Egull PC-COBOL Advanced Function Library
  71.                           File Definition Facility
  72.  
  73.  
  74.     File Definition
  75.     ═══════════════
  76.     The File Definition Facility is a simple, yet important utility
  77.     in the Egull COBOL Toolset.  This utility allows you to define a
  78.     COBOL file, in a manner that the Egull Report Painter can use to
  79.     generate a COBOL program.  When you first create a report with
  80.     the Egull Report Painter, it will prompt you for the file of a
  81.     File Definition File.  It is the output of this utility that you
  82.     will supply to that screen.
  83.  
  84.     You start the system by typing "FILEDEF" at the DOS prompt.
  85.  
  86.     The first screen you will see is a request for a file name.
  87.     This name has several purposes.  The COBOL file name will assume
  88.     the name of the File Definition File.  For example, say that you
  89.     enter a name of "EMPLOYEE".  When used in a COBOL program, the
  90.     file named assigned in a COBOL FD would be demonstrated below:
  91.  
  92.                FD  EMPLOYEE-FILE.
  93.                01  EMPLOYEE-RECORD           PICTURE X(??).
  94.  
  95.     The name that you assign to the file will also be the name used
  96.     to save you file definition.  The file extension will be ".FD".
  97.     In the case of our EMPLOYEE file, the file definition will be
  98.     saved in a file called "EMPLOYEE.FD".
  99.  
  100.     Once you enter a file name you will be presented with the main
  101.     definition screen.  This screen contains a "More" indicator in
  102.     the upper right corner of the screen.  When additional data is
  103.     present on the screen below the current screen, a down arrow
  104.     will follow the indicator.  When additional data is present
  105.     above the current screen, an up arrow will appear after the
  106.     indicator.  If data is present both above and below the current
  107.     screen both an up and down arrow will be present.  You can use
  108.     the F7 and F8 keys to scroll your list a page up and a page down
  109.     respectively.
  110.  
  111.     The end of your list of data is marked by the word "***END***".
  112.     You can scroll through your list on the screen using the up and
  113.     down arrow keys.
  114.  
  115.     You insert a new data element in the list with the F2 key.  The
  116.     new element will be inserted before the current highlighted
  117.     item.  When inserting new data, you will be requested for
  118.     several pieces of information.  When you enter data incorrectly,
  119.     a "thud" sound will be made and the cursor will move to the
  120.     field in error.  The data you enter is defined below:
  121.  
  122.        Element Name : This is the COBOL name of the data element.
  123.        This name may be up to 30 characters long but you should try
  124.        to limit the length.  In the Report Painter, when a field is
  125.        used in several different ways, such as column totaling, the
  126.        element name may have a prefix attached to it to create a new
  127.        data element for totaling.
  128.  
  129.  
  130.  
  131.                                      1.
  132.  
  133.  
  134.  
  135.  
  136.                   Egull PC-COBOL Advanced Function Library
  137.                           File Definition Facility
  138.  
  139.  
  140.        Level Number : This is the actual COBOL level number to
  141.        assign to this element in the file.  Under the current system
  142.        design, a level number must be a 5, 10, 15, or 20.  Level
  143.        number 01 is reserved for the high level record of the file
  144.        that will be assign by the Report Painter so you may not use
  145.        that.
  146.  
  147.        Usage : This field allows you to attach a COBOL usage to a
  148.        data element when it is required to define its storage
  149.        method.  The values for this field and their meaning are:
  150.  
  151.                             0 = COMP
  152.                             1 = COMP-1
  153.                             3 = COMP-3
  154.                             5 = COMP-5
  155.                             X = COMP-X
  156.  
  157.        Picture : This is the COBOL data picture for this field to
  158.        define its storage.
  159.  
  160.        Report Picture : This is the COBOL data picture for this
  161.        field to define its picture in a report line.
  162.  
  163.        Report Length : This is the number of character positions the
  164.        field will require, give the picture above, in a report data
  165.        line.
  166.  
  167.        Total : This field is only used on numeric data elements.  It
  168.        is used to indicate if the numeric field should be included
  169.        in column totals, when requested on a report.  For example,
  170.        in our employee file, say we have a four digit numeric field
  171.        called employee department number.  It would make very little
  172.        sense to total this field on a report.  Now say you have a
  173.        field called employee salary.  This is in fact a field that
  174.        you would want to total in summary reports.  A value of "Y"
  175.        in this field says the data element should be included in
  176.        totals when requested in a report.
  177.  
  178.  
  179.     You can delete a data element in the list with the F3 key.  The
  180.     data element that is currently highlighted will be removed from
  181.     the list.
  182.  
  183.     You modify the currently highlighted data element by pressing
  184.     the F4 key.  You will be presented with the same screen that you
  185.     used to enter your data element with the existing data already
  186.     loaded.
  187.  
  188.     When all your changes are done, you press the ESC key.  If you
  189.     have any data elements in your list, you will be presented with
  190.     the save file screen.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.                                      2.
  198.  
  199.  
  200.  
  201.  
  202.                   Egull PC-COBOL Advanced Function Library
  203.                           File Definition Facility
  204.  
  205.  
  206.     The save file screen allows you to define a files
  207.     characteristics.  Pressing F3 from this screen will commit your
  208.     changes to the file and exit.  Pressing ESC again will cancel
  209.     all changes you made and return you to the DOS prompt.  The data
  210.     that you enter for a file is defined below:
  211.  
  212.        File Name : This is the name of the file that you entered
  213.        when you started the software.  By changing the name here you
  214.        can effect save your changes to a new file and keep the old
  215.        file in tact.
  216.  
  217.        Assign : This is the value that will follow the ASSIGN clause
  218.        of the COBOL SELECT statement.  Under normal conditions, you
  219.        should enter your file name (In quotations).  It is possible
  220.        to use the DYNAMIC and EXTERNAL options on your file ASSIGN
  221.        but all spaces between words must be replaced with a "^"
  222.        (Shift-6) character.  This will allow the Code generator
  223.        STRING statement to work properly since they are delimited by
  224.        spaces.
  225.  
  226.        Organization : This is the actual file organization of your
  227.        file.  Values here are any valid COBOL organization like
  228.        INDEXED, SEQUENTIAL.  Like the ASSIGN statement, spaces
  229.        between words, like LINE SEQUENTIAL must be replaced with
  230.        Shift-6 (^) characters like LINE^SEQUENTIAL.
  231.  
  232.        Key : If your file organization is indexed, you must supply a
  233.        key data element here.  An edit will be performed to
  234.        determine if the element even exits in you data list.
  235.  
  236.        Alternate Key : This field is optional.  If your file is
  237.        indexed and you need an alternate key, you can define that
  238.        key here.  This filed, if not spaces, will be verified
  239.        against the data list to see that the element actually exits.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.                                      3.
  264.