473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

SQL PROCEDURE on the iSeries

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.GETACTIVEITEMSKUS9_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.GETACTIVEITEMSKUS9_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
Nov 3 '08 #1
2 6557
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****@chefscatalog.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.GETACTIVEITEMSKUS9_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.GETACTIVEITEMSKUS9_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)
Nov 4 '08 #2
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...@chefscatalog.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.GETACTIVEITEMSKUS9_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.GETACTIVEITEMSKUS9_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.
Nov 6 '08 #3

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

Similar topics

3
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...
3
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...
9
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...
8
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,...
2
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...
0
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...
0
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...
0
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.