home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv6.zip / vac22os2 / ibmcobol / samples / minivb / con1 / con1.cbv next >
Text File  |  1997-11-24  |  2KB  |  69 lines

  1.  
  2.       * Feature source code generation begins here...
  3.       * METHOD
  4.        IDENTIFICATION DIVISION.
  5.        METHOD-ID. "fillcon1".
  6.        DATA DIVISION.
  7.        LOCAL-STORAGE SECTION.
  8.       *
  9.       * Begin hand coding for using a Container
  10.       *
  11.  
  12.        01 rowcnt  pic 9(9) usage comp-5.
  13.        01 ContainerRecord USAGE OBJECT REFERENCE.
  14.        01 Contents.
  15.           03 Contents-Length      PIC 9(9) COMP-5.
  16.           03 Contents-String.
  17.              05 Contents-Chars  PIC X
  18.                   OCCURS 1 TO 255 TIMES
  19.                   DEPENDING ON Contents-Length.
  20.        01 rownum  pic z(3).
  21.        01 ParentIndex PIC 9(9) COMP-5.
  22.        01 RecordIndex PIC 9(9) COMP-5.
  23.        01 VDE-RC      PIC S9(9) USAGE COMP-5.
  24.       *
  25.       * End hand coding for using a Container
  26.       *
  27.        LINKAGE SECTION.
  28.        PROCEDURE DIVISION .
  29.  
  30.  
  31.               Perform varying rowcnt from 1 by 1
  32.                              until rowcnt > 4
  33.       *
  34.       * Put each column into the CON1NV class
  35.       *
  36.  
  37.                 Move 5 to Contents-Length
  38.                 Move "Row  " to Contents-String
  39.                 INVOKE con1nv1 "setCon1col1"
  40.                      USING Contents
  41.  
  42.                 Move 3 to Contents-Length
  43.                 Move rowcnt to rownum
  44.                 Move rownum to Contents-String
  45.                 INVOKE con1nv1 "setCon1col2"
  46.                      USING Contents
  47.       *
  48.       * Add the Container record
  49.       *
  50.                 MOVE 0 TO ParentIndex
  51.                 SET ContainerRecord TO con1nv1
  52.                 INVOKE InterfaceManager "addContainerRecordWithDetails"
  53.                        USING CContainerControl1 ParentIndex
  54.                        ContainerRecord
  55.                        RETURNING RecordIndex
  56.       * Retrieve the return code from the previous INVOKE
  57.       *
  58.                 INVOKE InterfaceManager "getErrorCode" USING
  59.                        CContainerControl1 RETURNING VDE-RC
  60.  
  61.               End-perform
  62.            GOBACK.
  63.  
  64.        END METHOD "fillcon1".
  65.  
  66.       * Feature source code generation ends here.
  67.  
  68.  
  69.