IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Skip file from delete


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 49
Location: pune

PostPosted: Tue Aug 29, 2017 3:19 pm
Reply with quote

HI guys,
I have a piece of code deleting files based on naming pattern

Code:
//DMS.SYSIN DD  *
 FIND DSNAME=EHLT.EC.TRAN.!KTEC!FILE         ** !=SELECT VARIABLE
  DELETE
/*


we also have few GDG created whose generations are also deleted by the JCL since it matches the pattern

EHLT.EC.TRAN.KTECBJ00.IFILE1.GDG
any idea on how I can make change the above code to it skips the GDG but continues to delete other file.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Aug 29, 2017 4:51 pm
Reply with quote

Remove the JCL statements that reference the generation data sets. (You said that they were being deleted by JCL and not by whatever utility you are running.)
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 49
Location: pune

PostPosted: Tue Aug 29, 2017 6:02 pm
Reply with quote

the below is the input to my delete utility

FIND DSNAME=EHLT.EC.TRAN.!KTEC!FILE ** !=SELECT VARIABLE
DELETE

we have files such as
EHLT.EC.TRAN.KTECBJ00.IFILE1.GDG
EHLT.EC.TRAN.KTECBJ00.IFILE1


the above FIND is picking both the layout, any idea on skipping the GDG one but picking the regular one without the GDG
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1003

PostPosted: Tue Aug 29, 2017 7:12 pm
Reply with quote

pema_yozer wrote:
the below is the input to my delete utility

FIND DSNAME=EHLT.EC.TRAN.!KTEC!FILE ** !=SELECT VARIABLE
DELETE

we have files such as
EHLT.EC.TRAN.KTECBJ00.IFILE1.GDG
EHLT.EC.TRAN.KTECBJ00.IFILE1


the above FIND is picking both the layout, any idea on skipping the GDG one but picking the regular one without the GDG

Your question has nothing to do with "JCL & VSAM" topics.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to read unpacked field created in... DFSORT/ICETOOL 11
No new posts How to add 2 digits to COMP-3 file? DFSORT/ICETOOL 11
No new posts VSAM file Storage Calculation JCL & VSAM 3
No new posts Negative value - packed field - Natur... Java & MQSeries 0
This topic is locked: you cannot edit posts or make replies. Writng matched records into output fi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top