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



Thanks Bryan, that was the issue.

I was using QUSSCD (dtLstChg) at offset 72 which had the file change date.
QUSCD04 at offset 161 has the member change date.

Ron
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> On Behalf Of Bryan Dietz
Sent: Monday, August 6, 2018 10:06 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: API for file last change date

I believe the dtLstChg field is for the file object and not the file member. As I recall that date/time will be updated when a CHGPF or RMV/ADDPFM.

I think you need to use the MBRD0200 to get last change date for the member.

Bryan

Hudson, Ron wrote on 8/6/2018 9:54 AM:
Hi Scott,

Birgitta's SQL solution gave me what I needed. No need to waste a lot of time on this, but I am curious why QUSRMBRD did not return what I needed.

Below is the code, copied from somewhere on the web.....

D szMbrd0100 DS INZ
D nBytesRtn 10I 0
D nBytesAval 10I 0
D szFileName 10A
D szLibName 10A
D szMbrName 10A
D szFileAttr 10A
D szSrcType 10A
D dtCrtDate 13A
D dtLstChg 13A
D szMbrText 50A
D bIsSource 1A
D RmtFile 1A
D LglPhyFile 1A
D ODPSharing 1A
D filler2 2A
D**** RECORD COUNT
D RecCount 10I 0
D DltRecCnt 10I 0
D DataSpaceSz 10I 0
D AccpthSz 10I 0
D NbrBasedOnMbr 10I 0

D nBufLen S 10I 0
D szFmt S 8A Inz('MBRD0100')
D szQualName S 20A
D szSrcMbr S 10A
D bOvr S 1A Inz('0')
/free
//*****************************************************

szQualName = 'RQAVLPF ' + '@DATAX ';
nBufLen = %size(szMbrD0100);
szSrcMbr = 'RQAVLPF';

C Call(E) 'QUSRMBRD'
C Parm szMbrD0100
C Parm nBufLen
C Parm szFmt
C Parm szQualName
C Parm szSrcMbr
C Parm bOvr

Here are the results, DTLSTCHG is blanks:
EVAL szMbrD0100
NBYTESRTN OF SZMBRD0100 = 135
NBYTESAVAL OF SZMBRD0100 = 135
SZFILENAME OF SZMBRD0100 = 'RQAVLPF '
SZLIBNAME OF SZMBRD0100 = '@DATAX '
SZMBRNAME OF SZMBRD0100 = 'RQAVLPF '
SZFILEATTR OF SZMBRD0100 = 'PF '
SZSRCTYPE OF SZMBRD0100 = ' '
DTCRTDATE OF SZMBRD0100 = '1180802132901'
DTLSTCHG OF SZMBRD0100 = ' '
SZMBRTEXT OF SZMBRD0100 = 'AVL data '

DSPFD displays the following
Source Creation Last Change Deleted
Member Size Type Date Date Time Records Records
RQAVLPF 1204224 08/02/18 08/02/18 14:46:37 1812 0


Thanks
Ron

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

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.