|
Rob, Absolutely, place this above your subprocedures on one place only. All things that will be referenced by the pre-compiler (we all love it) must be entered as if the entire service program was a main. No such thing as a local variable for the pre-compiler etc... I have made heavy use of service programs for data access and it works just fine. Just remember that when you define variables etc. that the pre-compiler sees you must act as if they were global. Andrew -----Original Message----- From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx] Sent: Thursday, April 24, 2003 7:42 AM To: RPG programming on the AS400 / iSeries Subject: SQL - Set Option Is there a way to do a SET OPTION sql statement in a service program with NO MAIN? I like to use that for SQL. Sort of like SQL's version of the H spec. Sample C/EXEC SQL C+ Set Option C+ Naming = *Sys, C+ Commit = *None, C+ UsrPrf = *User, C+ DynUsrPrf = *User, C+ CloSqlCsr = *EndMod C/END-EXEC Or do I need to do that in every subprocedure that uses SQL? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.