home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug027.arc / MAIN.INC < prev    next >
Text File  |  1979-12-31  |  2KB  |  59 lines

  1.  
  2. (*  Main program *)
  3. BEGIN
  4.   start(Date_Today);
  5.   IF ch <> 'N'
  6.     THEN BEGIN
  7.            REPEAT
  8.              ClrScr;
  9.              Line(1);
  10.              dis(1,2,'           Database.        M A I N         M E N U           ');
  11.              dis(1,2,infilename);
  12.              Display_Recs_Used;
  13.              GotoXY(1,4);
  14.              Writeln('U   Update.    Add new Animal data. ');
  15.              Writeln('               Edit previous entered data.');
  16.              Writeln('               Find an Animal by Ear  No. or Name.');
  17.              Writeln;
  18.              Writeln('L   List.      Lists all the Animal to screen or printer.');
  19.              Writeln;
  20.              Writeln('F   Family.    Lists all the off spring of either a sire or dam.');
  21.              Writeln;
  22.              Writeln('P   Pedigree.  Displays a pedigree of the Animal for 4 generations.');
  23.              Writeln;
  24.              Writeln('S   Sort.      Sorts the file by Ear No. and cleans out deleted Animals.');
  25.              Writeln;
  26.              Writeln('The search routine used for ALL routines except LIST require the file to be');
  27.              Writeln('in the correct sorted order.  If you feel some of the Ear Numbers are out of');
  28.              Writeln('order SORT the file.  Animals that are DELETED have their Ear Number changed');
  29.              Writeln('to "CLEAN".  They are not written to a sorted file.');
  30.              line(21);
  31.              GotoXY(1,22);
  32.              Write(' F = Family | S = Sort | L = List | U = Update | P = Pedigree | <ESC> =');
  33.              select(73,22,'QUIT', ['F','P','S','U','L',#27], Ch);
  34.              ClrScr;
  35.              line(1);
  36.              IF ch <> #27 THEN line(16);
  37.              CASE Ch OF
  38.                'U' : Update(Date_Today);
  39.                'S' : Sort_File;
  40.                'F' : Family_Display(Date_Today);
  41.                'L' : List(Date_Today);
  42.                'P' : Pedigree(Date_Today);
  43.              END;
  44.              IF Ch <> #27 THEN
  45.                  BEGIN
  46.                    ClearFrame;
  47.                  END
  48.                ELSE
  49.                  BEGIN
  50.                    dis(1,22,' ');
  51.                    select(1,22,' Are you sure? | Y | N | ',['Y','N'],ch);
  52.                    IF ch = 'Y' THEN ch := #27;
  53.                  END;
  54.            UNTIL Ch = #27;
  55.            close(infile);
  56.       END;
  57.     ClrScr;
  58. END.
  59.