View previous topic :: View next topic
|
Author |
Message |
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Hi
I have a JCL that runs a program. This step has a DDname with 10 files concteanted as input.
If anyof the file is missing, JCL will not be running..Is there any way to have the JCL run even if at least one file is present?
like
//INPUT DD DSN=DS1,DISP=SHR
DSN=DS2,DISP=SHR
DSN=DS3,DISP=SHR
------so on...
Thanks in advance ! |
|
Back to top |
|
|
vana
New User
Joined: 27 Jul 2006 Posts: 6
|
|
|
|
Hi,
I think u can't directly do this. Alternatively u have to call the proc with overrides ( for the files which are present for the current run) form the job
Ex:
Assumes Proc CALC1 is doing the actual processing
Job must be like
//xxx JOB ......
//EXEC PROC CALC1,
// STEP1.DD1='NAME OF DS....',
// STEP2.DD2='NAME OF DS....'
.
.
and so on
depends on the number of files available for the current run
Proc must be codes as
CALC1:
//STEP1 PROC
.
.
//DD1 DD DUMMY
//DD2 DD DUMMY
.
.
and so on
Hope this will help u.
Kindly revert back when this solves ur problem |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Prajesh,
You can't dummy out any but the last file in the concat because dummy forces EOF and you don't read any of the files after the dummy.
You have to override the INPUT concatenation something like this:
Code: |
//STEPX.INPUT DD DSN=DSN1
// DD
// DD DSN=DSN3
// DD
// DD
// DD
// DD
// DD
// DD
// DD |
The ex. above will allow the JCL to exec w/only the 1st and 3rd files as IP. The DDs w/no DSN nullifies the files referenced in those DDs.
If files 5 thru 10 were also to be used in the example simply don't code the last 5 empty DDs. Ex.:
Code: |
//STEPX.INPUT DD DSN=DSN1
// DD
// DD DSN=DSN3
// DD
// DD |
This will include file 1, 3, 6, 7, 8, 9, and 10. |
|
Back to top |
|
|
|