Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Catalog dataset in JCL

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

New User


Joined: 09 Jan 2006
Posts: 20

PostPosted: Fri Jan 20, 2006 10:12 pm    Post subject: How to Catalog dataset in JCL
Reply with quote

I new user and thanks lot for your help

I want to know how to catalog dataset in JCL or mainframe.

I even don't know what is catalog mean?
Why need to catalog and what is different from the allocate dataset?
Please take a little time to explain me and I much appreciate your help.

Thanks lot

MiMi
Back to top
View user's profile Send private message

LeonL

New User


Joined: 20 Jan 2006
Posts: 5

PostPosted: Sun Jan 22, 2006 7:02 pm    Post subject:
Reply with quote

Hi MiMi,

In your JCL use DISP=(NEW,CATLG,DELETE).
This means:
1) You're creating a NEW data set
2) If the job step completes successfully the data set should be cataloged
3) If the job step ABENDs the data set should be deleted.

Cataloging a data set means the name of the data set, allocation data (like VOLUME, LRECL, RECFM etc.) are added to one of the system catalogs.
When you need the data set again, you don't have to know any of these parameters, just use DSN=data.set.name,DISP=SHR and the system will know on which volume this data set resides.

Regards,
Leon
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Jan 22, 2006 8:28 pm    Post subject:
Reply with quote

Hi MIMI,

Just to add to Leon's comments:

If you update the file after you create it, use disp=old instead of disp=shr. This prevents anyone from using your ds when you update. Allowing someone else access at that time can cause problems for you, them or both.

As I recall the DCB params (LRECL, RECFM, etc.) are carried in the DSCB on which the file was allocated, not the Catalog... unless they changed it recently. Minor point, but it s/b noted.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Mon Jan 23, 2006 6:39 pm    Post subject:
Reply with quote

Yo MIMI,

I'd also like to ad to the comments. Normally a job will run more than once using the same JCL. You should prevent failure when your job tries to construct/catalog the dataset (you can't create a dataset with disp=new when it already exists unless it's not catalogued and resides on different volumes). We use to insert a small step at the beginning of the job which takes care of that.

//DELETE EXEC PGM=IEFBR14 (just an exit without functionality)
//SYSOUT DD SYSOUT=*
//DD1 DD DSN=dataset-to-delete,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=TRK,0)

the MOD is meant to prevent a condition code 4 in case the dataset didn't exist.

Cheers,
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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us