<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=List.Path.Readu</id>
	<title>List.Path.Readu - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=List.Path.Readu"/>
	<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=List.Path.Readu&amp;action=history"/>
	<updated>2026-04-28T22:10:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://pickwiki.org/index.php?title=List.Path.Readu&amp;diff=1990&amp;oldid=prev</id>
		<title>Conversion script: link fix</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=List.Path.Readu&amp;diff=1990&amp;oldid=prev"/>
		<updated>2015-02-26T23:48:55Z</updated>

		<summary type="html">&lt;p&gt;link fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This program reads in &amp;lt;tt&amp;gt;list.readu&amp;lt;/tt&amp;gt; output and changes the device number and inode to pathname.&lt;br /&gt;
Needs program dskdevno.c compiled and available. Others call it devices.c. The output is path space device number. The paths are the attached file systems.&lt;br /&gt;
&lt;br /&gt;
Requires a file: INODE.XREF to be built in a common area.&lt;br /&gt;
Make pointers in other VOCs where needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       INODE.XREF&lt;br /&gt;
0001: F&lt;br /&gt;
0002: /pathto/common/area[[/INODE]].XREF&lt;br /&gt;
0003: /pathto/common/area[[/D_INODE]].XREF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you know the number of files on your system, divide by 20, make prime, resize to that modulo with a sep of 4. If you don&amp;#039;t know at all use 10007. After filling it up, do file.stat and resize to better design.&lt;br /&gt;
&lt;br /&gt;
Usage: &amp;lt;pre&amp;gt;&amp;gt;RUN XBP LIST.PATH.READU [REBUILD | [EVERY | &amp;quot;&amp;quot; ] ] [ WRAP ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you may rescale the width of the display for pathname by changing the size of ADJ variable in the program, Line: 170, 176, &amp;amp; 181. For wide, wrap, and normal.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* TITLE:  LIST.PATH.READU&lt;br /&gt;
* AUTH: Rich Sias&lt;br /&gt;
* DATE: 05/15/2003&lt;br /&gt;
* ID:   LIST.PATH.READU&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
*Narrative:&lt;br /&gt;
*----------------------&lt;br /&gt;
* Takes LIST.READU command and detemines pathname from device number&lt;br /&gt;
* and inode. Alters display depending on screen width.&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* EXT CALLS            NONE&lt;br /&gt;
* FILES READ:          INODE.XREF&lt;br /&gt;
* FILES UPDATE:        INODE.XREF&lt;br /&gt;
* CONSTANTS UPDATE:    NONE&lt;br /&gt;
* RESTART INSTRUCTIONS NONE&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* MODIFICATIONS&lt;br /&gt;
* mm-dd-yy Login (sar######) Description&lt;br /&gt;
*&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
*&lt;br /&gt;
* include section: &amp;quot;COMMON&amp;quot; include files should be preceded&lt;br /&gt;
*                  &amp;quot;EQUATES&amp;quot; include files&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
$INCLUDE MERCY.COMMON STANDARD.EQUATES&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* equate section&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* initialization section: do not include variables that are&lt;br /&gt;
*---------------------- re-initialized prior to usage ------------------&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
      PROG.ID = &amp;quot;LIST.PATH.READU&amp;quot;&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* open-file section: use OPEN.FILE routine to open files&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* main program body&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
      GET(ARG.) COND ELSE COND = &amp;quot;&amp;quot;&lt;br /&gt;
      BEGIN CASE&lt;br /&gt;
         CASE COND = &amp;quot;REBUILD&amp;quot;&lt;br /&gt;
            GOSUB REBUILD&lt;br /&gt;
         CASE COND = &amp;quot;SILLY&amp;quot;&lt;br /&gt;
         CASE COND = &amp;quot;FUFU&amp;quot;&lt;br /&gt;
         CASE 1&lt;br /&gt;
            GOSUB LIST.READU&lt;br /&gt;
      END CASE&lt;br /&gt;
      RETURN&lt;br /&gt;
&lt;br /&gt;
* This is the final return and should cause the logic to exit the pgm&lt;br /&gt;
&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
* subroutines: include desc ( function, variables used and changed, etc)&lt;br /&gt;
*-----------------------------------------------------------------------&lt;br /&gt;
********************&lt;br /&gt;
$INCLUDE HELP&lt;br /&gt;
********************&lt;br /&gt;
&lt;br /&gt;
      **************&lt;br /&gt;
REBUILD:&lt;br /&gt;
      **************&lt;br /&gt;
      * Clear then open the data file.&lt;br /&gt;
      ECMD = &amp;quot;CLEAR.FILE INODE.XREF&amp;quot;&lt;br /&gt;
      EXECUTE ECMD&lt;br /&gt;
      OPEN &amp;quot;INODE.XREF&amp;quot; TO XREF ELSE STOP 204,&amp;quot;INODE.XREF&amp;quot;&lt;br /&gt;
      * Gather disk device numbers for all file systems.&lt;br /&gt;
      UNIX = &amp;#039;dskdevno.3k|grep -v mirror&amp;#039;&lt;br /&gt;
      EXECUTE &amp;quot;SH -c&amp;quot;:QUOTE(UNIX),/[[/OUT]].&amp;gt;CAP&lt;br /&gt;
      CAP = CONVERT(&amp;quot; &amp;quot;,@VM,TRIM(CAP))&lt;br /&gt;
      KNT = DCOUNT(CAP,@FM)&lt;br /&gt;
&lt;br /&gt;
      * Weed out blank &amp;amp; root responses.&lt;br /&gt;
      IF CAP&amp;lt;KNT,1&amp;gt; &amp;lt; &amp;quot;  &amp;quot; THEN&lt;br /&gt;
         CAP = FIELD(CAP,@FM,2,KNT-2)&lt;br /&gt;
         KNT -= 2&lt;br /&gt;
      END ELSE&lt;br /&gt;
         CAP = FIELD(CAP,@FM,2,KNT-1)&lt;br /&gt;
         KNT -= 1&lt;br /&gt;
      END&lt;br /&gt;
      IF CAP&amp;lt;KNT,1&amp;gt; &amp;lt; &amp;quot;  &amp;quot; THEN&lt;br /&gt;
         CAP = FIELD(CAP,@FM,1,KNT-1)&lt;br /&gt;
         KNT -= 1&lt;br /&gt;
      END&lt;br /&gt;
      * Initialize conditions.&lt;br /&gt;
      DAMT = KNT&lt;br /&gt;
      J = 0&lt;br /&gt;
      *** (DIRS.TO.CHK is a mv string with all the file systems)&lt;br /&gt;
      * First value is path, second is device number.&lt;br /&gt;
      DIRS.TO.CHK = CAP&lt;br /&gt;
      OK = 1&lt;br /&gt;
&lt;br /&gt;
      * Loop through all file systems.&lt;br /&gt;
      FOR I = 1 TO DAMT&lt;br /&gt;
         * Get working dir and device number.&lt;br /&gt;
         DIR = DIRS.TO.CHK&amp;lt;I,1&amp;gt;&lt;br /&gt;
         DIR1 = DIR&lt;br /&gt;
         DEVNO = DIRS.TO.CHK&amp;lt;I,2&amp;gt;&lt;br /&gt;
         * Get the inodes of all items in file system.&lt;br /&gt;
         STMT = &amp;#039;sh -c &amp;quot;ls -lRi &amp;#039;:DIR:&amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
         EXECUTE STMT CAPTURING DIR.REC&lt;br /&gt;
         VAMT = DCOUNT(DIR.REC,@FM)&lt;br /&gt;
         DIR.REC = CHANGE(TRIM(DIR.REC),&amp;quot; &amp;quot;,@VM)&lt;br /&gt;
         CRT I, DAMT, VAMT, J, DIR&lt;br /&gt;
         * Loop through all items in file system.&lt;br /&gt;
         FOR J = 1 TO VAMT&lt;br /&gt;
            LINE = DIR.REC&amp;lt;J&amp;gt;&lt;br /&gt;
            BEGIN CASE&lt;br /&gt;
               CASE LINE EQ &amp;quot;&amp;quot;&lt;br /&gt;
                  * Empty line.&lt;br /&gt;
               CASE LINE&amp;lt;1,1&amp;gt;[1,1] EQ &amp;quot;/&amp;quot;&lt;br /&gt;
                  * Line has new dir name.&lt;br /&gt;
                  * OK means local path, not a mount point.&lt;br /&gt;
                  IF OK THEN OLD.DIR = &amp;quot;PASS&amp;quot;&lt;br /&gt;
                  FLIP = 0&lt;br /&gt;
                  LOD = LEN(OLD.DIR)&lt;br /&gt;
                  DIR1 = FIELD(LINE&amp;lt;1,1&amp;gt;,&amp;quot;:&amp;quot;,1)&lt;br /&gt;
                  * Check if dir is a mount point.&lt;br /&gt;
                  FIND DIR1 IN DIRS.TO.CHK SETTING BEGN,PTR THEN&lt;br /&gt;
                     OK = 0&lt;br /&gt;
                     * Retain old mount point dir.&lt;br /&gt;
                     OLD.DIR = DIR1&lt;br /&gt;
                  END ELSE&lt;br /&gt;
                     * Check if new dir is sub dir of interim mount pt.&lt;br /&gt;
                     IF OLD.DIR = DIR1[1,LOD] THEN OK = 0&lt;br /&gt;
                        ELSE OK = 1&lt;br /&gt;
                  END&lt;br /&gt;
               CASE LINE&amp;lt;1,11&amp;gt; # &amp;quot;&amp;quot;&lt;br /&gt;
                  * Line begins with device number.&lt;br /&gt;
                  IF OK THEN&lt;br /&gt;
                     * OK means is not a mount point within file system.&lt;br /&gt;
                     INODE = LINE&amp;lt;1,2&amp;gt;&lt;br /&gt;
                     FNAM = LINE&amp;lt;1,11&amp;gt;&lt;br /&gt;
                     PATH = DIR1:&amp;quot;/&amp;quot;:FNAM&lt;br /&gt;
                     WRITE PATH ON XREF,DEVNO:&amp;quot;*&amp;quot;:INODE&lt;br /&gt;
                        ELSE CRT &amp;#039;BAD DEAL &amp;#039;:PATH&lt;br /&gt;
                  END&lt;br /&gt;
               CASE 1&lt;br /&gt;
            END CASE&lt;br /&gt;
*        ---&lt;br /&gt;
*          bla bla bla - I go create an xref file, (I did it above.)&lt;br /&gt;
*         ---&lt;br /&gt;
         NEXT J&lt;br /&gt;
      NEXT I&lt;br /&gt;
      RETURN&lt;br /&gt;
&lt;br /&gt;
************&lt;br /&gt;
LIST.READU:&lt;br /&gt;
************&lt;br /&gt;
      WRAP = 0&lt;br /&gt;
      OPEN &amp;quot;INODE.XREF&amp;quot; TO XREF ELSE STOP 204,&amp;quot;INODE.XREF&amp;quot;&lt;br /&gt;
      * Get all pass parameters.&lt;br /&gt;
      GET(ARG.) COND1 THEN&lt;br /&gt;
         IF COND1 = &amp;quot;WRAP&amp;quot; THEN WRAP = 1 ; COND1 = &amp;quot;&amp;quot;&lt;br /&gt;
      END&lt;br /&gt;
         ELSE COND1 = &amp;quot;&amp;quot;&lt;br /&gt;
      GET(ARG.) COND2 THEN&lt;br /&gt;
         IF COND2 = &amp;quot;WRAP&amp;quot; THEN WRAP = 1 ; COND2 = &amp;quot;&amp;quot;&lt;br /&gt;
      END&lt;br /&gt;
         ELSE COND2 = &amp;quot;&amp;quot;&lt;br /&gt;
      GET(ARG.) COND3 THEN&lt;br /&gt;
         IF COND3 = &amp;quot;WRAP&amp;quot; THEN WRAP = 1 ; COND3 = &amp;quot;&amp;quot;&lt;br /&gt;
      END&lt;br /&gt;
         ELSE COND3 = &amp;quot;&amp;quot;&lt;br /&gt;
      * Set size parameters for formatting. ADJ is for width of output.&lt;br /&gt;
      BEGIN CASE&lt;br /&gt;
         CASE WRAP&lt;br /&gt;
            * Allows full path and all data to be shown.&lt;br /&gt;
            ADJ = 30&lt;br /&gt;
            GWID = ADJ + 12&lt;br /&gt;
            PWID = ADJ + 7&lt;br /&gt;
            RWID = ADJ - 4&lt;br /&gt;
         CASE @CRTWIDE &amp;gt; 97&lt;br /&gt;
            * For wide screen support, no wraps and full formatting.&lt;br /&gt;
            ADJ = 30&lt;br /&gt;
            GWID = ADJ + 12&lt;br /&gt;
            PWID = ADJ + 7&lt;br /&gt;
            RWID = ADJ + 7&lt;br /&gt;
         CASE 1&lt;br /&gt;
            ADJ = 26&lt;br /&gt;
            * For little screens just let letters wrap to beginng of line.&lt;br /&gt;
            GWID = ADJ + 12&lt;br /&gt;
            PWID = ADJ + 7&lt;br /&gt;
            RWID = ADJ + 7&lt;br /&gt;
      END CASE&lt;br /&gt;
      * Get list.readu data.&lt;br /&gt;
      ECMD = &amp;quot;LIST.READU &amp;quot;:COND:&amp;quot; &amp;quot;:COND1:&amp;quot; &amp;quot;:COND2:&amp;quot; INTERNAL&amp;quot;&lt;br /&gt;
      EXECUTE ECMD,/[[/OUT]].&amp;gt;GRAB&lt;br /&gt;
      * Make up header info for list.readu.&lt;br /&gt;
      HDRF = &amp;quot;Active File Locks:&amp;#039;L&amp;#039;&amp;quot;:SPACE(RWID- 9):&amp;quot;Pathname &amp;quot;&lt;br /&gt;
      HDRF := &amp;#039;[[UsrNo]] Lmode   Pid Login ID&amp;#039;&lt;br /&gt;
      HDRG = &amp;quot;Active Group Locks:&amp;quot;:SPACE(GWID)&lt;br /&gt;
      HDRG := &amp;quot;Rec Grp Grp Grp&amp;#039;L&amp;#039;&amp;quot;:SPACE(RWID- 8):&amp;quot;Pathname &amp;quot;&lt;br /&gt;
      HDRG := &amp;#039;[[UsrNo]] Lmode G-Address Lcks .RD&amp;#039;&lt;br /&gt;
      HDRG := &amp;#039; .SH .EX&amp;#039;&lt;br /&gt;
      HDRR = &amp;quot;Active Record Locks:&amp;#039;L&amp;#039;&amp;quot;:SPACE(RWID- 8):&amp;quot;Pathname &amp;quot;&lt;br /&gt;
      HDRR := &amp;#039;[[UsrNo]] Lmode   Pid Login ID Item-ID&amp;#039;&lt;br /&gt;
      OLD.CT = 0                         ; * Determines when to print revised hea&lt;br /&gt;
der.&lt;br /&gt;
      * Ignore the last &amp;quot;field&amp;quot; (line), it is empty.&lt;br /&gt;
      KNT = COUNT(GRAB,@FM)&lt;br /&gt;
      FOR I = 1 TO KNT&lt;br /&gt;
         LCT = DCOUNT(GRAB&amp;lt;I&amp;gt;,@VM)&lt;br /&gt;
         IF OLD.CT # LCT THEN&lt;br /&gt;
            * Need new header info printed.&lt;br /&gt;
            BEGIN CASE&lt;br /&gt;
               CASE LCT EQ 9&lt;br /&gt;
                  HEADING HDRF&lt;br /&gt;
                  OLD.CT = LCT&lt;br /&gt;
               CASE LCT EQ 12&lt;br /&gt;
                  HEADING HDRG&lt;br /&gt;
                  IF I &amp;gt; 2 THEN&lt;br /&gt;
                     HDG = EREPLACE(HDRG,&amp;quot;&amp;#039;L&amp;#039;&amp;quot;,@FM)&lt;br /&gt;
                     PRINT&lt;br /&gt;
                     PRINT HDG&amp;lt;1&amp;gt;&lt;br /&gt;
                     PRINT HDG&amp;lt;2&amp;gt;&lt;br /&gt;
                  END&lt;br /&gt;
                  OLD.CT = LCT&lt;br /&gt;
               CASE LCT EQ 10&lt;br /&gt;
                  HEADING HDRR&lt;br /&gt;
                  IF I &amp;gt; 2 THEN&lt;br /&gt;
                     * GOSUB PRT.HDR&lt;br /&gt;
                     HDG = EREPLACE(HDRR,&amp;quot;&amp;#039;L&amp;#039;&amp;quot;,@FM)&lt;br /&gt;
                     PRINT&lt;br /&gt;
                     PRINT HDG&amp;lt;1&amp;gt;&lt;br /&gt;
                     PRINT HDG&amp;lt;2&amp;gt;&lt;br /&gt;
                  END&lt;br /&gt;
                  OLD.CT = LCT&lt;br /&gt;
               CASE 1&lt;br /&gt;
            END CASE&lt;br /&gt;
         END&lt;br /&gt;
         * Read path info from XREF file.&lt;br /&gt;
         READ PATH FROM XREF,GRAB&amp;lt;I,1&amp;gt;:&amp;quot;*&amp;quot;:GRAB&amp;lt;I,2&amp;gt;&lt;br /&gt;
            ELSE PATH = &amp;#039; bum deal&amp;#039;&lt;br /&gt;
         * Begin printing.&lt;br /&gt;
         PRINT FMT(PATH,PWID:&amp;quot;R&amp;quot;):&lt;br /&gt;
         * Check for wrap (fold) condition.&lt;br /&gt;
         IF WRAP THEN&lt;br /&gt;
            CRT&lt;br /&gt;
            CRT SPACE(RWID):&lt;br /&gt;
         END&lt;br /&gt;
         * Print second third of output.&lt;br /&gt;
         PRINT GRAB&amp;lt;I,4&amp;gt;&amp;quot;6R&amp;quot;:GRAB&amp;lt;I,5&amp;gt;&amp;quot;3R&amp;quot;:GRAB&amp;lt;I,6&amp;gt;&amp;quot;3R&amp;quot;:&lt;br /&gt;
         BEGIN CASE&lt;br /&gt;
            CASE LCT EQ 9&lt;br /&gt;
               CRT GRAB&amp;lt;I,7&amp;gt;&amp;quot;6R&amp;quot;:GRAB&amp;lt;I,8&amp;gt;&lt;br /&gt;
            CASE LCT EQ 12&lt;br /&gt;
               CRT GRAB&amp;lt;I,7&amp;gt;&amp;quot;11R&amp;quot;:GRAB&amp;lt;I,8&amp;gt;&amp;quot;4R&amp;quot;:&lt;br /&gt;
               CRT GRAB&amp;lt;I,9&amp;gt;&amp;quot;4R&amp;quot;:GRAB&amp;lt;I,10&amp;gt;&amp;quot;4R&amp;quot;:GRAB&amp;lt;I,11&amp;gt;&amp;quot;4R&amp;quot;&lt;br /&gt;
            CASE LCT EQ 10&lt;br /&gt;
               CRT GRAB&amp;lt;I,7&amp;gt;&amp;quot;6R&amp;quot;:GRAB&amp;lt;I,8&amp;gt;&amp;quot;9R&amp;quot;:&amp;quot; &amp;quot;:GRAB&amp;lt;I,9&amp;gt;&lt;br /&gt;
            CASE 1&lt;br /&gt;
               CRT &amp;#039;    LCT = &amp;#039;:LCT&lt;br /&gt;
         END CASE&lt;br /&gt;
      NEXT I&lt;br /&gt;
      RETURN&lt;br /&gt;
&lt;br /&gt;
************&lt;br /&gt;
TERMINATION:&lt;br /&gt;
************&lt;br /&gt;
      PRINT &amp;#039;Terminating now &amp;#039;&lt;br /&gt;
      STOP&lt;br /&gt;
* last statement in a program don&amp;#039;t add code after this line&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Conversion script</name></author>
	</entry>
</feed>