I'm new to stored procedures, however, the passing of parameters using a
group item in the calling cobol program seems incorrect to me. Would
this work?
Calling COBOL pgm is calling a stored procedure using a group 01 level
and the receiving COBOL procedure has 01 levels for each parameter.
Environment is z/OS, DB2, CICS, COBOL, LE. The procedure is local using
WLM. DB2 version is 7.x and CICS is TS 2.2, I think.
Caller WS
01 ws-all5-parms.
05 ws parm1
05 ws-parm2
05 ws-parm3
05 ws-parm4
05 ws-parm5
Exec sql call called-procedure :ws-all5-parms
Receiving procedure
Linkage
01 ws parm1
01 ws-parm2
01 ws-parm3
01 ws-parm4
01 ws-parm5
procedure division using
ws parm1
ws-parm2
ws-parm3
ws-parm4
ws-parm5
The reason I am questioning this is because I have yet to see an example
like this. All of the examples I have seen from IBM match 01 levels in
the caller and called programs. Each parameter is coded as a 01 level
and none are passed as a group item, except null indicators and varchar,
I believe.
John