Thanks to everyone for this.  I found the problem.  The date
in the QUSLMBR API is only for PF-SRC files.

The last change date for the member IS in the QUSRMBRD API,
it's just hidden in there.  So there are actually two change
dates, last source change, and last change.  Odd, but it
works.

Brad

On Tue, 25 Sep 2001 13:42:48 -0500
 "Leif Svalgaard" <leif@attglobal.net> wrote:
> From: Brad Stone <brad@bvstools.com>
>
> > And V5R1.
> >
> > But yet PDM displays the last change date just fine.
> Is
> > there a system file somewhere that you could get this
> from?
> > That's why this is so curious.  It's there somewhere,
> but
> > WHERE?
> >
> Records for physical files are stored in members. A
> physical file can have
> one or more members. An MI-system object, called the
> cursor, identifies each
> member. A cursor can point directly to a data space (for
> arrival sequence
> files) or to a data space through a dataspace index (for
> keyed sequence
> files). The object type/subtype for a member cursor is
> x'0D50'. The cursor
> name consists firstly of the 10-character filename, then
> the 10-character
> member name and is finally padded out with blanks for a
> total of 30
> characters. Given that representation, we can then
> resolve a system pointer
> to the cursor using code similar to the following:
>
>     CPYBLA       RESOLVE-TYPE, X'0D50';
>     CPYBLAP      RESOLVE-NAME( 1:30), PARM-FILE, " ";
>     CPYBLA       RESOLVE-NAME(11:10), PARM-MEMBER;
>     RSLVSP      .CURSOR, RESOLVE, .CONTEXT, *;
>
> We build a space pointer to the associated space from the
> resolved system
> pointer with the "Set Space Pointer From
> Pointer"-instruction:
>
>     SETSPPFP    .CURSOR-SPACE, .CURSOR;
>
> The Member Header
> Investigating the associated space for the cursor we see
> that at offset x'04'
> there is a 4-byte binary value (x'00000490') that when
> added to the address
> of the associated space (x'.0007F0') points to an area
> (x'.000c80') where the
> member descriptive text, type and source change dates are
> stored. This area
> is known as the member header:
>
> DCL SPCPTR .CURSOR-SPACE;
> DCL SPC     CURSOR-SPACE BAS(.CURSOR-SPACE);
>     DCL DD  CSR-MBR-HEADER BIN(4) DEF(CURSOR-SPACE)
> POS(5);
>
> Further analysis (which I'll spare you) reveals that the
> format of the member
> header is as follows:
>
> DCL SPCPTR .MBR-HEADER;
> DCL SPC MBR-HEADER BAS(.MBR-HEADER);
>     DCL SYSPTR .MHDR-PREV-MCB         DIR;
>     DCL SYSPTR .MHDR-NEXT-MCB         DIR;
>     DCL SYSPTR .MHDR-FILE-CB          DIR;
>     DCL SYSPTR .MHDR-SHARE-DIR        DIR;
>     DCL SYSPTR .MHDR-DATA-DICT        DIR;
>
>     DCL DD MHDR-STATUS      CHAR(2)   DIR;
>     DCL DD *                CHAR(2)   DIR;
>     DCL DD MHDR-TEXT        CHAR(50)  DIR;
>     DCL DD MHDR-TYPE        CHAR(10)  DIR;
>     DCL DD *                CHAR(10)  DIR;
>
>     DCL DD MHDR-CHANGE-DATE CHAR(13)  DIR;
>     DCL DD MHDR-CREATE-DATE CHAR(13)  DIR;
>
>     DCL DD MHDR-PREFRD-UNIT CHAR(1)   DIR;
>     DCL DD MHDR-ALLOC-TYPE  CHAR(2)   DIR;
>     DCL DD MHDR-INIT-RECS   BIN(4)    DIR;
>     DCL DD MHDR-RECS-EXTEND BIN(2)    DIR;
>     DCL DD MHDR-NBR-EXTENDS BIN(2)    DIR;
>     DCL DD MHDR-RECOVER-OPT CHAR(1)   DIR;
>
>     DCL DD MHDR-SAVE-DATE   CHAR(13)  DIR;
>     DCL DD MHDR-RSTR-DATE   CHAR(13)  DIR;
>     DCL DD MHDR-%-DLT-ALLOW CHAR(1)   DIR;
>     DCL DD MHDR.USER-AREA   BIN(4)    DIR;
>     DCL DD MHDR-OLD-S-DATE  CHAR(13)  DIR;
>     DCL DD MHDR-OLD-R-DATE  CHAR(13)  DIR;
>     DCL DD MHDR...........  CHAR(1)   DIR;
>
> We can get a pointer to the member header by using the
> "Add to Space
>  Pointer"-instruction (ADDSPP) that adds the binary value
> at offset x'04'
> (which we'll use as the 3rd operand) to the space pointer
> to the associated
> space (which we'll use as the 2nd operand) yielding the
> required space
> pointer to the member header, returned to us by ADDSPP in
> the 1st operand:
>
>     ADDSPP      .MBR-HEADER, .CURSOR-SPACE,
> CSR-MBR-HEADER;
>
> Unfortunately, we cannot add a negative offset to get at
> the functional space
> of the object (where the system pointer is pointing to).
> If you try to, you
> get a run-time exception that the address is outside of
> the bounds of the
> associated space. What we really would like to do is to
> manufacture a space
> pointer directly from the system pointer. That problem we
> just solved in
> chapter 7 and we'll apply the solution here:
>
>     CPYBWP      .POINTER, .CURSOR;
>     CPYBREP      PTR-OFFSET, X'00';
>     CALLX       .MIMAKPTR, MIMAKPTR, *;
>
> And now we can access the modify-timestamp:
>
> DCL SPC     MBR-CURSOR BAS(.POINTER);
>     DCL DD  MBR-CHANGE-TIMESTAMP CHAR(8) DEF(MBR-CURSOR)
> POS(129);
>
>
>
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion
> (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/midrange-l.
>

Bradley V. Stone
BVS.Tools
www.bvstools.com


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.