|
Thanks for your reply Rob
I assumed (we all know what THAT means) that these were changed on
executing the program
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Rob Berendt
Sent: Monday, October 16, 2017 12:33 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Capturing the SQL options in RPG
Those options are compile time options, not execution time options.
It's just an easier way of remembering to use CRTSQLRPGI
OBJ(MYLIB/MYPGM) COMMIT(*CS) CLOSQLCSR(*ENDMOD) DATFMT(*ISO)
See also:
DSPPGM PGM(ROB/AAASQL) DETAIL(*MODULE) 5=Display description
DB2 for IBM i module attributes:
Number of SQL statements . . . . . . . . . . . : 2
Commitment control . . . . . . . . . . . . . . : *NONE
Relational database . . . . . . . . . . . . . : *LOCAL
Naming convention . . . . . . . . . . . . . . : *SYS
Allow copy of data . . . . . . . . . . . . . . : *OPTIMIZE
Allow blocking . . . . . . . . . . . . . . . . : *ALLREAD
Delay PREPARE . . . . . . . . . . . . . . . . : *NO
Close SQL cursor . . . . . . . . . . . . . . . : *ENDACTGRP
Date format . . . . . . . . . . . . . . . . . : *ISO
Date separator . . . . . . . . . . . . . . . . : /
Time format . . . . . . . . . . . . . . . . . : *HMS
Time separator . . . . . . . . . . . . . . . . : :
Default Collection name . . . . . . . . . . . : *NONE
More...
See also:
Retrieve Program Information (QCLRPGMI) API
PGMI0200 Format
Program SQL information
Continuation of program SQL information
at:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/qclrpgmi
.htm
So, if your question is: Do you need to retrieve this information so that you can change it back as you return back up the call stack the answer is no.
But if you want to pass the state of whatever your program is on to STRSQL you could use the API to retrieve the program information and then use that to pass on to the appropriate parameters in STRSQL.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Alan Shore <ashore@xxxxxxxx>
To: "midrange-l@xxxxxxxxxxxx" <midrange-l@xxxxxxxxxxxx>
Date: 10/16/2017 11:51 AM
Subject: Capturing the SQL options in RPG
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Hi everyone
Before I forget, we are on V7r1
In an RPGSQL program, we can set SQL options - for example exec Sql
Set Option Commit=*CS, CLOSQLCSR=*ENDMOD, DECMPT=*PERIOD; exec Sql Set
Option DATFMT = *ISO;
Is there a way to capture/save these (or any) SQL options - before
they are set?
The project that I am working on changes these options so that when I
go into STRSDQL - those changed options are in effect
I don't know what effect this will have on users when I place this
project into production
And google search doesn't seem to come up with anything Maybe I am
asking for the wrong thing
As always - any and all responses MUCH appreciated
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.