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
 

 

IDCAMS vs IEFBR14

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

New User


Joined: 24 Jun 2004
Posts: 24
Location: Gurgoan

PostPosted: Tue Jun 29, 2004 11:04 am    Post subject: IDCAMS vs IEFBR14
Reply with quote

WE can delete a data set using IEFBR14 using (old,delete). We can also delete the same using IDCAMS.

What is the difference and which is suitable in what conitions? Also can any one please give the code to delete data set using IDCAMS?
Back to top
View user's profile Send private message

bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Tue Jun 29, 2004 4:31 pm    Post subject:
Reply with quote

using iefbr14 if your dataset does not exist the job will fail (JCL ERROR)
as dataset is 'linked' via DD statement, if you use DISP=(old,delete).
BUT if you use :
Code:

//DD0      DD  DSN=your-dataset-name,DISP=(MOD,DELETE),         
//  UNIT=SYSDA,SPACE=(TRK,(1,1,1),RLSE),LRECL=133,RECFM=FBA     


(note disp is mod delete and lrecl and blksize can be anything u choose as dataset won't be used in that step.)
if dataset does not exist it is created and deleted in same JCL allocation CARD
if it exists it is EXPANDED (MOD) and deleted in same JCL allocation CARD

u can the allocate it as u wish.
and if somebody uses dataset your job is in contention for the dataset with that somebody (be it user or job)
___________________________________________________

using IDCAMS needs not be DD coded (it can be ) so job should end with a RC of 8 (trappable)
I think that is another user is using the dataset you are trying to delete it will end up with a rc.

I'd rather use IEFBR14 as aforementionned so my job hangs on to the dataset I'm using where as IDCAMS step may execute and subsequent execution would carry on.
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Tue Jun 29, 2004 4:46 pm    Post subject:
Reply with quote

here are idcams examples :


Code:

//HH594DST JOB (CA1),'TMS UTILITY',MSGLEVEL=(1,1),REGION=0M
//             CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID           
//*                                                       
//IDCAMS2  EXEC PGM=IDCAMS                                 
//SYSPRINT DD SYSOUT=*                                     
//DFG      DD DSNAME=DEVLI3.SDSF.JOBS,DISP=OLD             
//SYSIN    DD *                                           
 DELETE DFG                                               
//*


maybe you should change allocation to (mod,delete) (see previous post)so that if dataset does not exist it is created (and deleted) but what if somebody browse the dataset ?
you would need to test the case.

another example without DD reference card :
Code:

 //HH594DST JOB (CA1),'TMS UTILITY',MSGLEVEL=(1,1),REGION=0M,
//             CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID             
//*                                                         
//IDCAMS2  EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                       
//SYSIN    DD *                                             
 DELETE DEVLI3.SDSF.JOBS                                     
//*                                                         


hre dataset name is in sysin.
in that case dataset existence can be tested via RC (8 does not exist or somebody is using it)

I'm using IEFBR14 solution it works fine for me.
U need to find what suits u best.

hope I've beed helpful.
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 VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts IEFBR14 to delete tape without tape m... Lynne Schuler JCL & VSAM 4 Thu Jan 29, 2015 8:51 am
No new posts IDCAMS ALTER REMOVEVOLS for open CICS... Pete Wilson JCL & VSAM 2 Wed Sep 10, 2014 7:04 pm
No new posts IDCAMS to DFSORT/ICETOOL magesh23586 DFSORT/ICETOOL 10 Wed Oct 30, 2013 11:28 am
No new posts parm values in IEFBR14 bvarun. JCL & VSAM 15 Mon Aug 26, 2013 10:29 am


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