473,888 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2/COBOL Store Procedure Parmeter List (Reply)

Dj
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 linkage or on the procedure
division using statement. For more information, please send a request to
ne******@db2hel pdesk.com

We have examples that we could send you, and we can also show you how to
stream line the SP for best performance across the network.
Mar 2 '06 #1
3 1900
JLE
Dj wrote:
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.


Thanks for your response, Dj.

The stored procedure is set up and working in a production environment.
The SP is set to receive five 01 level parameters. The caller passes
these five parameters using one group level item. I am concerned because
the system where these types of calls are located is having data
inconsistency problems. In addition, I have not seen any other examples
of this type of parameter passing. These calls, as far as I know, are
not generating SQL errors. However, I am concerned that passing
parameters this way may hide problems. For instance, would the 05 level
parameters from the caller match up internally with the 01 levels of the SP?

Thanks again, Dj.

John

Mar 2 '06 #2
The key to matching the 05s in the caller to the stored procedure's 01
levels lies in the invocation of the stored procedure:

Exec sql call called-procedure :ws-all5-parms

This is not a standard program to program call but is an SQL statement
in the calling program. The SQL preporcessor recognizes the parameter
construct (01 with 05s) and converts it to the multiple parameters being
passed to the called procedure. The LINKAGE SECTION and PROCEDURE
DIVISION USING code in the stored procedure handle mapping the
parameters to appropriate data areas for the stored procedure to use.

Phil Sherman
JLE wrote:
Dj wrote:
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.


Thanks for your response, Dj.

The stored procedure is set up and working in a production environment.
The SP is set to receive five 01 level parameters. The caller passes
these five parameters using one group level item. I am concerned because
the system where these types of calls are located is having data
inconsistency problems. In addition, I have not seen any other examples
of this type of parameter passing. These calls, as far as I know, are
not generating SQL errors. However, I am concerned that passing
parameters this way may hide problems. For instance, would the 05 level
parameters from the caller match up internally with the 01 levels of the
SP?

Thanks again, Dj.

John

Mar 3 '06 #3
JLE
Thanks, Phil.

It has been about seven years since I've coded DB2, and SPs are
completely new to me. I really appreciate the help.

Thanks everyone.

Phil Sherman wrote:
The key to matching the 05s in the caller to the stored procedure's 01
levels lies in the invocation of the stored procedure:

Exec sql call called-procedure :ws-all5-parms

This is not a standard program to program call but is an SQL statement
in the calling program. The SQL preporcessor recognizes the parameter
construct (01 with 05s) and converts it to the multiple parameters being
passed to the called procedure. The LINKAGE SECTION and PROCEDURE
DIVISION USING code in the stored procedure handle mapping the
parameters to appropriate data areas for the stored procedure to use.

Phil Sherman
JLE wrote:
Dj wrote:
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.


Thanks for your response, Dj.

The stored procedure is set up and working in a production
environment. The SP is set to receive five 01 level parameters. The
caller passes these five parameters using one group level item. I am
concerned because the system where these types of calls are located is
having data inconsistency problems. In addition, I have not seen any
other examples of this type of parameter passing. These calls, as far
as I know, are not generating SQL errors. However, I am concerned that
passing parameters this way may hide problems. For instance, would the
05 level parameters from the caller match up internally with the 01
levels of the SP?

Thanks again, Dj.

John

Mar 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5015
by: Thomasb | last post by:
Hi! In our company we have a huge amount of COBOL sub-routines that are called from other COBOL-programs. Now we are looking for a method to call them from Windows/Web applications. One idea is to wrap the sub-routine call in a DB2 stored procedure and call the procedure from our Web application.
2
1434
by: singlal | last post by:
Hi, my question was not getting any attention because it moved to 2nd page; so posting it again. Sorry for any inconvenience but I need to get it resolved fast. Need your help! **************************************************************************************************** Original Question: -------------------- Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
1
5725
by: JLE | last post by:
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.
0
2363
by: Springflower | last post by:
Hi, I am new to using DB2 Development Center. I had downloaded the trial version(8.2) of latest DB2 UDB and want to write a stored procedure in COBOL. When I chose the oprion the wrting a new stored procedure, it had given me the following two language options:
0
3500
by: bog39 | last post by:
We have z/os and DB/2 V. 8 running. I try to create a new UDF using the command CREATE FUNCTION: CREATE FUNCTION CNGETADR (INTEGER) RETURNS CHAR(50) EXTERNAL NAME CNADR001 PARAMETER STYLE DB2SQL WLM ENVIRONMENT WLMENV LANGUAGE COBOL DETERMINISTIC NO SQL NO DBINFO
0
5807
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
3149
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...
3
1670
by: mktilu | last post by:
hi can any one tell me how to run the store procedure where one of its parmeter has OUT and when i execute i want to get the values . Its argent reply.
2
6430
by: pompeyoc | last post by:
Hi, I am a newbie when it comes to stored procs and i would like to learn how to call a COBOL program from a stored procedure. The SP can either be an DB2 SQL SP or an external COBOL/DB2 SP. I can use either depending on which is more efficient. One of the older posts ("Calling a COBOL Subroutine from COBOL/DB2 Stored Procedure" Dec 2005) suggested this is possible but I couldn't follow the explanation and there wasn't any examples....
0
9800
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,...
0
11185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10439
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
9597
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...
1
7990
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7148
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
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
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
3252
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.