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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


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