|
Frank, The Option is setting up the default for all the sql activities within the program module and so should be set at the beginning (preferably in *inzsr). I am not certain of your actions in the module with the work file. As Charles pointed out, are you creating a work file in qtemp for the sql? Then you don’t have to. You can declare the cursor over the actual file FRL00144. Thanks, Sudha Sudha Ramanujan SunGard Futures Systems sramanujan@xxxxxxxxxxxxxxxxxx (312) 577 6179 (312) 577 6101 - Fax -----Original Message----- From: fkany@xxxxxxxxxxxxxxxxxx [mailto:fkany@xxxxxxxxxxxxxxxxxx] Sent: 2005年4月5日 16:30 To: CN=RPG programming on the AS400/O=iSeries Subject: RE: SQLRPGLE won't compile... Where exactly would the SQL "OPTION" go in the program? Thanks, Frank "Russell Conerly" <rconerly@xxxxxxxxxxx>@midrange.com on 04/05/2005 04:51:45 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc: Subject: RE: SQLRPGLE won't compile... Just a guess is commitment control is on by default. I'm assuming that you are not using it. Add the following code or recompile with commit(*none). C/EXEC SQL C+ SET OPTION COMMIT = *NONE C/END-EXEC Regards, Russell Conerly > > > Program now compiles. I set the break point in debug after the "INSERT" > section, queried QTEMP/SQLTABLE and there was no data. Can anyone see > why? > > Thanks, > > Frank > > * > ********************************************************************** > P GET_TERM_BILLS B > ?* > C IF #OT1 <> '*ALL' > C EVAL NUM#OT1 = *ZEROS > C #OT1 CHAIN AAL03002 > C IF %FOUND(AAL03002) > C EVAL NUM#OT1 = CT1TID > C ENDIF > C ENDIF > ?* > C IF #DT1 <> '*ALL' > C EVAL NUM#ODT = *ZEROS > C #DT1 CHAIN AAL03002 > C IF %FOUND(AAL03002) > C EVAL NUM#ODT = CT1TID > C ENDIF > C ENDIF > ?* > C/EXEC SQL > C+ CREATE TABLE QTEMP/SQLTABLE (XFHDDAT DECIMAL (8 ), XFHOT DECIMAL > C+ (3 ), XFHPRO DECIMAL (7 ), XFHDT DECIMAL (3 ), XFHPUDT DECIMAL (8 > C+ ), XFHDADT DECIMAL (8 ), XFHSCD CHARACTER (7 ), XFHCCD CHARACTER > C+ (7 ), XFHCCT CHARACTER (20 ), XFHCST CHARACTER (2 ), XFHCZIP > C+ CHARACTER (6 ), XFHDTIM DECIMAL (6 )) > C/END-EXEC > ?* > C/EXEC SQL > C+ INSERT INTO QTEMP/SQLTABLE (XFHDDAT, XFHOT, XFHPRO, XFHDT, > C+ XFHPUDT, XFHSCD, XFHCCD, XFHCCT, XFHCST, XFHCZIP, XFHDTIM) SELECT > C+ FHDDAT, FHOT, FHPRO, FHDT, FHPUDT, FHDADT, FHSCD,FHCCD, FHCCT, > C+ FHCST, FHCZIP, FHDTIM FROM FRL00144 WHERE FHDDAT >= FDATE AND > C+ FHDDAT <= TDATE ORDER BY FHOT, FHDT > C/END-EXEC > ?* > C/EXEC SQL > C+ DECLARE SQLTBLCSR CURSOR FOR SELECT * FROM QTEMP/SQLTABLE > C/END-EXEC > ?* > C/EXEC SQL > C+ OPEN SQLTBLCSR > C/END-EXEC > '* > '* ----------------------------- > C DOU SQLCOD <> 0 > ?* > C/EXEC SQL > C+ FETCH NEXT FROM SQLTBLCSR > C/END-EXEC > ?* > C IF SQLCOD <> 0 > C LEAVE > C ENDIF > ?* > C EVAL BADDATE = 'N' > C EVAL NEXTFLG = 'N' > C CALLP CHK_TERM_BILLS > ?* > C IF BADDATE = 'Y' > C LEAVE > C ENDIF > ?* > C IF NEXTFLG = 'Y' > C ITER > C ENDIF > ?* > C CALLP CHK_SVC_QLTY > ?* > C CALLP POP_WORKF > ?* > C WRITE FREC457 > ?* > ?* DOU SQLCOD <> 0 > ?* > C/EXEC SQL > C+ CLOSE SQLTBLCSR > C/END-EXEC > ?* > > > > -- > 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/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. > > -- 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/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. -- 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/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.