Propere COBOL

Voor de COBOL-kabouters in het submodule-bos onder ons :-)

Dit is niet zo proper:

SKIP-CANC-DT.
  READ I1-VHCL-ORD INTO I11-NK14R004
    AT END MOVE YES TO K1-EOF-FLG
        DISPLAY ' EOF - K1 '
  END-READ
  IF K1-EOF-FLG = NOO
    MOVE I11-VO-FO-NR                TO K1-FO-NR
  END-IF
  IF I11-VO-ORIG-CANC-DT NOT = SPACES
    GO TO SKIP-CANC-DT .

Dit is al iets properder:

PERFORM R72R-READ-VHCL-ORD-NEXT
    UNTIL K1-EOF-FLG = YES
    OR I11-VO-ORIG-CANC-DT = SPACES

R72R-READ-VHCL-ORD-NEXT SECTION.
    READ I1-VHCL-ORD INTO I11-NK14R004
       AT END
           MOVE YES TO K1-EOF-FLG
       NOT AT END
           MOVE I11-VO-FO-NR             TO K1-FO-NR
    END-READ

4 thoughts on “Propere COBOL

  1. Get a life, wie kent er nu nog COBOL, laat staan ook actief gebruiken!!

  2. Pingback: Thirty-nine Steps » Blog Archive » The Last of the COBOL-coders

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>