|
Hi,
A newbie here...messing with CL...please let me know if I'm in the wrong
list.
I want to select all records from file VINLOG where IJDATE is 6 months ago
or later and IJTYPE is 1D, then insert them into QTEMP/CSDS. IJDATE format
is ccyymmdd (ex. 20041028)
Would I ??
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&QDATE)
Then the part I need help with I think, for below I need &CYMD to be
20040428, April 28th??? How can I do that?
OVRDBF FILE(VINLOG) SHARE(*YES)
OPNQRYF FILE((VINLOG)) QRYSLT(' IJDATE *GE ' || +
&CYMD || ' *AND IJTYPE *EQ ''1D'' ')
CPYFRMQRYF FROMOPNID(VINLOG) TOFILE(QTEMP/CSDS) +
MBROPT(*ADD) CRTFILE(*YES)
Or would it be easier with SQL? An example of that would be appreciated as
well...
Thanks,
Tim
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.