home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / GE / GE003C.ZIP / SECTION6.DOC < prev    next >
Text File  |  1990-07-08  |  19KB  |  367 lines

  1.  
  2.  
  3.  
  4.       VI. Validating System Maintained "Pointer" Information (F3-E)
  5.  
  6.       In order to permit you to place variable amounts of "miscellaneous" 
  7.       information and comments about an individual in your family files 
  8.       without requiring excessive amounts of space on your diskette or hard 
  9.       disk, an individual's information is stored in many "records" distri-
  10.       buted among 3 datasets (name, address and miscellaneous information).  
  11.       All of these records are "drawn together" by a collection of system 
  12.       maintained pointer fields.  You are no doubt familiar with some of 
  13.       these fields: the mother and father ID numbers in the name record are 
  14.       two, and the spouse ID in a marriage record is another.  There are 
  15.       many others that you are not (and need not be) aware of.  In addition, 
  16.       each record in the family file datasets has an identifier as to the 
  17.       type of information stored in the record and the "source" of the 
  18.       information (whether an address record is an individual or family 
  19.       residence, for example).  It is important that the complete set of 
  20.       "pointers" and record identifiers for those records relating to an 
  21.       individual be valid and consistent.
  22.  
  23.       The first record of each family file dataset also has information that 
  24.       helps the programs determine whether the datasets that you are using 
  25.       "belong together".  This is to protect you from inadvertantly 
  26.       attempting to enter information into, or produce reports using 
  27.       datasets that are from two or more family files that you may be 
  28.       working with at different times.  In the ".ADR" and ".OTH" datasets, 
  29.       these "header records" also have some additional "hidden pointers" 
  30.       that help the file update program keep track of deleted records. 
  31.  
  32.       There are several ways in which inconsistencies may be introduced into 
  33.       this "hidden" collection of information.  Because updated file records 
  34.       may remain in memory and not be written to disk until the files are 
  35.       closed (or until you return to the Main Menu program from the file 
  36.       update program) any interruption of an update session by prematurely 
  37.       turning off your coumputer or by a power failure may result in 
  38.       incomplete updates to the system information.  Errors in some versions 
  39.       of the file update program are another (unfortunate) source of 
  40.       inconsistencies in system pointers (for instance, at one time you 
  41.       could enter the same ID number for mother and father, which would 
  42.       introduce errors in the files).  
  43.  
  44.       The purpose of the program invoked by Main Menu option "F3-E" is to 
  45.       detect and correct any errors in the system maintained "hidden" 
  46.       information.  Upon entry to the program you will see that all three 
  47.       datasets that make up your family file are used by the program.  You 
  48.       also will see displayed some information about these datasets that is 
  49.       not shown by other programs in the system; this includes the "date of 
  50.       (most recent) update" for each dataset, the number of records in each 
  51.       dataset, and the number of "free" records in the address and 
  52.       Miscellaneous info datasets. ("Free" records are ones which have been 
  53.       deleted by you using the file update program, thus permitting them to 
  54.       be re-used the next time information is added to the dataset.)  These 
  55.       dates and record counts are stored in the "header records" of each 
  56.       dataset and are maintained by the file update program when you enter 
  57.       or change information in the files.  As usual, program option "F1" of 
  58.       the validation program may be used to respecify the names of datasets 
  59.  
  60.  
  61.                                      51
  62.  
  63.  
  64.  
  65.       to be "validated".
  66.  
  67.       (NOTE: if a family file has been corrupted as a result of an 
  68.       interrupted update session and a recent backup is available, it is 
  69.       always preferrable to restore the file from the backup, since 
  70.       correction using the validation program may result in some loss of 
  71.       information.  If there have been many updates to the file since the 
  72.       last backup or the file errors are also in the backup copy, then the 
  73.       validation program can provide a "clean" file for you to continue your 
  74.       work with minimal loss of data.)
  75.  
  76.       Option "F2" of the validation program is the one that does all the 
  77.       work.  When you select it you will be asked whether error messages 
  78.       should be sent to the screen or printer, whether you want the program 
  79.       to make corrections to the files, and which name record ID number to 
  80.       begin with.  
  81.  
  82.       If you get the message:  
  83.                    "Unmatched Files...Do you want to Continue?"
  84.       when you select the F2 option then the program has determined that the 
  85.       "header record" of the ".ADR" or the ".OTH" dataset does not have the 
  86.       same date or time of creation as the ".NAM" dataset does.  This may 
  87.       happen as the result of a problem with previous versions of the file 
  88.       update program in which the "date time stamps" in the header records 
  89.       were not "synchronised" when the files were first CREATEd.  In very 
  90.       early FHS versions, the programs didn't make use of these date and 
  91.       time fields for determining whether files went together, so you may 
  92.       not have had any problem until you updated your version of the 
  93.       programs to one that DID check these values....If you are absolutely 
  94.       certain that the files you are using DO belong together, you may reply 
  95.       "Y" and the header records will be "synchronized" during the 
  96.       validation procedure.
  97.  
  98.       Actually this validation procedure is divided into several phases.
  99.       More will be said about what is done in each phase later but they may 
  100.       be described briefly as follows:
  101.          I. Validate information in Name records (this is by far the most 
  102.             time consuming of the phases, taking perhaps 90% of the total 
  103.             execution time); this is the only phase of checking performed if 
  104.             you request to begin with an ID# other than 1;
  105.         II. Check for broken "sibling" chains (determine children who are 
  106.             not "listed" as a child of a recorded parent);
  107.        III. Check Address dataset free record chain;
  108.             Check for isolated or unreferenced address records;
  109.         IV. Check Miscellaneous dataset free record chain;
  110.             Check for isolated or unreferenced miscellaneous records;
  111.             Check for "partially referenced" marriage records; 
  112.          V. Synchronise date time stamps in "header" records if files are 
  113.             "unmatched" and updates are being performed.
  114.  
  115.       The suggested procedure for using this program is:
  116.          1. Backup your family file datasets.  If none of the datasets 
  117.             exceed the capacity of the diskettes you use, the DOS COPY 
  118.             command can be used to back them up, otherwise you will have to 
  119.             use the DOS BACKUP command (or some equivalent utility) to back 
  120.  
  121.  
  122.                                      52
  123.  
  124.  
  125.  
  126.             them up;
  127.          2. Run option "F2" of this program with output going to the printer 
  128.             and allowing the program to make file changes;
  129.          3. Run option "F2" again with output going to the printer...all 
  130.             program correctible errors should now be gone.
  131.          4. Using the file update program (Main Menu option F1), review 
  132.             information for individuals whose ID# appeared in any of the 
  133.             error messages.  
  134.  
  135.       Some suggestions and comments concerning the use of this program:
  136.  
  137.          if possible, run this program with your family files located on a 
  138.          RAM disk.  It will greatly reduce the time required for the run; 
  139.          (incidentally, running the validation program against my files, 
  140.          which contain information on about 1500 individuals, required about 
  141.          55 minutes using a standard IBM-PC with all datasets on a single 
  142.          floppy diskette using the interpreted version of the program; it 
  143.          takes about 55 seconds running the compiled version off the hard 
  144.          disk of an AT);
  145.  
  146.          a "progress report" is given when you tap the space bar while the 
  147.          program is processing the name record file (phase "I" above); the 
  148.          validation procedure can also be interrupted if you press the 
  149.          ESCape key during this phase of operation.
  150.  
  151.       The remainder of this section gives more detailed descriptions of the 
  152.       various phases of the validation process.  This information is 
  153.       primarily for my own documentation so don't feel that you have to 
  154.       understand it to make use of the program.
  155.  
  156.  
  157.       Before discussing the phases in detail, let's first look at the type 
  158.       of "identity" information stored in the "prefix" of each address and 
  159.       misc info record.  Each record begins with a 1 character record type 
  160.       as shown in the "RTYPE" table which follows.  (The record types were 
  161.       changed in the December 1985 update of the system.  This program 
  162.       recognises both the old and new record types, but changes all old 
  163.       record types to the new type when updating the datasets.)  In 
  164.       addition, the "header" record of each family file dataset has a 
  165.       leading 1 character file type which is used to check that a dataset 
  166.       used in one of the report programs has been properly initialized.  
  167.       This "file type" is also shown in the following table.
  168.  
  169.        TYPE Table:           Old RTYPE            New RTYPE
  170.                           CHAR      ASCII           ASCII
  171.         Name record         1        049             001
  172.         Address record      2        050             002
  173.         Spouse Record       3        051             003
  174.         Place Record        4        052             004
  175.         Comments            F        070             005
  176.         Education record    7        055             007
  177.         Work record         8        056             008
  178.         Military record     9        057             009
  179.         Medical record      A        065             010
  180.        
  181.  
  182.  
  183.                                      53
  184.  
  185.  
  186.  
  187.         NAME dataset        N        078             078 (unchanged)
  188.         ADDRESS dataset     A        065             065 (unchanged)
  189.         MISC dataset        M        077             077 (unchanged)
  190.  
  191.       In addition, each address and misc info record contains the record 
  192.       type and record number of the "source" record to which it is appended.  
  193.       In the error messages produced by this program, the "source record 
  194.       type" is labeled "SRTYPE" and the "source record number" is labeled 
  195.       "SRNO".  (For example a "family" residence will have SRTYPE=3, the 
  196.       record type of a spouse record.  A comment record attached to an 
  197.       Education record will have SRTYPE=7.)  
  198.  
  199.       I. During "Phase I" of the validation process, each name record is 
  200.          read successively  (beginning with the ID# specified by you at the 
  201.          beginning) and the following checks are performed:
  202.  
  203.          1. Mother and Father ID
  204.             a. must be between 0 and the highest ID# on record (invalid 
  205.                parent ID's are set = 0); 
  206.             b. if parent ID>0, sex of parent is checked and discrepancies 
  207.                reported (father's sex should be "M", mother's sex should be 
  208.                "F"); no corrections are made since the program cannot 
  209.                determine whether the sex or the parent ID is in error;
  210.  
  211.          2. Sibling chain
  212.             a. the name record for the oldest child is retrieved and parent 
  213.                ID's checked to make sure that ID# of name record being 
  214.                validated is either the father ID (FID) or mother ID (MID);
  215.             b. younger children's records are retrieved and parent ID's are 
  216.                similarly verified; (if the ID# of the name record being 
  217.                validated is not found as a parent in a child's record, the 
  218.                sibling chain is terminated);
  219.             c. if a child's ID is encountered a second time while following 
  220.                the sibling chain, the "loop" is noted and the sibling chain 
  221.                is terminated;
  222.             d. a note is made of each child correctly located on sibling 
  223.                chain; this information will be used later for identifying 
  224.                "broken" sibling chains;
  225.  
  226.          3. Birth/Death Place Record
  227.             a. record number must be between 0 and max Misc Rec #;
  228.             b. if record number>0 then record is retrieved and record type 
  229.                and source record information is checked (see previous table 
  230.                of record types and discussion of source record information);
  231.  
  232.          4. Comment Records for individual
  233.             a. first comment record ID must be between 0 and max Misc rec#;
  234.             b. if comment records are present, first comment record is 
  235.                retrieved and record type and source record information 
  236.                checked; total comment record count from first record is 
  237.                saved; backward pointer should be 0;
  238.             c. successive comment records are retrieved and record prefix 
  239.                verified as for first record; backward pointer should point 
  240.                to previous record;
  241.             d. after last comment record is retrieved, total record count is 
  242.  
  243.  
  244.                                      54
  245.  
  246.  
  247.  
  248.                compared to what had been stored in first comment record;
  249.                (if record type or source record information is incorrect, 
  250.                the comment chain is terminated; all other discrepancies are 
  251.                corrected by the program);
  252.  
  253.          5. Address Records for individual
  254.             a. first address record # must be between 0 and max addrs rec#;
  255.             b. if address records are present, first address record is 
  256.                retrieved and record type and source record information 
  257.                checked; 
  258.             c. successive address records are retrieved and record prefix 
  259.                verified as for first record;
  260.                (if record type is incorrect it is corrected; if source 
  261.                record information is incorrect, the address chain is 
  262.                terminated);
  263.             d. address comment records are checked (as in 3.)
  264.  
  265.          6. Spouse information
  266.             a. first spouse record # must be between 0 and max misc rec#;
  267.             b. if spouse records are present; each spouse record is 
  268.                retrieved and checked for valid record type and source record 
  269.                information; 
  270.             c. spouse ID's in the record are checked to see if one 
  271.                corresponds to the name record being validated;
  272.                (if record type or source record information is incorrect, or 
  273.                ID# is not in spouse record, the spouse record chain is 
  274.                terminated);
  275.             d. if marriage place record is present for any of them, that 
  276.                record is retrieved and record type and source record 
  277.                information is checked;
  278.             e. spouse comment records are checked (as in 3.)     
  279.             f. spouse residence records are checked (as in 4.)
  280.  
  281.          7. Miscellaneous information
  282.             a. first misc record # of each type must be between 0 and max 
  283.                misc rec#;
  284.             b. if misc information is present, first record is retrieved and 
  285.                record type and source record information is checked;
  286.                (if record type or source record information is incorrect the 
  287.                chain is terminated for that type of misc info);
  288.             c. misc info comment records are validated (as in 3.)
  289.             d. misc info address information is validated (as in 4.)
  290.  
  291.       II. After all name records have been individually checked, the record 
  292.          of all validated parent pointers is checked to see if any name 
  293.          record was not located on a parent-child chain.  (Unverified parent 
  294.          ID's are set =0 in the name record.)
  295.  
  296.       III. Records on free chain of Address dataset are checked to see if 
  297.          they have been referenced during Phase "I".  Address records which 
  298.          were unreferenced in Phase "I" and not on FREE record chain are 
  299.          noted and added to FREE record chain.  Count of FREE records in the 
  300.          address dataset header record is compared to the number of records 
  301.          on the FREE chain.  A discrepancy is noted and corrected.
  302.  
  303.  
  304.  
  305.                                      55
  306.  
  307.  
  308.  
  309.       IV. Records on free chain of Miscellaneous Info dataset are checked to 
  310.          see if they have been referenced during Phase "I".  Records in Misc 
  311.          Info dataset which were unreferenced in Phase "I" and not on FREE 
  312.          record chain are noted and added to FREE record chain.  Count of 
  313.          FREE records in the misc info dataset header record is compared to 
  314.          the number of records on the FREE chain.  A discrepancy is noted 
  315.          and corrected.  
  316.  
  317.          While checking for unreferenced misc records, the number of 
  318.          references (during Phase "I") to each spouse record is checked.  A 
  319.          message is displayed if a spouse record was not referenced exactly 
  320.          2 times.  This situation may be correct in the case that a marriage 
  321.          record was created with a spouse ID=0.  This is permitted by the 
  322.          system to allow for the (unlikely) case that a marriage date is 
  323.          known but insufficient information about the spouse exists to 
  324.          justify creating a name record (the spouse name is given as 
  325.          "(Unknown)" in descendant and family group reports).  If both 
  326.          spouse ID's are shown to be non-zero in the error line produced by 
  327.          the program, then an incorrect situation does exist.  You must then 
  328.          use the file update program (main menu option F1) to retrieve the 
  329.          marriage record from the spouse ID that it is accessible from, 
  330.          delete the marriage record, and then readd it.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.                                      56
  367.