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



Paul:

Commands with *OUTFILE support, like DSPOBJD, let you specify where to put the resulting data.

You could then do something like this -- (for example with an outfile in QTEMP created with the DSPOBJD command), -- using SQL:

update QTEMP/DSPOBJD
set ODCDAT = substr(ODCDAT,5,2) || substr(ODCDAT,1,2) || substr(ODCDAT,3,2),
set ODSDAT = substr(ODSDAT,5,2) || substr(ODSDAT,1,2) || substr(ODSDAT,3,2),
set ODRDAT = substr(ODRDAT,5,2) || substr(ODRDAT,1,2) || substr(ODRDAT,3,2),
set ODLDAT = substr(ODLDAT,5,2) || substr(ODLDAT,1,2) || substr(ODLDAT,3,2),
set ODUDAT = substr(ODUDAT,5,2) || substr(ODUDAT,1,2) || substr(ODUDAT,3,2),
set ODTDAT = substr(ODTDAT,5,2) || substr(ODTDAT,1,2) || substr(ODTDAT,3,2),
set ODADAT = substr(ODADAT,5,2) || substr(ODADAT,1,2) || substr(ODADAT,3,2),
set ODJDAT = substr(ODJDAT,5,2) || substr(ODJDAT,1,2) || substr(ODJDAT,3,2)

to change all of those fields with dates stored as "MMDDYY" to "YYMMDD" in one pass over the file ...

Then, you can query more easily, sorting those dates is much easier, etc.

Hope that helps,

Mark S. Waterbury

> On 2/11/2015 11:01 AM, Steinmetz, Paul wrote:
I frequently need to compare object last use dates.
Some IBM output files QAEZDISK (use YMD while others (DSPOBJD, DSPFD) use MDY.
When MDY is used, I'm constantly breaking up the LUD into individual work fields, MM, DD, YY and then concatenating them back together with the century for the object date compare.
ODCDATCYMD ODCCEN || ODCDATY || ODCDATM || ODCDATD

Is there a better or easier way of accomplishing this?

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.