QSUBMIT

The QSUBMIT.EXE command submits a job to a queue in an Argent Queue Engine server.

The job is specified by its job file, which is either a command procedure (.cmd or .bat) or executable (.exe) file.

If this command is being used on the server, i.e. the server on which the Argent Queue Engine service is running, then the current drive and directory is used if the drive or directory is not specified.

If the command is being used to submit a job to a remote Argent Queue Engine server, then the full filespec, relative to the Argent Queue Engine server, is required.

Syntax


QSUBMIT.EXE	JobFile

		/QUEUE=QueueName

		/NAME=Name

		/PARAMS=Params

		/LOGFILE=Filename 

		/USER=Domain\Username

		/PASSWORD=Password

		/AFTER=hh:mm

		/EVERY=hh:mm

		/NOTIFY=Username

		/NONOTIFY

		/NODETECT

		/NOWORLDREAD

		/NOWORLDCONTROL

		/SERVER=ServerName

		/CANCEL_CHILDREN=YES 

		/LOGDIR=log_directory

		/KILLMSGBOX

		/USE_DEFAULT_LOGDIR

		/NOUSE_DEFAULT_LOGDIR

		/NOMONITOR

		/FAIL_JOB=filename

		/SUCCESS_JOB=filename

		/FAIL_EXIT_CODE={GT|LT|EQ|NE} value

Qualifiers

/QUEUE
This specifies the queue to submit the job to. If this qualifier is not specified, then the job is submitted to the default queue, which is set by the system administrator with the /DEFAULT_QUEUE qualifier of the QSYSTEM command.

/NAME
This specifies an alternate name for the job. If this qualifier is not used, then the job’s name is derived from the filename of the job file.

/PARAMS
This allows you to supply parameters for the job. Parameters are used in batch files by using the special characters %1, %2, %3, etc. If you need to specify more than one parameter for a job, then enclose the parameters in quotes and separate them with spaces.

/LOGFILE
This specifies an alternate name for the job’s log file. If this qualifier is not used, then the job’s log file has the same name as the job filespec with the job instance number appended, with a file type of txt.

/USER
This specifies the user account which the job runs under. If this qualifier is not specified, then the submitting user’s account is used. Either a username or a username and domain name may be specified. If a username but no domain name is specified, then the submitting user’s domain name is used. A password must be specified in order to run the job under an account other than the submitting users.

/PASSWORD
This specifies a password to associate with the job’s logon session when the job is executed. A password is required if the job file is located on a server other than the Argent Queue Engine server, or if the job must access network resources. The password must be correct at the time the job is started, or the job will fail to start.

/AFTER
This specifies a time after which the job may be started. The time value may be in absolute or relative time format, and various parts of the time value may be omitted. Here are some examples:

Time Value Meaning
18:00 6:00 P.M. today
3-APR-1994:18:00 6:00 P.M. on April 3, 1994
3-APR-1994 Midnight just before April 3, 1994
+:30 30 minutes from now
+1:30 1 hour and 30 minutes from now
+2:00 2 hours from now
+1 1 day from now
+1-6:00 1 day and 6 hours from now

/EVERY
This specifies a time interval at which the job is repeated. For example, if a value of “24:00” is used, then the job will be executed every 24 hours. When the /EVERY qualifier is used, a job template is created within the Argent Queue Engine.

/NOTIFY
This specifies an alternate user to be notified when the job starts and completes. The /NONOTIFY qualifier specifies that no user is to be notified. If neither of these qualifiers are specified, then the user who submitted the job is notified.

/NODETECT
This instructs the Argent Queue Engine not to automatically detect if the job is waiting for keyboard input, and then abort it. If this qualifier is not specified, then the Argent Queue Engine automatically detects when a batch job is waiting for keyboard input, and aborts the job.

/EXIT_CODE_FILE
This specifies a file from which the Argent Queue Engine takes the jobs exit code. If this is not specified, then the job’s exit code is set to the exit code returned from the jobs main process.

If the qualifier is used, then the specified file is expected to exist after the job has completed, and contain a four-digit ASCII string representing a decimal number, such as “0016”. Values of zero to 8,999 are allowed. If the Argent Queue Engine cannot read the exit code file, it sets the job’s exit code to one of the following special values:

Exit Code Value Meaning
9999 The exit code file was not found
9998 General error reading file
9996 Incorrect syntax in the file
9995 Access to file denied
9994 Sharing violation (file in use by another process)

/FAIL_EXIT_CODE
This specifies what exit code values constitute failure for the job. For example, GT0 means that exit codes greater than zero constitute failure for the job. GT represents “greater than”, LT represents “less than”, EQ represents “equal to”, and NE represents “not equal to”.

