× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Charles,
I did not see that.



On Mon, Feb 11, 2013 at 3:17 PM, Charles Wilt <charles.wilt@xxxxxxxxx>wrote:

Not according to the docs you quoted...

"*ENDACTGRP and *ENDMOD are for use by ILE programs and modules"

"*ENDPGM, *ENDSQL, and *ENDJOB are for use by non-ILE programs"

Assuming you are using CRTBNDRPG to create a single module program, *ENDMOD
would give you the equivalent of *ENDPGM.

Charles


On Mon, Feb 11, 2013 at 3:01 PM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

Release V7R1M0.
Statement SET Option CloSQLCsr = *EndPgm

Per the V5R4 SQL Reference Manual:
CLOSQLCSR Specifies when SQL cursors are implicitly closed, SQL prepared
statements are implicitly discarded, and LOCK TABLE locks are released.
SQL
cursors are explicitly closed when you issue the CLOSE, COMMIT, or
ROLLBACK
(without HOLD) SQL statements. This option will be ignored in REXX.
*ENDACTGRP and *ENDMOD are for use by ILE programs and modules, SQL
functions, SQL procedures, or SQL triggers. *ENDPGM, *ENDSQL, and *ENDJOB
are for use by non-ILE programs. *ENDACTGRPSQL cursors are closed, SQL
prepared statements are implicitly discarded, and LOCK TABLE locks are
released when the activation group ends. *ENDMODSQL cursors are closed
and
SQL prepared statements are implicitly discarded when the module is
exited.
LOCK TABLE locks are released when the first SQL program on the call
stack
ends. *ENDPGMSQL cursors are closed and SQL prepared statements are
discarded when the program ends. LOCK TABLE locks are released when the
first SQL program on the call stack ends.

From the Compile Listing:
Source type...............RPG
Object name...............T50MODS/CPGETART
Source file...............T50MODS/QRPGLESRC
Member....................CPGETART
To source file............QTEMP/QSQLTEMP1
Options...................*LSTDBG
RPG preprocessor options..*NONE
Listing option............*NONE
Target release............V7R1M0
INCLUDE file..............*SRCFILE
Commit....................*NONE
Allow copy of data........*OPTIMIZE
Close SQL cursor..........*ENDACTGRP
Allow blocking............*ALLREAD
Delay PREPARE.............*NO

204 CloSQLCsr = *EndPgm;
MSG ID SEV RECORD
TEXT
SQL0104 30 204 Position 23 Token ENDPGM was not valid. Valid
tokens:
ENDACTGRP
ENDMOD.

What am I doing wrong?
Shouldn't this work?

--
Jeff Young
Sr. Programmer Analyst
--
This is the RPG programming on the IBM i (AS/400 and 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 IBM i (AS/400 and 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 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.