Hello,
What are the optimal settings to use in a CREATE PROCEDURE – when
creating a SQL procedure on the iSeries? To read data? To update?
Here is a pretty standard one of ours. I know the “MODIFIES SQL DATA”
could be changed to “READS SQL DATA” – but would it give much/any
performance boost?
CREATE PROCEDURE APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG (
IN IN_COMPANY VARCHAR(3) ,
IN IN_OFFER VARCHAR(10) ,
IN IN_CWMXDTA VARCHAR(10) ,
IN IN_CWMXWEB VARCHAR(10) ,
IN IN_CWMXINH VARCHAR(10) )
DYNAMIC RESULT SETS 1
LANGUAGE SQL
SPECIFIC APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG
DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
SET OPTION ALWBLK = *ALLREAD ,
ALWCPYDTA = *OPTIMIZE ,
COMMIT = *NONE ,
DECRESULT = (31, 31, 00) ,
DFTRDBCOL = *NONE ,
DYNDFTCOL = *NO ,
DYNUSRPRF = *USER ,
SRTSEQ = *HEX
BEGIN 2 6574
MODIFIES SQL versus READS SQL is not going to impact performance.
What release level are you on? There were significant enhancements delivered
for SQL Procedure performance in V5R4 & V6R1.
Some of those changes are highlighted in the SQL Procedure Performance white
paper that you can find at: http://ibm.com/systems/i/db2/awp.html jm****@chefscat alog.com wrote:
Hello,
What are the optimal settings to use in a CREATE PROCEDURE – when
creating a SQL procedure on the iSeries? To read data? To update?
Here is a pretty standard one of ours. I know the “MODIFIES SQL DATA”
could be changed to “READS SQL DATA” – but would it give much/any
performance boost?
CREATE PROCEDURE APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG (
IN IN_COMPANY VARCHAR(3) ,
IN IN_OFFER VARCHAR(10) ,
IN IN_CWMXDTA VARCHAR(10) ,
IN IN_CWMXWEB VARCHAR(10) ,
IN IN_CWMXINH VARCHAR(10) )
DYNAMIC RESULT SETS 1
LANGUAGE SQL
SPECIFIC APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG
DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
SET OPTION ALWBLK = *ALLREAD ,
ALWCPYDTA = *OPTIMIZE ,
COMMIT = *NONE ,
DECRESULT = (31, 31, 00) ,
DFTRDBCOL = *NONE ,
DYNDFTCOL = *NO ,
DYNUSRPRF = *USER ,
SRTSEQ = *HEX
BEGIN
--
Kent Milligan
ISV Enablement - System i km***@us.eye-bee-m.com (spam trick) GO HAWKEYES!!
>>ibm.com/iseries/db2
(opinions stated are not necessarily those of my employer)
On Nov 4, 8:16*am, Kent Milligan <km...@us.eye-b-m.comwrote:
MODIFIES SQL versus READS SQL is not going to impact performance.
What release level are you on? *There were significant enhancements delivered
for SQL Procedure performance in V5R4 & V6R1.
Some of those changes are highlighted in the SQL Procedure Performance white
paper that you can find at:
*http://ibm.com/systems/i/db2/awp.html
jmu...@chefscat alog.com wrote:
Hello,
What are the optimal settings to use in a CREATE PROCEDURE when
creating a SQL procedure on the iSeries? To read data? To update?
Here is a pretty standard one of ours. I know the MODIFIES SQL DATA
could be changed to READS SQL DATA but would it give much/any
performance boost?
CREATE PROCEDURE APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG (
* *IN IN_COMPANY VARCHAR(3) ,
* *IN IN_OFFER VARCHAR(10) ,
* *IN IN_CWMXDTA VARCHAR(10) ,
* *IN IN_CWMXWEB VARCHAR(10) ,
* *IN IN_CWMXINH VARCHAR(10) )
* *DYNAMIC RESULT SETS 1
* *LANGUAGE SQL
* *SPECIFIC APPGENERIC.GETA CTIVEITEMSKUS9_ ORIG
* *DETERMINISTIC
* *MODIFIES SQL DATA
* *CALLED ON NULL INPUT
* *SET OPTION *ALWBLK = *ALLREAD ,
* *ALWCPYDTA = *OPTIMIZE ,
* *COMMIT = *NONE ,
* *DECRESULT = (31, 31, 00) ,
* *DFTRDBCOL = *NONE ,
* *DYNDFTCOL = *NO ,
* *DYNUSRPRF = *USER ,
* *SRTSEQ = *HEX
* *BEGIN
--
Kent Milligan
ISV Enablement - System i
km...@us.eye-bee-m.com (spam trick) * GO HAWKEYES!!
*>>ibm.com/iseries/db2
(opinions stated are not necessarily those of my employer)- Hide quoted text -
- Show quoted text -
Hello Kent, We are on v5r4. V6R1, not happening anytime soon. Our main
software on the iSeries is a package and the vendor has not given an
estimate on when they think it will be ready.
I went to an IBM thing where they touch upon some of v6r1 benefits.
Looks good. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Carver |
last post by:
We are running into a problem with a Communication Link failure when
calling an External Stored procedure written in ILE Cobol from an SQL
UDF. When calling the stored procedure by itself and not within the
UDF it runs fine, it's only when we excute the UDF that we get the
communication link failure. I have setup EXTERNAL ACTION on the the
UDF, the COBOL program doesn't execute any SQL statements.
Here is the function and how it is...
|
by: Laurence |
last post by:
Hi there,
Does somebody know the efficent way to connect DB2/400? Through iSeries
Access ODBC/OLEDB driver or DB2 Connect? Which will more fast and
efficent?
In addition, does DB2 Connect use APPC over TCP/IP protocol? Or SNA
protocol?
|
by: Leedrick |
last post by:
Hi,
In the past I have been dealing mainly with sql server, and recently
been given the task of supporting software that uses db2 on as400.
Simple tasks such as executing a stored procedure from a query window
have proven more troublesome than I expected.
The procedure I'm trying to call has an output argument. I can't seem
to declare a variable to pass outside of a procedure or function, and
|
by: gacuna |
last post by:
i want to insert into a temporal table the result of a store procedure.
on sql server the sentence would look like this (already working)
INSERT INTO #SHIPINFO
exec TESTDTA.S59RSH05 @SCBILLTO, @INID, @ADRSTYPE
i tried to do the same on DB2, meaning
INSERT INTO SESSION.SHIPINFO
CALL TESTDTA.S59RSH05 v_SCBILLTO, v_INID, v_ADRSTYPE
|
by: Keith |
last post by:
I am trying to connect to a DB2 database using "iSeries Access ODBC
Driver" from Crystal Reports. I am able to report on tables and queries
but not stored procedures. I get the following error after I select the
procedure and enter the parameter.
Query Engine Error: '42000:
Statement violates access rule: Connection is set to read only.'
The ODBC driver is setup with a connection type Read/Write (all SQL
statements allowed) and Naming...
| |
by: Johan Neidenmark |
last post by:
When i try to run this SQL statements in iSeries Access for windows
(against my customers db2) i get:
SQL State: 42904
Vendor Code: -7032
Message: SQL procedure, function, or trigger
GET_INVENTORY_SEQUENCE in BPCSAX_PRD not created. Cause . . . . . :
SQL procedure, function, or trigger GET_INVENTORY_SEQUENCE in
BPCSAX_PRD was not created. The compile was not successful. SQL creates
an SQL procedure, function, or trigger as a C program...
|
by: Pkid |
last post by:
Hi
I am using DB2 on the iSeries. I create a SQL Stored procedure in
iSeries Navigator by running a sql script. The declaration of the
procedure is as follows:
CREATE PROCEDURE Andrew.GetLargestFreeBlock(
IN filename CHAR(10),
IN surrogatename CHAR(10))
LANGUAGE SQL
|
by: jk9427 |
last post by:
Hello all,
I have a weird situation here. We are on an ISeries AS400. We have created an SQL table and can access it just fine when the COBOL program is called directly. The problem exists when the process is invoked with a stored procedure. The stored procedure calls a CL and then the COBOL program, but the SQL statement fails during this process.
Am I missing something, why does it work when the COBOL progam is invoked without using...
|
by: savio XCIX |
last post by:
I created the following stored procedure:
=======
CREATE PROCEDURE TBLNAME.proc_test (IN p_custnum VARCHAR(8),
IN p_zipcode CHAR(5),
OUT r_valid CHAR(1),
OUT r_bal DECIMAL(9,2))
LANGUAGE SQL
BEGIN
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |