|
HI All,
Need some help with this as I cannot find an example.
I have a filename that is input as a parm.
I prepare the sql statement with the variable filename, then declare, open,
fetch/update loop and close.
Now when I update the current record all samples I have seen are using a
hard coded filename.
I believe I could get around with a sql execute immediate but would like to
stick with WHERE CURRENT OF.
Any help appreciated.
Here are the relevant bits....It's the 'Update @FileName' below that throws
me off.
DCL-S SelectSQL Like(StdLTxtVar)
Inz('Select keyValues from &1 FOR UPDATE OF
TOKEN');
// Replace marker with file name
SelectSQL = %ScanRpl('&1' :@FileName :SelectSQL);
exec sql
Prepare S1 from :SelectSQL;
exec sql
declare C1 cursor for S1;
exec sql
open C1;
exec sql
fetch next from C1 into :KeyValues;
WrkToken = xmlTransaction(keyValues :Mode :@LoadName :groupID);
exec sql
Update @FileName
Set Token = :WrkToken
WHERE CURRENT OF C1;
Thanks in advance...
- Steve
--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-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 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.