Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
dataset not found error in merge JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sathish1760

New User


Joined: 02 May 2008
Posts: 42
Location: chennai

PostPosted: Wed Nov 05, 2008 11:35 am    Post subject: dataset not found error in merge JCL
Reply with quote

I am working in JCL for merging of datasets.My requirement is that if one of the datsets given in the merge step is not catalogued,it should not through 'DATSET NOT FOUND' error and other datsets should be merged.If anyone knows the solution for this,please help me.

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

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Wed Nov 05, 2008 11:38 am    Post subject:
Reply with quote

Sathish,

What if none of the datasets to be merged are catalogued?
Back to top
View user's profile Send private message
sathish1760

New User


Joined: 02 May 2008
Posts: 42
Location: chennai

PostPosted: Wed Nov 05, 2008 11:46 am    Post subject: Reply to: dataset not found error in merge JCL
Reply with quote

Hi arcvns,
Even when none of the datasets are catalogued, my JCL should not through 'DATSET NOT FOUND' and output dataset should be empty.

Is it possible to skip that uncatalogued dataset and merge the other catalogued datasets?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Wed Nov 05, 2008 11:49 am    Post subject:
Reply with quote

How about using DISP=(MOD,CATLG) for SORTINxx datasets?
Back to top
View user's profile Send private message
sathish1760

New User


Joined: 02 May 2008
Posts: 42
Location: chennai

PostPosted: Wed Nov 05, 2008 12:02 pm    Post subject: Reply to: dataset not found error in merge JCL
Reply with quote

Hi arun,

I am not creating the input datasets during merge step in my JCl.I just have to merge the datsets if they are catalogued.
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: Wed Nov 05, 2008 12:13 pm    Post subject:
Reply with quote

Then you need a procedure to see which files are available for input and generate your JCL accordingly.

Another possibility may be to create all inputs as generations of a GDG and only take the base as input. Not sure if this is feasible for a merge ? but you could always investigate.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Wed Nov 05, 2008 12:32 pm    Post subject:
Reply with quote

Quote:
I am not creating the input datasets during merge step in my JCl.I just have to merge the datsets if they are catalogued.


The below sample job works merges the input files evenif any/all of the input datasets are not catalogued. It'll create the datasets which are not available. If you don't want them to be catalogued, you need to figure out alternate methods as expat suggested.
Code:
//STEP01  EXEC PGM=SORT                         
//SYSOUT    DD SYSOUT=*                         
//SORTIN01  DD DSN=Input.file1,DISP=(MOD,CATLG),
//             DCB=LRECL=80,SPACE=(TRK,(1,1))   
//SORTIN02  DD DSN=Input.file2,DISP=(MOD,CATLG),
//             DCB=LRECL=80,SPACE=(TRK,(1,1))   
//SORTIN03  DD DSN=Input.file3,DISP=(MOD,CATLG),
//             DCB=LRECL=80,SPACE=(TRK,(1,1))   
//SORTOUT   DD SYSOUT=*                         
//SYSIN     DD *                               
   MERGE FIELDS=(1,80,CH,A)                     
/*         
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 05, 2008 1:36 pm    Post subject:
Reply with quote

Hello,

This may work as long as all of the sortin files are on sms-managed dasd. If any of the dasd is not sms-managed, there may be a problem.

Writing a specific eof to the end each file should perevent the non-sms problem as well as ensure the "dataset not found" error is prevented.
Back to top
View user's profile Send private message
sathish1760

New User


Joined: 02 May 2008
Posts: 42
Location: chennai

PostPosted: Wed Nov 05, 2008 6:43 pm    Post subject: Reply to: dataset not found error in merge JCL
Reply with quote

Finally it is done.I wrote a rexx routine to check whether the file is in the catalogue.
SYSDSN function in REXX is used for this purpose. So, i called the REXX routine for all the input datasets to check whether the files are in the catalogue.

Thanks you all for your response.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 05, 2008 9:16 pm    Post subject: Reply to: dataset not found error in merge JCL
Reply with quote

Thank you for posting your solution - good to hear it is working icon_smile.gif

d
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us