home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / cobol / library / cobolwi / ufco032.cbl < prev    next >
Encoding:
Text File  |  1993-07-28  |  2.3 KB  |  84 lines

  1.       * MF Cobol2/ MS Cobol
  2.       * ufco032.cbl - example file shows a menu
  3.       * you have to rename the files...
  4.       *       menu01.bld --> menu000.bld
  5.       *       menu02.bld --> menu022.bld
  6.       *       menu03.bld --> menu033.bld
  7.       * ... and then create the include files
  8.        identification division.
  9.        program-id. beispiel.
  10.        environment division.
  11.        data division.
  12.        working-storage section.
  13.       *
  14.        COPY menu000.
  15.        COPY menu022.
  16.       *
  17.            COPY UFCO03.
  18.       *
  19.        procedure division.
  20.       *
  21.        p0.
  22.       * initialize mouse, save screen
  23.        call "MOUSEON".
  24.        move 0 to FKZ.
  25.        call "UNIF" using FKZ FMT FMT RET SM Daten.
  26.       * display <menu000>
  27.        p1.
  28.        move "Functions " to fld0.
  29.        move "Programend" to fld1.
  30.        1000.
  31.        move 2 to FKZ.
  32.        move 0 to SM.
  33.        move 0 to RET.
  34.        move "menu000 " to FMT.
  35.        COPY menu001.
  36.        call "UNIF" using FKZ FMT fld0 RET SM Daten.
  37.        if RET = 200 go to 2000.
  38.        if RET = 201 go to 9999.
  39.        go to 1000.
  40.        2000.
  41.       * display <menu022>
  42.        move "file new                 F1   " to fld2.
  43.        move "file open                F2   " to fld3.
  44.        move "file delete              F3   " to fld4.
  45.        move "program end              F10  " to fld5.
  46.        move 2 to FKZ.
  47.        move 0 to SM.
  48.        move 4 to RET.
  49.        2500.
  50.        move "menu022 " to FMT.
  51.        COPY menu021.
  52.        call "UNIF" using FKZ FMT fld2 RET SM Daten.
  53.       * first menu item or F1
  54.        if RET = 200 go to 3000.
  55.        if RET = 101 go to 3000.
  56.       * second menu item or F2
  57.        if RET = 201 go to 3000.
  58.        if RET = 102 go to 3000.
  59.       * third menu item or F3
  60.        if RET = 202 go to 3000.
  61.        if RET = 103 go to 3000.
  62.       * fourth menu item or F10
  63.        if RET = 203 go to 9999.
  64.        if RET = 110 go to 9999.
  65.        move 3 to FKZ.
  66.        move 4 to RET.
  67.        go to 2500.
  68.        3000.
  69.       * display empty format <menu033>
  70.        move 4 to FKZ.
  71.        move 0 to SM.
  72.        move 4 to RET.
  73.        move "menu033 " to FMT.
  74.        COPY menu031.
  75.        call "UNIF" using FKZ FMT FMT RET SM Daten.
  76.        go to 1000.
  77.        9999.
  78.       * clear mouse cursor, display saved screen
  79.        call "MOUSEOFF".
  80.            move 5 to FKZ.
  81.            call "UNIF" using FKZ FMT FMT RET SM Daten.   
  82.        ende.
  83.        stop run.
  84.