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 >
Wrap
Text File
|
1997-11-24
|
2KB
|
69 lines
* Feature source code generation begins here...
* METHOD
IDENTIFICATION DIVISION.
METHOD-ID. "fillcon1".
DATA DIVISION.
LOCAL-STORAGE SECTION.
*
* Begin hand coding for using a Container
*
01 rowcnt pic 9(9) usage comp-5.
01 ContainerRecord USAGE OBJECT REFERENCE.
01 Contents.
03 Contents-Length PIC 9(9) COMP-5.
03 Contents-String.
05 Contents-Chars PIC X
OCCURS 1 TO 255 TIMES
DEPENDING ON Contents-Length.
01 rownum pic z(3).
01 ParentIndex PIC 9(9) COMP-5.
01 RecordIndex PIC 9(9) COMP-5.
01 VDE-RC PIC S9(9) USAGE COMP-5.
*
* End hand coding for using a Container
*
LINKAGE SECTION.
PROCEDURE DIVISION .
Perform varying rowcnt from 1 by 1
until rowcnt > 4
*
* Put each column into the CON1NV class
*
Move 5 to Contents-Length
Move "Row " to Contents-String
INVOKE con1nv1 "setCon1col1"
USING Contents
Move 3 to Contents-Length
Move rowcnt to rownum
Move rownum to Contents-String
INVOKE con1nv1 "setCon1col2"
USING Contents
*
* Add the Container record
*
MOVE 0 TO ParentIndex
SET ContainerRecord TO con1nv1
INVOKE InterfaceManager "addContainerRecordWithDetails"
USING CContainerControl1 ParentIndex
ContainerRecord
RETURNING RecordIndex
* Retrieve the return code from the previous INVOKE
*
INVOKE InterfaceManager "getErrorCode" USING
CContainerControl1 RETURNING VDE-RC
End-perform
GOBACK.
END METHOD "fillcon1".
* Feature source code generation ends here.