I did this using just standard MPE commands: !PURGE SJ809,TEMP !SHOWJOB JOB=B049809,MANAGER.!HPACCOUNT > SJ809 !SETVAR NUMRECS FINFO('SJ809',19) !IF NUMRECS = 6 then work !ELSE don't run !ENDIF This uses standard i/o redirection to create a file with the output of the showjob command. When testing the created file, if it has 6 records, it means that it didn't find anything (the six lines are the output from showjob with no match). We use this in several jobs that either need to run alone, or they need another job to be running. ------------------------------- Gary L. Paveza, Jr. Technical Support Specialist All opinions are mine and not those of my employer -----Original Message----- From: Jeff Keepers [SMTP:[log in to unmask]] Sent: Monday, August 09, 1999 10:44 AM To: [log in to unmask] Subject: Using MPEX to check job status All MPEX guru's hear my plea: I am writing pre-process MPEX commands for a job that will run in batch. The job can be run multiple times by the end user but two requests can't run at the same time. I was looking for a MPEX command/variable that would let me look and see if the job is currently running. There is the SHOWJOB command, but it doesn't return a variable that I can check. I can write code that will set my own flags, but I thought there was a way to do this using MPEX commands. Any assistance would be most appreciated. Please send replies directly to me since I only receive a digest from the list. Sincerely, Jeff Keepers 3M Valley, NE