/SUCCESS_JOB
This specifies a batch file or executable to execute if the job succeeds (meaning if the job completes with an exit code not defined as failure)

/FAIL_EVENT
This specifies that an event should be reported to the system log on the Argent Queue Engine server if the job fails (meaning if the job completes with an exit code defined as failure)

/FAIL_NOTIFY
This specifies that a user should be notified via the W200x Messenger Service if the job fails (meaning if the job completes with an exit code defined as failure)

/NOWORLDREAD
This specifies that even if the queue to which the job is submitted creates jobs with world read access as its default, this job is not to be created allowing Everyone read access to the job.

/NOWORLDCONTROL
This specifies that even if the queue to which the job is submitted creates jobs with world control as its default, this job is not to be created allowing Everyone full control of the job.

/SERVER
This specifies the name of an Argent Queue Engine server. If this qualifier is absent, then the command uses the value of the XS_SERVER environment variable, if defined. If this environment variable is also absent, then the command assumes the local server.

/CANCEL_CHILDREN
This specifies that all child processes will be terminated

when the main job process completes. The default is that child processes will not be terminated.

/LOGDIR
This specifies an alternate path for the job’s log file. If this qualifier is not used, then the job’s log file has the same name as the job filespec with the job instance number appended, with a file type of txt.

/KILLMSGBOX
This specifies to abort the job if any job process generates a message dialog box.

/USE_DEFAULT_LOGDIR
This specifies that the job’s log file will be written to the queue’s default log file directory, if a default log directory has been created and assigned for that queue.

Note: you can still specify a filename using the/LOGFILE qualifier but you cannot specify a directory with the /LOGFILE qualifier

/NOUSE_DEFAULT_LOGDIR
This specifies that the job’s log file will not be written to the queue’s default log file directory, even if a default log directory has been created and assigned for that queue. In this case, the job’s log file will be written to the same directory as the job file, unless /LOGFILE qualifier is used.

/NOMONITOR
This specifies that the submitted process collection will not be monitored. This means that the total CPU time for the job will not be available. Choosing this option will improve the performance of some utility programs, such as the Bulk Copy Program (BCP) utility of Microsoft SQL Server.

/FAIL_JOB
This specifies the filename of a command file or executable to be run if

the job completes with an exit code defined as a failure.

/SUCCESS_JOB
This specifies the filename of a command file or executable to be run if the job completes with an exit code defined as success.

Example A

QSUBMIT.EXE PAYROLL

This example submits the batch file PAYROLL.bat in the current directory to the current default queue. The job log file created when the job executes will be called PAYROLL.log in the same directory.

Example B

QSUBMIT.EXE /QUEUE=NIGHTLY X:\CAD\MANDEL.exe

This example submits the executable MANDEL.exe in the CAD directory to queue NIGHTLY. The job log file created when the job executes will be called MANDEL.LOG_JobNumber.txt and will also be located in the CAD directory.

Example C

QSUBMIT.EXE D:\TOMD\NIGHTWRK.BAT /NOTIFY=HARRYF /QUEUE=NIGHTLY

This example submits the batch file D:\TOMD\NIGHTWRK.BAT to queue NIGHTLY. When the job completes, user HARRYF will be notified.

Example D

QSUBMIT.EXE PAYROLL.BAT /LOG=C:\JOHNV\PAYROLL.log

This example submits the batch file PAYROLL.bat in the current directory to the current default queue. The job log file created when the job executes will be called PAYROLL.log in directory C:\JOHNV\PAYROLL.log.

Example E

QSUBMIT.EXE D:\ACCT\PAYROLL.BAT /SERVER=ARIES

This example submits the batch file PAYROLL.BAT in directory D:\ACC\ to server ARIES. Note that the job filespec is relative to the server. This means that the filespec refers to drive D: and directory ACCT on ARIES, not on the server where this command was entered.

Example F

QSUBMIT.EXE WORK.EXE /AFTER=18:00

This example submits a job called WORK.exe to the default queue, to be started no sooner than 6:00 PM today.

Example G

QSUBMIT.EXE WORK.EXE /AFTER=+2:00

This example submits a job called WORK.exe to the default queue, to be started in two hours.

Example H

QSUBMIT.EXE C:\JOBS\BACKUP.CMD /QUEUE=SYSJOBS /AFTER=22:00 /USER=BackupAcct /PASSWORD=12345

This example submits a backup job to start at 10:00 PM tonight, which will run under the user account called BackupAcct.

Example I

QSUBMIT.EXE \\NT1\BUILD\BUILD1.CMD /QUEUE=BUILDS /USER=DEV\JoeSmith /PASSWORD=12345

This example submits a build job, which will run under the user account called DEV\JoeSmith.

See Also:

Command Reference

Network Usage