[INHERIT('sys$library:starlet', 'sys$library:pascal$lib_routines')] PROGRAM Use_Getdviw(OUTPUT); TYPE Item_List_Cell = RECORD CASE INTEGER OF 1: ( { Normal Cell } Buffer_Length : [WORD] 0..65535; Item_Code : [WORD] 0..65535; Buffer_Addr : UNSIGNED; Return_Addr : UNSIGNED ); 2:( { Terminator } Terminator : UNSIGNED ); END; Item_List_Template(Count:INTEGER) = ARRAY [1..Count] OF Item_List_Cell; VAR Item_List : Item_List_Template(3); Allocation_Class : [VOLATILE] INTEGER; Host_Name : [VOLATILE] VARYING [15] OF CHAR; Status : INTEGER; BEGIN { Get the Host Name } Item_List[1].Buffer_Length := SIZE(Host_Name.Body); Item_List[1].Item_Code := DVI$_Host_Name; Item_List[1].Buffer_Addr := IADDRESS(Host_Name.Body); Item_List[1].Return_Addr := IADDRESS(Host_Name.Length); { Get the Allocation Class } Item_List[2].Buffer_Length := SIZE(Allocation_Class); Item_List[2].Item_Code := DVI$_Alloclass; Item_List[2].Buffer_Addr := IADDRESS(Allocation_Class); Item_List[2].Return_Addr := 0; { Fill in the Terminator } Item_List[3].Terminator := 0; { Ask about SYS$DISK: } Status := $getdviw(Devnam := 'SYS$DISK', Itmlst := Item_List); IF NOT ODD(Status) THEN LIB$Stop(Status); WRITELN('Allocation Class = ',Allocation_Class:1); WRITELN('Host Name = ',Host_Name); END.