Hello, I am putting together a rudimentary MPEX script that does basic job scheduling. The objective is to allow jobs to run sequentially. The script uses HIPRI.CMD.VECSL to facilitate job execution but it is bombing at the ALTJOB statement in the HIPRI command file. If you'll scroll down to the $stdlist, you will see that the statement is not failing due to syntax, but due to an FSERR. I am confused as to why the HIPRI command file fails in this BATCH job. Here's the controlling script, the HIPRI.CMD.VECSL source code and the $stdlist: Thanks for any assistance! Eben Yong MIS Manager Health Plan of San Mateo --- source code --- ! MPEX COMMENT TEMP0000 is a temp file that has the list of job numbers that need to run sequentially TELL @.!hpaccount !HPJOBNUM/!HPJOBNAME Auto-Controlling EClaims Jobs... PURGE TEMP####>$NULL PRINTO #J!hpjobnum;SEARCH=(STR(R,3,1)="#");format=r[4:4]>TEMP0000 PRINT TEMP0000 SETVAR CNT=0 REPEAT SETVAR CNT=CNT+1 COMMENT THE FIRST LINE IS THE '----PRINTING' HEADER SO SKIP IT IF CNT>1 SETVAR JOBNUM='!CURRENTREC' REPEAT setlvar jinfo = "![rjob.jobnumber]/![rjob.jsname]" HIPRI.CMD.VECSL !JOBNUM <--------------- here is where the job bombs COMMENT -- check to see if the job has ended while rjob.isexec pause 60 endwhile COMMENT -- check to see if the job ended abnormally. If yes, COMMENT -- abort everything and manage the jobs manually COMMENT -- you can only run this in production because that's COMMENT -- the only place where Job Rescue exists IF "!HPACCOUNT"="AIH" echo s ![rjob.jsname],@.{hpaccount} > temp0001 echo e >> temp0001 run status.jpak.nsd < temp0001 > temp0002 print temp0002;search=cl d "em" > temp0003 if ftempinfo("temp0003",19)>0 tell @.!hpaccount !jinfo has an ABNORMAL ENDING. tell @.!hpaccount !jinfo E-Claims CONTROL job ABORT!! setjcw jcw fatal endif ENDIF FORJOBS J!JOBNUM ENDIF FORRECS CURRENTREC=TEMP0000,OLDTEMP EXIT ---- $stdlist ---- Executing ALTJOB #J305;inpri=14 DUPLICATE TEMPORARY FILE NAME (FSERR 101) Error: Doing Frename (SR133.PUB.VESOFT) of SW133.PUB.VESOFT. ---- HIPRI.CMD.VECSL ---- PARM JOB=!hplastjob # by Vladimir Volokh, VESOFT June 1996 IF UPS(CMDPARM("JOB"))="HELP" THEN ECHO HIPRI: raises the priority of a particular job so that it ECHO will begin executing immediately. This is done by ECHO raising it to priority 14, then increasing the ECHO JOBLIMIT so that it is 1 more than the HPJOBCOUNT, ECHO then setting the LIMIT back to its original value. ECHO ECHO Syntax: %HIPRI jobnumber ECHO Example: %HIPRI 123 or %HIPRI #J123 or #123 or J123 RETURN ENDIF setLvar jnum '#J![UPS("!JOB")-"#"-"J"]' SHOWJOB !jnum ALTJOB !jnum;inpri=14 <---------------- HERE IS WHERE THE COMMAND FILE FAILS IN THE JOB filter showjob,"WAIT" and " 14 ">$null setLvar wait14 mpexprintlinesfound # The following loop submits the job even if there are several jobs # with INPRI=14 scheduled already -- without changing their order. repeat filter showjob,"WAIT:1" and "!jnum">$null if mpexprintlinesfound=0 then FILTER SHOWJOB,"WAIT:1";FORMAT="ALTJOB "+R[0:6]+";INPRI=14">$newpass XEQ $oldpass else setLvar OLDHPJOBLIMIT HPJOBLIMIT LIMIT ![HPJOBCOUNT+1] pause 1 LIMIT !OLDHPJOBLIMIT endif fornum i=1,!wait14,1 SHOWJOB !jnum altproc !jnum;pri=cs