467,882 Members | 1,185 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,882 developers. It's quick & easy.

DB2/COBOL Stored Procedure Parameter list

JLE
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
Mar 2 '06 #1
  • viewed: 5434
Share:
1 Reply
wfs
No.

- you'd get an error saying something like 'no procedure found that
matches the procedure definition....'

Bill
"JLE" <jo**@j.j> wrote in message news:xFqNf.53391$3W5.52787@trnddc02...
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

Mar 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Bala | last post: by
reply views Thread by pompeyoc | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.