Abello,
I wrote this program some time ago; maybe its usefull for you. It produces a text file called DUDATA. (if emailsupport isnt sl-ed, you can skip it)
$Set Installation 1
Begin
Array
Gsa[0:49],
Info[0:1000],
Units[0:99],
Name[0:3],
Named[0:3],
Disp[0:8],
Std[0:20],
Outp[0:1,0:8];
Boolean
B;
String
Dummy;
Integer
NoOfUnits,
I,
Unit,
Entry;
Pointer
P,
P1,
P2,
Pe,
Po;
Real
V1,
V2,
Rslt=B;
Define % Unit type values
DiskType = 17#;
Define
CaseF = [04:05]#,
SubCaseF = [12:08]#,
UnitTypeF = [47:08]#;
Define
BaseUnit = Integer(Info[21]) Eql Unit#,
NameLen = Integer(Info[18].[47:08])#,
StartOfName = Info[18].[39:40]#,
FamilyIndex = Info[16].[35:8]#;
Define
Delim = ","#,
Space = " "#,
TotalSpace = Gsa[9].[47:48]#,
Available = Gsa[1].[47:48]#,
SectorSize = Gsa[10].[47:48]#,
IT = Decimal(String(TotalSpace,12))#,
IA = Decimal(String(Available,12))#;
File
TTY(
Kind=Remote),
DuData(
NewFile,
Kind=Disk,
Protection=Save);
Library EmailSupport(LibAccess=ByFunction);
Real Procedure Email(Pe); Value Pe; Pointer Pe;
Library EmailSupport;
Truthset
Letters(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
V1:=0 & 22 CaseF & 0 SubCaseF;
V2:=7;
B:=SystemStatus(Info,V1,V2);
Entry:=1;
P1:=Units[0];
While Integer(Info[Entry]) Neq 0 Do Begin
If Info[Entry+1].UnitTypeF Eql DiskType Then Begin
NoOfUnits:=*+1;
Replace P1:P1 By Integer(Info[Entry]);
End;
Entry:=*+2;
End;
Resize (Outp, NoOfUnits+1, Retain);
Replace Outp[0,0] By "Name,Index,Unit,TotSpace,",
"Avail,Sectors";
Write(DuData,//,Pointer(Outp[0,0]));
V1:=0 & 28 CaseF & 0 SubCaseF;
Entry:=0;
While Integer(Units[Entry]) Neq 0 Do Begin
Unit:=Integer(Units[Entry]);
B:=SystemStatus(Info,V1,Unit);
P:=Named[0];
Replace P By StartOfName, Info[19],Info[20];
P:=*+1;
P2:=Name[0];
Replace P2 By P Until Eql 48"00",".";
Replace Disp[0] By P2 Until Eql ".", ".";
DisplayToStandard (Pointer(Disp), Pointer(Std[0]));
Gsa[0]:=3;
Gsa[1]:=Integer(FamilyIndex);
Gsa[2]:=504;
Replace Gsa[3] By Std For 3 Words;
If Not B:=Getstatus (0 & 3[07:08] & 6 [15:08], 1, 0, Gsa)
Then Begin
Po:=Outp[Entry+1, 0];
Replace Po:Po By P2 Until Eql ".",Delim,
FamilyIndex For * Numeric, Delim,
Units[Entry] For * Numeric, Delim,
TotalSpace For * Numeric, Delim,
Available For * Numeric, Delim,
SectorSize For * Numeric;
Write(DuData,//,Pointer(Outp[Entry+1,0]));
Entry:=*+1;
End;
End;
%Programdump (Arrays);
End.
Op donderdag 4 april 2013 17:12:09 UTC+2 schreef Andres Abello het volgende: