(* FSSIZE - THIS WILL SHOW A LISTF,2 FORMAT BUT SORT BY ACCT *)
(* AND DECENDING SECTORS. *)
(* *)
VAR TEMP: STRING[40];
VAR ROPENFILE: TOPENFILE;
VAR DAYS: BOOLEAN;
VAR L_TODAY: DATE;
SUBROUTINE WRITEDISCINFO;
BEGIN
WRITE (SECTORS:9, ' ', NUMEXTENTS:2,
IF MAXEXTENTS=0 THEN ' *' ELSE STRWRITE(MAXEXTENTS:3));
END;
SUBROUTINE WRITEDAYINFO;
BEGIN
IF L_TODAY>ACCDATE THEN WRITE (L_TODAY-ACCDATE:6)
ELSE IF L_TODAY') ELSE WRITE (":6);
IF L_TODAY>MODDATE THEN WRITE (L_TODAY-MODDATE:5)
ELSE IF L_TODAY') ELSE WRITE (":5);
END;
L_TODAY:=TODAY;
DAYS:=NOT BVAR("MPEXLISTFNODAYS");
MPEXHEADER1:="FILENAME CODE ------------LOGICAL RECORD"+
"----------- ----SPACE----"+
IF DAYS THEN "-DAYS-" ELSE "";
MPEXHEADER2:=" SIZE TYP EOF "+
" LIMIT R/B SECTORS #X MX"+
IF DAYS THEN " ACC MOD" ELSE "";
MPEXHEADER3:="";
FOR RFILE IN MPEXFILESET
SORT (ACCOUNT:8, GROUP:8, SECTORS:'DESC')
PAGEHEAD
BEGIN
WRITELN ("");
WRITELN ("ACCOUNT= ", ACCOUNT:8, " GROUP= ", GROUP:8);
WRITELN ("");
WRITELN (MPEXHEADER1);
WRITELN (MPEXHEADER2);
WRITELN (MPEXHEADER3);
END
DO
BEGIN
IF OPENED THEN
ROPENFILEREAD (RFILE, UFID, ROPENFILE);
IF OPENED AND (ROPENFILE.READERS<>0 OR ROPENFILE.WRITERS<>0) THEN
NEEDLINES (1);
WRITEFILEOPENEDCODE;
IF ISDIR AND NOT NOEXPANDDIR THEN
WRITESUBDIR (' ==> ')
ELSE IF ISLINK THEN
BEGIN
WRITE (' Link: ', LINKTARGET:29);
IF LEN(OUTBUFFER)>53 THEN
BEGIN
WRITELN;
WRITE (":53);
END;
WRITEDISCINFO;
IF DAYS THEN WRITEDAYINFO;
WRITELN;
END
ELSE
BEGIN
WRITE (FMTRECSIZE:6:'RIGHTJUST', ' ', FMTTYPEC:5, EOF:10,
FLIMIT:11, BLOCKFACTOR:4);
WRITEDISCINFO;
IF DAYS THEN WRITEDAYINFO;
WRITELN;
IF OPENED AND (ROPENFILE.READERS<>0 OR ROPENFILE.WRITERS<>0) THEN
BEGIN
IF ROPENFILE.EOF<>EOF AND ROPENFILE.EOF<>-1 THEN
WRITE (":24, 'current ', ROPENFILE.EOF:6)
ELSE
WRITE (":24, ' ', ":6);
IF ROPENFILE.READERS>1 THEN
TEMP:=STRWRITE (ROPENFILE.READERS, ' readers')
ELSE IF ROPENFILE.READERS=1 THEN
TEMP:='1 reader'
ELSE TEMP:=";
IF ROPENFILE.READERS>0 AND ROPENFILE.WRITERS>0 THEN TEMP:=TEMP+', ';
IF ROPENFILE.WRITERS>1 THEN
TEMP:=TEMP+STRWRITE(ROPENFILE.WRITERS,' writers')
ELSE IF ROPENFILE.WRITERS=1 THEN
TEMP:=TEMP+'1 writer';
WRITE (TEMP:30:'RIGHT');
WRITELN;
END;
END;
END;