Hi
I was curios if in RPGLE program i can populate data in local variables
using dynamic sql query for example

Where i can pass templib and tempfile from other program, all the tables
will have these 2 columns

dtemplib s 10a inz('QTEMP')
dtempfile s 10a inz('myfile')
d date1 s d
d time1 s t

MyStatement = 'select (date(JOTSTP)), (time(JOTSTP)) '
+ 'into :date1 , :time1 from '
+ %TrimR(templib) + '/' + %TrimR(tempfile)
+ ' ORDER BY JOTSTP desc fetch first 1 row only ';

Exec SQL
Execute Immediate :MyStatement;

This is not working for me at all



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.