IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Way to run JCL if any concatenated DS is missing?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Fri Aug 18, 2006 3:51 pm
Reply with quote

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
View user's profile Send private message
vana

New User


Joined: 27 Jul 2006
Posts: 6

PostPosted: Fri Aug 18, 2006 5:08 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Aug 19, 2006 7:35 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Find missing sequence for every key DFSORT/ICETOOL 3
No new posts commands missing in JESMSGLG JCL & VSAM 3
No new posts EDCICONV - Newline are missing All Other Mainframe Topics 6
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
No new posts Am I missing something on "FREE ... CLIST & REXX 10
Search our Forums:

Back to Top