/* REXX *** */ ADDRESS SYSCALL PARSE SOURCE . . . . . . Envir . If Envir \= 'SH' then , IF SYSCALLS('ON')>3 Then Do SAY 'Unable to establish the SYSCALL environment' Exit 8 End PARSE ARG fname 'statvfs 'fname' stat.' SAY 'Fname = 'fname /* this is a list of variables returned by the service */ /* in numerical order */ /* it will be used as a lookup table for variable names */ /* for a symbolic link, lstat returns info for the link */ /* stat returns information for the object linked to */ stname = , 'BLOCKSIZE '||, 'TOTAL '||, 'INUSE '||, 'AVAIL '||, 'FRSIZE '||, 'BFREE '||, 'FILES '||, 'FFREE '||, 'FAVAIL '||, 'FSID '||, 'RDONLY '||, 'NOSUID '||, 'NAMEMAX '||, '**DUMMY** '||, 'INVARSEC '||, 'NOSEC '||, '?? ' Numeric Digits 10 DO i = 1 to stat.0 j = 11*i-10 Select When 0 then Nop When i = STFS_FILES & stat.i < 0 then , svalue = 4294967296 + stat.i When i = STFS_FFREE & stat.i < 0 then , svalue = 4294967296 + stat.i When i = STFS_FAVAIL & stat.i < 0 then , svalue = 4294967296 + stat.i When i = 14 then Iterate Otherwise svalue = stat.i End sname = SUBSTR(stname,j,11) /* look up name */ SAY 'STFS_'sname svalue END i exit 0