How to pass DSNs name to JCL



IBM's Command List programming language & Restructured Extended Executor

How to pass DSNs name to JCL

Postby zhinghur » Mon Jan 02, 2012 11:05 pm

Hi everyone,

I am very new to REX. I have one requirement. I have to trigger a JCL using REX.

When executed, it should first asked for
"Please Enter the input file"
After inputting the file name it should ask for output file,
"please enter output file"

Also, how to code so that it can be sent to my JCL particular step, these two DSN name..

Thank You
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass DSNs name to JCL

 

Re: How to pass DSNs name to JCL

Postby MrSpock » Mon Jan 02, 2012 11:18 pm

It depends. Where does your JCL come from, and how does your process expect these values to be passed?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: How to pass DSNs name to JCL

Postby zhinghur » Tue Jan 03, 2012 1:28 am

JCL doesn't come from anywhere. When he rex program is executed, it will trigger the JCL.

Now I want to pass Input and Outfile file name during execution to this JCL.
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass DSNs name to JCL

Postby steve-myers » Tue Jan 03, 2012 4:53 am

zhinghur wrote:... JCL doesn't come from anywhere. ...

JCL always comes from somewhere. I'm sure there are methods for your Rexx exec to create a small JCL job that contains a JOB statement and an EXEC statement containing symbols with your dataset names that calls a JCL procedure that does the heavy lifting. The created job would look something like this -
//MYJOB    JOB ...
//MYJCL JCLLIB ORDER=(my PROCLIB)
//MYEXEC  EXEC MYPROC,
//  INDSN='input dataset name',
//  OUTDSN='output dataset name'

MYPROC in your PROBLIB would look something like this -
//MYPROC  PROC INDSN='?',OUTDSN='?'
//MYSTEP  EXEC PGM=...
//INPUT    DD  DISP=OLD,DSN=&INDSN
//OUTPUT   DD  DISP=(NEW,CATLG),DSN=&OUTDSN,...

Obviously the MYPROC procedure would be more complex, but that's beyond the scope of this topic.

There are other ways to do this. For example, I suspect the major job scheduling packages should be able to create and submit the job without you writing a line of Rexx code. This method would be required in virtually all production shops, and this is where your research should lead you, not trying to reinvent a most likely deformed wheel.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: How to pass DSNs name to JCL

Postby Robert Sample » Tue Jan 03, 2012 6:16 am

When he rex program is executed, it will trigger the JCL.
Complete and utter garbage. The JCL was generated by the REXX (not rex) program, or the JCL was read from a data set, or the JCL came from some other source -- but JCL does not magically get "triggered" out of thin air. And what do you mean by "trigger" anyway -- created? submitted? executed? converted and interpreted? something else?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: How to pass DSNs name to JCL

Postby zhinghur » Tue Jan 03, 2012 3:23 pm

Sorry, actually I divided the part of requirement. So, couldn't be specific.

Please find my 7th and 8th posts here, which will give the clear pleasure.
zhinghur
 
Posts: 48
Joined: Sun Nov 20, 2011 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass DSNs name to JCL

Postby enrico-sorichetti » Tue Jan 03, 2012 7:44 pm

which will give the clear pleasure.


unfortunately most of the people hanging around here prefer different kinds of pleasure ...
( usually very dark ) :geek:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: How to pass DSNs name to JCL

Postby Akatsukami » Tue Jan 03, 2012 9:51 pm

enrico-sorichetti wrote:
which will give the clear pleasure.


unfortunately most of the people hanging around here prefer different kinds of pleasure ...
( usually very dark ) :geek:

Now, now. Give me a glass of bourbon, a cigar, and a scantily-clad redhead and I'm perfectly content :mrgreen:
"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: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: How to pass DSNs name to JCL

Postby enrico-sorichetti » Wed Jan 04, 2012 1:47 am

Konnichwa Akatsukami Sama !

the unfortunately refers to the TS concept of pleasure,
not certainly our ;)
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: How to pass DSNs name to JCL

Postby dick scherrer » Wed Jan 04, 2012 1:54 am

Hello,

Sorry, actually I divided the part of requirement. So, couldn't be specific.
What . . . :?
If you cannot be specific, how can anyone help. Indeed, how can you even think about implementing. . .
If you will take the time to explain what you really want others here have done the same or very similar, but what you have provided gives a "helper" nothing. . .

Please find my 7th and 8th posts here, which will give the clear pleasure.
Where are we to find these 7th and 8th posts "here" - you don't have 8 posts in this topic that i can see (until now this topic only has 7 posts).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post