$! ********************************************************************** $! * CLEAR_QUEUE.COM * $! * Remove ALL entries in the specified queue P1. * $! * * $! * This software has been released into public domain. This * $! * software may be freely copied, distributed, and modified so * $! * long as it contains this message. This software is provided * $! * as is, free of charge. The author assumes no responsibility * $! * or liability for the use of this software. * $! * * $! * Richware http://richj.home.mindspring.com/Richware * $! * * $! * 10/29/92 RDJ Command Procedure Creation. * $! ********************************************************************** $! $ WO = "Write SYS$OUTPUT" $ If P1 .EQS. "" Then - Goto No_Param $ P2 = F$Extract(0,3,F$Edit(P2,"Trim,UpCase")) $ Retained = "FALSE" $ If P2 .EQS. "RET" Then Retained = "TRUE" $! $ WO "" $ If Retained $ Then $ WO "This procedure will remove all RETAINED entries in the ''P1' queue." $ Else $ WO "This procedure will remove ALL entries in the ''P1' queue." $ EndIf $ Inquire/NoPunc Answer "Are you sure you want to proceed (y/n)? " $ Answer = F$Extract(0,1,F$Edit(Answer,"Trim,UpCase")) $ If Answer .NES. "Y" Then Exit $ Nada = F$GetQui("Cancel_Operation",,,) $ Queue_Name = F$GetQui("Display_Queue","Queue_Name",P1,"All_Jobs,Wildcard") $ WO "" $ Num_Entries = 0 $! $ Loop: $ Entry = F$GetQui("Display_Job","Entry_Number",,"All_Jobs,Wildcard") $ If Entry .EQS. "" Then Goto No_More_Entries $ Job_Retained = F$GetQui("Display_Job","Job_Retained",,"All_Jobs,Freeze_Context") $ Job_Name = F$GetQui("Display_Job","Job_Name",,"All_Jobs,Freeze_Context") $ If Retained .AND. (Job_Retained .EQS. "FALSE") Then - Goto Loop $ WO "Removing Entry ''Entry' (''Job_Name')." $ Delete/Entry='Entry' $ Num_Entries = Num_Entries + 1 $ Goto Loop $! $ No_More_Entries: $ WO "" $ WO "Deleted ''Num_Entries' entries from ''Queue_Name'." $ Exit $! $ No_Param: $ WO "Syntax: @CLEAR_QUEUE " $ Exit