473,835 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
1 5720
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.5339 1$3W5.52787@trn ddc02...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2192
by: Steven | last post by:
I'm calling a stored procedure which has an output parameter of type int. Once the stored procedure is executed, I want to check the value of the parameter in case it is null. However, when the a null value is returned I don't seem to be able to detect it. Any help would be greatly appreciated. C# code is as follows: SqlCommand cmd = new SqlCommand("sp_GetApplicationID", conn);
6
1544
by: Bala | last post by:
Hi, This is my stored procured. i try to pass the parametre like this. i am getting error. any one please tell me how to pass the parameter? vb code: ..Connection = New OleDbConnection(strConn) ..Connection.Open() ..CommandText = "sp_RegShow1"
3
1898
by: Dj | last post by:
If you passed all of the fields as one group level when you rejester the SP you would only be able to use one CHAR field. Now here is the rub. If you are passing mix data, why not send it in the smallest network transaction possible. Also why not have DB2 validate each parameter. This should be a must so the SP knows that data type has already passed DB2 validation requirements. Last item. A group level can not be use in the...
7
13366
by: CK | last post by:
I want the procedure to check for the existence of a paramter and if it is there, it will process these instructions, otherwise it will process these instructions. Any ideas? Thanks for your advice. Regards, CK
0
1901
by: Khushboo Chhabra | last post by:
Hello, I’m working on mainframes platform and have been trying to collect some knowledge on Stored Procedures. I referred to IBM’s red book. And found details regarding how to create stored procedure. Now I want to know if we can invoke these COBOL or SQL stored procedures using Java, the JDBC drivers. If any one can share any information in this regard then it will be great. Thanks and regards, Khushboo Chhabra
0
5806
by: pompeyoc | last post by:
I am trying to learn how to use stored procedures written in COBOL so I wrote 2 small programs to test it out: the stored procedure and the the calling program. I have no problems compiling them but when the calling program enters the SP, it either hangs or gives me sqlcode -1131. We are on AIX 5.2 (I think) running DB2 UDB ver 7.2 and MF COBOL 4.1. Below are the programs I wrote:
4
3143
by: PJackson | last post by:
I have been given the task of taking a 3,200 line COBOL stored procedure and duplicating the same functionality in UDB 7.2 on the Windows platform with a procedural SQL stored procedure. I have fiddled with procedural SQL stored procs on UDB, but mostly short,trivial ones. Looking for good advice, links, etc. on the best approach to this. There doesn't seem to be the concept of subroutines within a stored proc, so I am guessing one main...
0
1118
by: MicheleW | last post by:
Can some tell me how to call a db2 cobol stored procedure in visual studio.net 2005? Thank you.
1
2894
by: rsreeni | last post by:
Hi, We are planning to use Cobol Stored procedures for doing our Data retrieval from DB2 Tables. The stored procedure(s) will be called from J2EE application via Db2 Connect. Does the linkage restriction of 32K apply to the parameters getting passed into COBOL DB2 Stored procedures also? Thanks, -Sreeni
0
9803
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9652
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10233
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5804
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3088
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.