Hi Sil,
Don't know anything about VB, but do know COBOL. Maybe we can get this off the ground. You write:
"I am using VB 6 to call a NetExpress dll" then you write:
"How do I pass a table from cobol to vb."
Do you mean "How do I pass BACK a table from cobol to vb."?
Do you know how to pass other data to and from COBOL pgms?
Can you provide an example?
I think you mean to pass the table back from the COBOL pgm to the VB pgm.
I'll provide you an example of 2 COBOL pgms. I'll name one the CALLER the other the CALLEE.
In the CALLER:
Code:
.
.
.
WORKING-STORAGE SECTION.
01 PARM-1 PIC X(003)
.
.
.
01 PARM-2 PIC X(003)
01 WS-TBL.
05 WS-TBL-ENT PIC X(005) OCCURS 100.
.
.
.
PROCEDURE DIVISION.
.
.
.
CALL 'CALLEE' USING PARM-1 PARM-2 WS-TBL.
MOVE WS-TBL-ENT(23) TO someplace in the pgm
.
.
.
STOP RUN.
In the CALLEE:
.
.
.
WORKING-STORAGE SECTION.
.
.
.
01 WS-MY-TBL.
05 WS-MY-TBL-ENT PIC X(005) OCCURS 100.
.
.
.
LINKAGE SECTION.
01 LS-TYPE PIC X(003).
01 LS-CODE PIC X(003).
01 LS-TBL PIC X(500).
PROCEDURE DIVISION USING LS-TYPE LS-CODE LS-TBL.
.
.
.
MOVE WS-MY-TBL TO LS-TBL.
.
.
.
GOBACK.
So, what this means is that CALLER needs a table and CALLEE can provide that info to him. CALLER defines the table in his area the way the CALLEE will return it to him after the CALL. It's important that they both define it as having the same overall size and that each field within the table is agreed to have the same data format and size. What they call it within their own program space is irrelevant.
The flow is:
CALLER CALLS CALLEE
CALLEE moves his table to the Linkage Sect (LS-TBL).
In actuality, the table is moved to the CALLER WS space
(WS-TBL). The Linkage Sect acts like an overlay that
points to the CALLER WS area.
CALLEE issues goback to CALLER.
CALLER can now reference the table.
The scenerio is similar for a VB subpgm, but I don't know the VB coding techniques. Maybe you can piece it together from what I've given you.
HTH, Jack.