Batch JOb to submit console commands



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Batch JOb to submit console commands

Postby bazzigar » Wed Jun 20, 2012 9:16 pm

Hello,

Can some one give the sample JCL to execute console commands as batch job.
I need to execute around 50+ commands.

Thanks,
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Batch JOb to submit console commands

Postby Robert Sample » Wed Jun 20, 2012 9:27 pm

In JES3, you can use
// COMMAND '<command>'
which allows continuation of the command past a single line. In general,
// <cmmand>
will issue a console command -- as long as your user id has the appropriate authority to issue the command.

Note that console commands are issued immediately -- you cannot, for example, put a console command AFTER executing a program and expect the program to complete before the console command is issued; the program will execute after (or while) the console command is run.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Batch JOb to submit console commands

Postby bazzigar » Wed Jun 20, 2012 10:41 pm

Is there any way I can submit as set of comands with utilitY CONSCMD.
With out passing the commands as PARM. eg: STEP1 EXEC PGM=CONSCMD,PARM='D IPLINFO'

I need to submit In SYSIN DD *

Becouse I have more than 50+ commands to run in one batch job.Passing it as "PARM" seems not good.

Thanks,
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Batch JOb to submit console commands

Postby bazzigar » Wed Jun 20, 2012 10:42 pm

Robert Sample wrote:In JES3, you can use
// COMMAND '<command>'
which allows continuation of the command past a single line. In general,
// <cmmand>
will issue a console command -- as long as your user id has the appropriate authority to issue the command.

Note that console commands are issued immediately -- you cannot, for example, put a console command AFTER executing a program and expect the program to complete before the console command is issued; the program will execute after (or while) the console command is run.
Robert Sample wrote:In JES3, you can use
// COMMAND '<command>'
which allows continuation of the command past a single line. In general,
// <cmmand>
will issue a console command -- as long as your user id has the appropriate authority to issue the command.

Note that console commands are issued immediately -- you cannot, for example, put a console command AFTER executing a program and expect the program to complete before the console command is issued; the program will execute after (or while) the console command is run.


Thanks Robert for your quick reply,

Is there any way I can submit as set of comands with utilitY CONSCMD.
With out passing the commands as PARM. eg: STEP1 EXEC PGM=CONSCMD,PARM='D IPLINFO'

I need to submit In SYSIN DD *

Becouse I have more than 50+ commands to run in one batch job.Passing it as "PARM" seems not good.

Thanks,
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Batch JOb to submit console commands

Postby Akatsukami » Wed Jun 20, 2012 11:05 pm

bazzigar wrote:Is there any way I can submit as set of comands with utilitY CONSCMD.
With out passing the commands as PARM. eg: STEP1 EXEC PGM=CONSCMD,PARM='D IPLINFO'

Is not CONSCMD a proprietary tool of Rizutto IT? (Answer: yes) Does not Sr. Rizutto provide sample JCL that answers this question? (Answer: yes) Are you going to justify your salary by reading and adopting that JCL yourself? (Answer: ???)
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Batch JOb to submit console commands

Postby Robert Sample » Wed Jun 20, 2012 11:23 pm

Why did you not put in your original post that you wanted to use a vendor product (one that is not installed at all sites) to do your task? Since you left out this vital piece of information, I provided you a solution that will work at all sites but doesn't use your vendor product.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Batch JOb to submit console commands

Postby bazzigar » Thu Jun 21, 2012 10:10 am

Sorry to confuse you all.I got it now.Thanks alot.
bazzigar
 
Posts: 29
Joined: Sat Feb 11, 2012 7:20 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post