Skip to main content
deleted 50 characters in body
Source Link
ClickRick
  • 245
  • 4
  • 11

COBOL 66 with Object Cobol extensions Microfocus Cobol (721 659)

Microfocus Cobol (721 659 592)

       method-id u.
       local-storage section.
       77  i pic s9(9) comp.
       77  c pic 9 occurs 10 value 0.
       77  g pic 9.
       01  s pic 9(9).
         01  t redefines s pic 9 occurs 9.
       linkage section.
       77  n pic s9(9) comp.
       77  d pic x.
         88  f value is 'y'.
       procedure division using by value n returning d.
           move n to s.
           move 'n' to d.
           perform p varying i from 1 by 1 until i greater than 9 or f.
           goback.
       p.
           move t (i) to g.
           if c (g) is not zero then move 'y' to d.
           add 1 to c (g).
       end method.

Hmmm, I think I should go back to pitch & putt :(

EDIT: OMGZ I CAN USE LOWER CASE!!!

COBOL 66 with Object Cobol extensions Microfocus Cobol (721 659)

       method-id u.
       local-storage section.
       77  i pic s9(9) comp.
       77  c pic 9 occurs 10 value 0.
       77  g pic 9.
       01  s pic 9(9).
         01  t redefines s pic 9 occurs 9.
       linkage section.
       77  n pic s9(9) comp.
       77  d pic x.
         88  f value is 'y'.
       procedure division using by value n returning d.
           move n to s.
           move 'n' to d.
           perform p varying i from 1 by 1 until i greater than 9 or f.
           goback.
       p.
           move t (i) to g.
           if c (g) is not zero then move 'y' to d.
           add 1 to c (g).
       end method.

Hmmm, I think I should go back to pitch & putt :(

EDIT: OMGZ I CAN USE LOWER CASE!!!

COBOL 66 with Object Cobol extensions

Microfocus Cobol (721 659 592)

       method-id u.
       local-storage section.
       77  i pic s9(9) comp.
       77  c pic 9 occurs 10 value 0.
       77  g pic 9.
       01  s pic 9(9).
       01  t redefines s pic 9 occurs 9.
       linkage section.
       77  n pic s9(9) comp.
       77  d pic x.
       88  f value is 'y'.
       procedure division using by value n returning d.
           move n to s. move 'n' to d. perform p varying i from 1 by 1 until i greater than 9 or f. goback.
       p.  move t (i) to g. if c (g) is not zero then move 'y' to d. add 1 to c (g).
       end method.

Hmmm, I think I should go back to pitch & putt :(

EDIT: OMGZ I CAN USE LOWER CASE!!!

added 3 characters in body
Source Link
ClickRick
  • 245
  • 4
  • 11

COBOL 66 with ObjectCOBOL 66 with Object Cobol extensions Microfocus Cobol extensions (721721 659)

161000 METHOD      method-IDid Uu.
161100 LOCAL      local-STORAGEstorage SECTIONsection.
161200       77  Ii PICpic S9s9(9) COMPcomp.
161300       77  Cc PICpic 9 OCCURSoccurs 10 VALUEvalue 0.
161400       77  Gg PICpic 9.
161500       01  Ss PICpic 9(9) DISPLAY.
161600         01  S2t REDEFINESredefines Ss PICpic 9 OCCURSoccurs 9.
161700 LINKAGE SECTION     linkage section.
161800       77  Nn PICpic S9s9(9) COMPcomp.
161900       77  Dd PICpic Xx.
162000         88  Ff VALUEvalue ISis 'Y''y'.
162100 PROCEDURE DIVISION USING BY VALUE N RETURNING D.
162200 procedure division using by MOVEvalue Nn TOreturning Sd.
162300     MOVE 'N' TO D   move n to s.
162400     PERFORM P VARYING I FROM 1 BYmove 1'n' to d.
162500           perform p UNTILvarying Ii ISfrom GREATER1 THANby 9
1626001 until i greater than 9 or f.
      OR F    goback.
162700     GOBACK.
162800 P p.
162900     MOVE S2     move t (Ii) TOto Gg.
163000     IF C (G) IS NOT EQUAL TOif ZEROc THEN(g) MOVEis 'Y'not TOzero Dthen move 'y' to d.
163100     ADD      add 1 TOto Cc (Gg).
163200 END METHOD     end method.

Hmmm, I think I should go back to pitch & putt :(

EDIT: OMGZ I CAN USE LOWER CASE!!!

COBOL 66 with Object Cobol extensions (721)

161000 METHOD-ID U.
161100 LOCAL-STORAGE SECTION.
161200 77  I PIC S9(9) COMP.
161300 77  C PIC 9 OCCURS 10 VALUE 0.
161400 77  G PIC 9.
161500 01  S PIC 9(9) DISPLAY.
161600   01  S2 REDEFINES S PIC 9 OCCURS 9.
161700 LINKAGE SECTION.
161800 77  N PIC S9(9) COMP.
161900 77  D PIC X.
162000   88  F VALUE IS 'Y'.
162100 PROCEDURE DIVISION USING BY VALUE N RETURNING D.
162200     MOVE N TO S.
162300     MOVE 'N' TO D.
162400     PERFORM P VARYING I FROM 1 BY 1
162500             UNTIL I IS GREATER THAN 9
162600             OR F.
162700     GOBACK.
162800 P.
162900     MOVE S2 (I) TO G.
163000     IF C (G) IS NOT EQUAL TO ZERO THEN MOVE 'Y' TO D.
163100     ADD 1 TO C (G).
163200 END METHOD.

Hmmm, I think I should go back to pitch & putt :(

COBOL 66 with Object Cobol extensions Microfocus Cobol (721 659)

       method-id u.
       local-storage section.
       77  i pic s9(9) comp.
       77  c pic 9 occurs 10 value 0.
       77  g pic 9.
       01  s pic 9(9).
         01  t redefines s pic 9 occurs 9.
       linkage section.
       77  n pic s9(9) comp.
       77  d pic x.
         88  f value is 'y'.
       procedure division using by value n returning d.
           move n to s.
           move 'n' to d.
           perform p varying i from 1 by 1 until i greater than 9 or f.
           goback.
       p.
           move t (i) to g.
           if c (g) is not zero then move 'y' to d.
           add 1 to c (g).
       end method.

Hmmm, I think I should go back to pitch & putt :(

EDIT: OMGZ I CAN USE LOWER CASE!!!

Source Link
ClickRick
  • 245
  • 4
  • 11

COBOL 66 with Object Cobol extensions (721)

161000 METHOD-ID U.
161100 LOCAL-STORAGE SECTION.
161200 77  I PIC S9(9) COMP.
161300 77  C PIC 9 OCCURS 10 VALUE 0.
161400 77  G PIC 9.
161500 01  S PIC 9(9) DISPLAY.
161600   01  S2 REDEFINES S PIC 9 OCCURS 9.
161700 LINKAGE SECTION.
161800 77  N PIC S9(9) COMP.
161900 77  D PIC X.
162000   88  F VALUE IS 'Y'.
162100 PROCEDURE DIVISION USING BY VALUE N RETURNING D.
162200     MOVE N TO S.
162300     MOVE 'N' TO D.
162400     PERFORM P VARYING I FROM 1 BY 1
162500             UNTIL I IS GREATER THAN 9
162600             OR F.
162700     GOBACK.
162800 P.
162900     MOVE S2 (I) TO G.
163000     IF C (G) IS NOT EQUAL TO ZERO THEN MOVE 'Y' TO D.
163100     ADD 1 TO C (G).
163200 END METHOD.

Hmmm, I think I should go back to pitch & putt :(