Thanks!!!

Quoting Charles Stevenson <[email protected]>:

> Diane -
> 
> Here's a short LIST.READU envelope that replaces dev/inode with filenames.
> 
> Look up these UV-supplied tools that tie device & Inode to the filename:
>     ACCOUNT.FILE.STATS
>     LIST.FILE.STATS
>     STAT.FILE
>     UNIVERSE.STAT.FILE
> 
> It relies on regularly running ACCOUNT.FILE.STATS to keep STAT.FILE up 
> to date.
> I added an index to UV's vanilla STAT.FILE and use it to extract the 
> filename.
> See lines 3 & 30:
> 
> 01:       PROGRAM SHOW.READU
> 02: * Abbreviated LIST.READU, but with filenames replacing device/inode.
> 03: * Relies on indexed I-desc DICT STAT.FILE INODE.DEV: 
> FILEINODE:".":FILEDEV
> 04:
> 05: $COPYRIGHT (c) 2012 Charles D. Stevenson. Permission to use with 
> attribution granted.
> 06: $OPTIONS DEFAULT
> 07:
> 08:       SENTENCE.OPTS = @SENTENCE[' ',2, 999 ]
> 09:       BEGIN CASE
> 10:          CASE NOT( LEN( SENTENCE.OPTS ))           ; * usual case
> 11:             EXECUTE 'LIST.READU EVERY' CAPTURING LRDU
> 12:             LOOP                         ; * ignore Group lock section
> 13:             UNTIL REMOVE( LRDU, MORE) = "Active Record Locks:"
> 14:             WHILE MORE
> 15:             REPEAT
> 16:             CRT "Active Record Locks:"
> 17:          CASE SENTENCE.OPTS = "SIMPLE"   ; * LIST.READU's default
> 18:             EXECUTE 'LIST.READU' CAPTURING LRDU
> 19:          CASE @TRUE ; l * any valid LIST.READU syntax
> 20:             EXECUTE 'LIST.READU ': SENTENCE.OPTS CAPTURING LRDU
> 21:       END CASE
> 22:       OPEN 'STAT.FILE' TO F.STAT ELSE STOP 201, 'STAT.FILE'
> 23:       MORE = @TRUE
> 24:       LOOP WHILE MORE
> 25:          LINE = REMOVE( LRDU, MORE )
> 26:          TRIMMED = TRIM( LINE )
> 27:          DEV = TRIMMED[ ' ', 1, 1 ]
> 28:          INODE = TRIMMED[ ' ', 2, 1 ]
> 29:          IF LEN( DEV ) ! LEN( INODE ) THEN
> 30:             SELECTINDEX 'INODE.DEV', INODE:'.':DEV FROM F.STAT TO 9
> 31:             READNEXT STAT.ID FROM 9 THEN
> 32:                READV FILENAME FROM F.STAT, STAT.ID, 1 THEN
> 33:                   LINE[1,29] = FILENAME '29.L#29'
> 34:                END
> 35:             END
> 36:          END
> 37:          CRT LINE
> 38:       REPEAT
> 39:       RETURN
> 40:    END
> 
> Catalogue it & run as a verb.
> Contact me if you have questions.
> 
> cds
> 
> On 3/16/2012 6:03 PM, [email protected] wrote:
> > I swear I wrote a new version of LIST.READU at one time where I dealt 
> > with this and listed the file where the item was locked, but I can't 
> > find it anywhere. And now, of course, I'm obsessed with finding it. If 
> > I find it I'll post it. -Dianne
> 
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
> 




_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to