Page 1 of 1

Submit batch job out of tool

PostPosted: Sun Nov 22, 2015 4:10 am
by sam_jj12
Hi All,

Since am new to this blog..Am not sure that I was on the right place to discuss so

*Is there any possibilty to submit batch job from the console.(Need to add newly in to the schedule)?

*Is it possible to do so?

If so please provide the command to do.

Thanks in Advance

Re: Submit batch job out of tool

PostPosted: Sun Nov 22, 2015 4:49 am
by Robert Sample
Batch jobs are not run from the console. Started tasks are started from the console. The job should be added to the job scheduler in production and run through the scheduler.

Re: Submit batch job out of tool

PostPosted: Sun Nov 22, 2015 5:56 am
by steve-myers
Mr. Sample is correct.

However, though it is very rare these days, many sites had a procedure like this -
//SUBMIT  PROC JOB='?'
//SUBMIT  EXEC PGM=IEBGENER
//SYSPRINT DD  DUMMY
//SYSUT1   DD  DISP=SHR,DSN=SYSTEM.JOBS(&JOB)
//SYSUT2   DD  SYSOUT=(A,INTRDR),DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
//SYSIN    DD  DUMMY
There are many variations on this, but this was typical. The operator would enter -

S SUBMIT,JOB=XXX

where XXX was a member in SYSTEM.JOBS.

There were problems with this scheme. The biggest problem was the userid assigned to the submitted job. There were obvious workarounds to this problem, so it wasn't fatal. It just required care on the part of the system administrators that prepared the jobs in SYSTEM.JOBS.

It kind of disappeared in the 1990s I think it was, when two capabilities were added to the system.
  • The STARTED RACF profile group allowed a userid to be assigned to a started task based on the task name.
  • Started tasks could have multiple steps.
A multiple step started task is a “job,” isn't it?

As Mr. Sample says, this sort of foolishness is relegated to production scheduler systems these days.

Re: Submit batch job out of tool

PostPosted: Sun Nov 22, 2015 11:57 pm
by sam_jj12
Hi Steve and Sample,

Thanks for the quick replies.

*I would like to add another question to Steve that "
In the following Scenario as below : job name "ABC" needs to be submitted out of scheduling tool in a DR mode and the scheduling tool is down.
We have this job been defined in two different libraries.may be like "1.2.3.4" and "5.6.7.8". If I try it out "S SUBMIT,JOB=ABC".what do you think from which library the JCL is picked up.Also is there a possibility I can define the library too in the command line.

Re: Submit batch job out of tool

PostPosted: Mon Nov 23, 2015 3:27 am
by Robert Sample
When you do a START from the console, you are executing a PROC -- NOT a job. If you notice Mr. Myer's example, it does not start with a JOB statement because it is not a job. The batch job being submitted is in the library pointed to by the //SYSUT1 statement, just like every other IEBGENER, and the output is being sent to the internal reader (which is how batch jobs are generally submitted). So if you create a symbolic (call it INDSN) in the PROC for the DSN on the SYSUT1 statement, you could run any batch job from any PDS or PDSE library by
S SUBMIT,INDSN='data set',JOB=member
This also tells you explicitly which library the job is coming from. However, unless there is a default library specified on the PROC statement, failing to provide the INDSN would cause the submit to fail.

Also, something to remember is that sometimes scheduling tools are used to modify JCL before it is submitted (such as CA-DRIVER to set dates in CA-7). If any such modification is done to the job you want to submit from the console, those changes would have to be manually incorporated into the member before the submit is done.