:)   Well, I hope you won't have to come back to the list to ask for more on this matter!!

Good luck!
Vern

On 10/16/2017 2:23 PM, Alan Shore wrote:
Thanks for your reply Vern
It was an assumption on my part
I haven't tested it yet - though it looks like I don't have to be that concerned

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 Vernon Hamberg
Sent: Monday, October 16, 2017 3:21 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Capturing the SQL options in RPG

Hi Alan

In you original post, it seems that you have seen the behavior that the settings in STRSQL change from before calling a program with some of these options and after the program is done.

Is that the case? Because if that does not happen, then everything is fine, nothing to do, right?

Cheers
Vern

On 10/16/2017 11:37 AM, Alan Shore wrote:
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

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.