× 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.



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?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.