[INHERIT('sys$library:starlet', 'sys$library:pascal$lib_routines')] PROGRAM Use_Trnlnm(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(2); Translated_Name : [VOLATILE] VARYING [132] OF CHAR; Status : INTEGER; BEGIN { Specify the buffer to return the translation } Item_List[1].Buffer_Length := SIZE(Translated_Name.Body); Item_List[1].Item_Code := LNM$_String; Item_List[1].Buffer_Addr := IADDRESS(Translated_Name.Body); Item_List[1].Return_Addr := IADDRESS(Translated_Name.Length); { Terminate the item list } Item_List[2].Terminator := 0; { Translate the SYS$SCRATCH logical name } Status := $trnlnm(Tabnam := 'LNM$FILE_DEV', Lognam := 'SYS$SCRATCH', Itmlst := Item_List); IF NOT ODD(Status) THEN LIB$Stop(Status); WRITELN('SYS$SCRATCH is equivalent to ',Translated_Name); END.