By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,609 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,609 IT Pros & Developers. It's quick & easy.

DB2/COBOL Stored Procedure Parameter list

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.