My God!!

I've NEVER written a matching records program from scratch until today 
just to test one for Griz.

But I wrote one, built the files with sql, entered data and it compiled 
correctly on the first try and got exactly the expected results.

Program:

     FGRIZ1     IP   E           K DISK    RENAME(GRIZ1:GRIZ1R)
     FGRIZ2     IS   E           K DISK    RENAME(GRIZ2:GRIZ2R)
     FQSYSPRT   O    F   80        PRINTER
     IGRIZ1R        01
     I                                          PARENT        L2M1
     IGRIZ2R        02
     I                                          PARENT        L2M1
     I                                          CHILD         L1

      // sample tables
      // GRIZ1
      // A
      // B
      // GRIZ2
      // B           X
      // B           Z
      // C           X
      // C           Y
     OQSYSPRT   D    01 MR
     O                       PARENT
     O                                              ' - Found parent & 
child'
     O          D    01NMR
     O                       PARENT
     O                                              ' - Found parent, no 
child'
     O          D    02 MR
     O                       PARENT
     O                                              ' '
     O                       CHILD
     O                                              ' - Found parent, and 
child'
     O          D    02NMR
     O                       PARENT
     O                                              ' '
     O                       CHILD
     O                                              ' - Found child, no 
parent'


Copy of output
*...+....1....+....2....+....3....+....4....+..
A          - Found parent, no child 
B          - Found parent & child 
B          X          - Found parent, and child
B          Z          - Found parent, and child
C          X          - Found child, no parent 
C          Y          - Found child, no parent 


Quick - I need a drink!!!


The only reason I didn't actually do anything with the level breaks was 
that I ran out of desire.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.