Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to invoke a job through REXX..
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 5:05 pm    Post subject: how to invoke a job through REXX..
Reply with quote

Hi All,

Can we invoke a job ( JCL ) through REXX. currently i have developed a job which gives a desired o/p by submitting it.

if it is possible then is there any way we can recv input to jcl as a parm from the rexx screen.

Thanks in advance.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 5:16 pm    Post subject:
Reply with quote

Not exactly sure what you are on about here .....................

Do you mean that rather than submit the job you wish to process it in foreground via your terminal.

Please consider that the process will probably take longer doing it this way, will lock your terminal against doing any further useful work while waiting for the process to end, and because of memory size restrictions placed upon a TSO/ISPF session may well fail.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 5:41 pm    Post subject:
Reply with quote

expat.. you are correct .. i need to submit the job from the treminal.. i.e rexx screen....... job does not take much time to complete. i am trying this because the job needs to be run for different parameters and instead of running the job many times with different parms better way is to run the job through terminal providing the parm value.

Could you please help me hot to achieve this task.


Thanks,
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Nov 05, 2009 6:07 pm    Post subject: Reply to: how to invoke a job through REXX..
Reply with quote

You can submit a job from TSO (the SUBMIT command). You can submit a job from ISPF (the ISPF SUBMIT command). You can submit a job anytime from anywhere by copying the JCL to the Internal Reader. So yes you can submit a job through REXX.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 6:08 pm    Post subject:
Reply with quote

OK, so what information do you think that we need to be able to help you.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 6:40 pm    Post subject:
Reply with quote

i have explored hot to submit jobs thru rexx piece of code... can i know how to pass values from rexx to job.... is it related to skel concept....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 6:59 pm    Post subject:
Reply with quote

We seem to be going in opposite directions here. Do you want to submit the job from the REXX or do you want to execute the process at the terminal.

If you want to submit the job, then using file tailoring services is one of the easiest methods of making changes to the JCL that is submitted.

example - you enter a value of ABC at the screen, and the screen variable is PARMVAL. In the skeleton you have
Code:
//STEPNAME EXEC PGM=program,PARM='&PARMVAL'

By using the file tailoring services this translates to
Code:
//STEPNAME EXEC PGM=program,PARM='ABC'


If you wish to execute the program at the terminal then you need to allocate the DD names that the program requires, associated with the correct dataset names or whatever, and you can use the CALL command to invoke the program and pass a parameter string to the program.

So whichever way you decide to go, there is certainly enough information here for you to code and test with, although you may have to have a trawl through the manuals as well.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 7:07 pm    Post subject:
Reply with quote

expat......... i need to enter value in the terminal on rexx screen and that value should be accepted in a symbolic variable in job... this is my requirement.....


Thanks,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 05, 2009 7:12 pm    Post subject:
Reply with quote

Quote:
i need to enter value in the terminal on rexx screen and that value should be accepted in a symbolic variable in job... this is my requirement
If the job is already running, this cannot be done -- period. Once a job has gone through the converter / interpreter phase of JES, no changes can be made to it (no symbolics, no parameters, nothing). You will have to submit the job with the change already in the JCL.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 7:15 pm    Post subject:
Reply with quote

in job we can give like


val= value from rexx input

var=&val

but overall scenario is not clera how the value input from rexx terminal will be caught in the val ..
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 7:16 pm    Post subject:
Reply with quote

Robert...... u are correct.. then how shall i achieve my requirement ???
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 05, 2009 7:19 pm    Post subject:
Reply with quote

If you are expecting to change the JCL of a job already executing, your solution is to go back to whoever gave you the requirement and tell them it cannot be done.

Otherwise, you will have to come up with a way to change the JCL before the job is submitted because once submitted, JCL doesn't get changed.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 7:21 pm    Post subject:
Reply with quote

Did not my previous reply give you any clues ?

The joys of using REXX and ISPF is that they interact very well together.

OK, when you define an ISPF panel, the fields are given a name. That name, without doing anything at all, is then valid within the calling REXX, or God forbid - CLIST, and contains exactly what was entered at the terminal.

Now, when we invoke the ISPF file tailoring services from the same REXX - guess what, the very same variable name still contains what was entered at the terminal.

So go back to my previous reply and look at the example, and see if you can work it out from what has been said in this reply.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 7:26 pm    Post subject:
Reply with quote

Robert,i am not trying to change the jcl already executing. Just needed to pass the value from rexx terminal and after that execute the job.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Nov 05, 2009 7:31 pm    Post subject:
Reply with quote

expat has done a good job of explaining what you need to do.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 7:52 pm    Post subject:
Reply with quote

expat coding the below code in the job gives error.

//STEPNAME EXEC PGM=program,PARM='&PARMVAL'
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 7:55 pm    Post subject:
Reply with quote

Did you use the ISPF file tailoring services to generate the JCL
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 8:34 pm    Post subject:
Reply with quote

expat my code is like below

EXEC PGM=SARBCH,
PARM='K9490P0.SAR41,&TEST'


Now how to give other parm you have mentioned as

//STEPNAME EXEC PGM=program,PARM='&PARMVAL'

Need help on coding multiple parms.
Thank you,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 05, 2009 8:58 pm    Post subject:
Reply with quote

Mmmmmmmm, I suggest that you use ISPF file tailoring services, and give an example of the FTS inputs and outputs.

I take even more time to explain briefly the interaction between ISPF and REXX giving an example of once again using FTS.

You DO NOT use ISPF file tailoring with an example that I have given which SHOULD USE file tailoring and then you tell me that it doesn't work. Well of course it will not work if you do not do as suggested.

At the top of the CLIST/REXX forum is a sticky which will give you virtually all of the manuals you will ever need for REXX and ISPF processing. I strongly suggest that you take some time and familiarise yourself with those manuals and their contents, find out about file tailoring and then try it. It's not rocket science. It's not brain surgery. It is plain, straight forward invocation and use of services that were developed by IBM to make your life easier.

Yes, there are alternatives to using these services which include building your JCL in situ, editing a base member to fit your requirements, but to me the ISPF file tailoring is the easiest way to do this.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 9:06 pm    Post subject:
Reply with quote

expat thanks i will surely go through the manuals. pls correct me if i have dome the wrong coding below taking two parm values in a single parm.

//SAREXTR EXEC PGM=SARBCH,
// PARM='K9490P0.SAR41,&TEST'
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//REPORT DD DSN=&&TEMP,
// DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(20,10),RLSE),
// LRECL=133,RECFM=FBA,BLKSIZE=27930
//SYSIN DD *
/LIST ID=&&TEST*,GEN=0
/*

where test is the parm used in rexx
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us