[INHERIT('sys$library:starlet', 'sys$library:pascal$lib_routines')] PROGRAM Use_Sndjbc(INPUT,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(4); File_To_Print : [VOLATILE] VARYING [132] OF CHAR; Queue_To_Use : [VOLATILE] VARYING [132] OF CHAR; JBC_Status_Line : [VOLATILE] VARYING [132] OF CHAR; Status : INTEGER; BEGIN WRITE('File to print? '); READLN(file_to_print); WRITE('Queue to use? '); READLN(queue_to_use); { Choose the queue to use } Item_List[1].Buffer_Length := LENGTH(Queue_To_Use); Item_List[1].Item_Code := SJC$_Queue; Item_List[1].Buffer_Addr := IADDRESS(Queue_To_Use.Body); Item_List[1].Return_Addr := 0; { Provide the file specification } Item_List[2].Buffer_Length := LENGTH(File_To_Print); Item_List[2].Item_Code := SJC$_File_Specification; Item_List[2].Buffer_Addr := IADDRESS(File_To_Print.Body); Item_List[2].Return_Addr := 0; { Reqeust return status line } Item_List[3].Buffer_Length := SIZE(JBC_Status_Line.Body); Item_List[3].Item_Code := SJC$_Job_Status_Output; Item_List[3].Buffer_Addr := IADDRESS(JBC_Status_Line.Body); Item_List[3].Return_Addr := IADDRESS(JBC_Status_Line.Length); { Terminate the item list } Item_List[4].Terminator := 0; Status := $sndjbcw( Func := SJC$_Enter_File, Itmlst := Item_List ); IF NOT ODD(Status) THEN LIB$Stop(Status); WRITELN(JBC_Status_Line); END.