MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deletion of datasets that are being NDMed

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
DineshS
Beginner


Joined: 08 Sep 2004
Posts: 3
Topics: 3

PostPosted: Wed Sep 08, 2004 10:14 am    Post subject: Deletion of datasets that are being NDMed Reply with quote

Hi,

I have one file . Lets call this file as File A created in Step 1 having disposition as ( New , Pass , Delete ) . That means when the job is complete the job will automatically delete the File A

2) This file is being NDMed to some other server . Because of this NDM step, the File A is not getting deleted on its own and I have to explicitly put an IDCAMS step to delete in step 3

do u know why a file which is defined as PASS does not get deleted if it is NDMEd ? how can I avoid writing IDCAMS which explicity deletes the file ? I am looking for something implicit

Thanks
Dinesh
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Wed Sep 08, 2004 10:27 am    Post subject: Reply with quote

Quote:
having disposition as ( New , Pass , Delete ) . That means when the job is complete the job will automatically delete the File

That is not a true statement, at most it could be partially true. Check your JCL manual for the answer to your question.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Sep 08, 2004 10:55 am    Post subject: Reply with quote

If you truly require that this dataset be deleted after the transfer to the other server, then how have you defined the disposition in your CONNECT:Direct (NDM) process? Logically, it should be either:

A.
Code:

Defined as DISP=(SHR,DELETE) or DISP=(OLD,DELETE), something like this:

ZZCOPY01  PROCESS  PNODE=pnode SNODE=snode           
/*------------------------------------------------------------------*/
COPY010 COPY FROM (PNODE DSN=A -
                         DISP=(SHR,DELETE)) -
             TO   (SNODE DSN=B -
                         DISP=(RPL,CATLG)) -
             COMPRESS                                                 


B. A step should exist in your process to check the return-code of your COPY step, and then, based on the appropriate return-code, delete the dataset (there is a facility in CONNECT:Direct to handle a dataset delete).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group