View previous topic :: View next topic
|
Author |
Message |
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Hi,
Is there any way to include file tailoring output in next step of jcl. My file tailoring output will only be having files names as below.
//DD1 DD DSN=DSN1,DISP=SHR
//DD2 DD DSN=DSN2,DISP=SHR
//DD3 DD DSN=DSN3,DISP=SHR
.
.
//DDX DD DSN=DSNX,DISP=SHR
There all are database related files used to run my application program. It should present in my run program step. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
As you can not modify an active JCL, then the answer is NO |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Can you please let me know what is the modification I need to do in JCL? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
The easiest thing to do is submit a second job from the first. |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
I cant submit because I need to have all these files names in the second step. |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
I am purposely using skeleton to have those files depends on some conditon. It is not a JCL. the file tailoring output wll having only the files names to run the program. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You have a solution in search of a requirement. . . For whatever reason you chose file tailoring. That is not the only way to create/modify jcl.
Many of us have created jcl "depending on some condition" and submitted it via the internal reader. So far, i see no reason that you cannot do the same. Instead of a second step, you would have a second job. . .
Possibly you can explain the file tailoring requirement? Or why the alternative won't work for you. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Can you show us what your 'next step JCL' is supposed to look like, if you could build it? |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Thanks for the Help. I am doing by below way.
// JCLLIB ORDER=XXXX.SKELETON.OUTPUT'
//STEP1 EXEC PGM=IKJEFT01..
//.......
//.....
//STEP2 EXEC PGM=XXXXX,PARM=&RRRRR
// INCLUDE MEMBER=DDDDDD
//STEPLIB DD DSN=HLQLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
DDDDDD will be my file tailoring ouput. which will be having file names as below.
//DD1 DD DSN=DSN1,DISP=SHR
//DD2 DD DSN=DSN2,DISP=SHR
//DD3 DD DSN=DSN3,DISP=SHR
.
.
//DDX DD DSN=DSNX,DISP=SHR
Instead of writing it to physical files is it possible to use temp files? |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
You can use IKJEFT01 in the next step and invoke a Rexx program to parse the output , the allocations and then call the program you were going to call. Of course, if you are going to do this, there is no reason to use file tailoring since you can probably call the step2 program directly in step 1.
If you think you must do it using JCL (and there are reasons that may be true) then as others have sayd, no, you can't dynamically change JCL while the job is running |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Instead of writing it to physical files is it possible to use temp files? |
I don't see any temp files in the jcl posted, but if the files are only for this job temp should work. . . . Keep in mind that if you submit job2 from job1, temporary files would not work - they would be available to only job1.
Instead of using the INCLUDE in as is currently coded in step2, you would create this as a complete "new" job and submit it thru the internal reader.
Code: |
//xxxxxxxx JOB . . . . .
//STEP2 EXEC PGM=XXXXX,PARM=&RRRRR
//STEPLIB DD DSN=HLQLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//DD1 DD DSN=DSN1,DISP=SHR
//DD2 DD DSN=DSN2,DISP=SHR
//DD3 DD DSN=DSN3,DISP=SHR
.
.
//DDX DD DSN=DSNX,DISP=SHR |
All of the jcl would be resolved - there would be no "include".
There are multiple topics in the forum on using the internal reader. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
If you are using JCLLIB...
Use file tailoring to get your tailored list of datasets, and also include the static part of your job step and also formatted as a PROC . Put this into the JCLLIB dataset.
In the second step, refer to the newlib created PROC JCL. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Pedro,
I maybe misunderstanding what you are saying, but how do you get STEP2 to refer to a PROC created in previous step.
Gerry |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I am not sure it is possible to do.
I am not sure how much checking is done ahead of time, but I think they are just member names. Create a new member in one step and refer to it in another step. If that is not possible, then submit another job, as has been recommended several times. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Pedro,
PROCS are expanded at soon as the job hits JES2.
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Jeyaseelan,
Do you have something running yet?
If not, i recommend you go ahead and generate all of the jcl needed for the 2nd process and submit via the internal reader.
How does your current first step know which dd statements to use? |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Thanks for all you replies. Dick can you please send me the piece of code to write the skeleton output to temp files? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
the piece of code to write file tailoring output to temp |
It is an option of the FTOPEN service. |
|
Back to top |
|
|
|