$! XQT.COM $! $ VERIFY_AT_START='F$VERIFY(0)' ! $ IF "''F$MODE()'" .EQS. "BATCH" -! Skip if BATCH THEN SET NOVERIFY ! $ IF "''F$MODE()'" .EQS. "BATCH" -! Skip if BATCH THEN GOTO Issue_Command ! $ Temp:='P1' ! Lets see if have cmd line $ IF Temp .NES. "" THEN - ! P1:="''P1' ''P2' ''P3' ''P4' ''P5' ''P6' ''P7' ''P8'" $ IF Temp .EQS. "" THEN INQUIRE P1 "Command" $ ASSIGN/USER USRNAME.DXX SYS$OUTPUT ! Get real user name $ SHOW PROCESS ! Write out file $ OPEN/READ INFILE USRNAME.DXX ! Open and read output $ READ INFILE Record ! Read in a record $ CLOSE INFILE ! Always must close files $ DELETE USRNAME.DXX;* ! Clean up $ Length='F$LENGTH(Record)' ! Total length of record $ Offset='F$LOCATE("User : ",Record)'+7 ! Find where user's name $ Name_Length=Length-Offset ! starts so we can extract $ P2:='F$EXTRACT(Offset,Name_length,Record)'! it from the record $ SUBMIT SYS$SYSDISK:[SYSMGR.CMDFIL]XQT.COM-!Send off command for BATCH /PARAMETERS=("''P1'",'P2') ! execution (Maffia style) $ IF Verify_at_Start THEN SET VERIFY ! $ EXIT ! $Issue_Command: ! $ ASSIGN NL: SYS$PRINT ! Don't spool file $ 'P1' ! Issue command $ P3:='F$PROCESS()' $ SET NOVERIFY ! $ @[SYSMGR.CMDFIL]BROADCAST 'P2' "Job ''P3' is done!" $ EXIT $! $! File Name: XQT.COM $! Author: James G. Downward $! Date: March 8, 1982 $! Function: This command procedure is designed to be used to submit $! single line DCL or MCR commands for BATCH processing. It is $! designed to be used as a Foreign command ie. $! $! XQT:==@SYS$SYSDISK[SYSMGR.CMDFIL]XQT $! $! Once set as a foreign command one but need issue a command $! of the form XQT DIRECTORY or XQT MCR VFY2 DRA0:/RC. $! If there is no command line present, XQT will prompt for $! a single command (which must be less than about 80 characters) $! to satisfy passing parameters on the submit command. XQT $! will then submit itself with for BATCH processing with $! the decoded parameters passed to BATCH. It can do this $! because it follows different paths depending on whether or $! not the user is logged on to BATCH or an interactive terminal. $! Finally, the procedure passes back a message to the user $! who submitted the command that the process is done. No log $! file will be spooled, but XQT.LOG will be sitting on the $! user's directory for examination. $! $! Modified: $!