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
 

 

Delete list of PS files within PDS member

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

New User


Joined: 12 Jan 2013
Posts: 28
Location: India

PostPosted: Thu Apr 09, 2015 12:01 am    Post subject: Delete list of PS files within PDS member
Reply with quote

Hi,

I have list of PS files which will be placed dynamically in a PDS member in previous step.

All the flat files present in PDS(member) must be deleted in the next step and the PDS member file must not be deleted.

PDS : TEST.AAA.FILEPDS(FILES)

the above PDS will hold the below PS Files.

TEST.BBB.TEST1
TEST.ABC.TEST2
TEST.ABC.TEST3

No symbolic qualifiers will be in above file. File naming will be direct and of same record length of 900 in FB format

The number of files available in PDS will vary day to day. So I cannot use simple IEFBR14 step.

Can anyone suggest a sample code, whether this type of deletion is possible through JCL or whether can be achieved using cobol

Thanks,
Senthil
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 525
Location: The Universe

PostPosted: Thu Apr 09, 2015 12:05 am    Post subject:
Reply with quote

Write a Rexx exec that reads the member, constructs and executes a TSO DELETE 'data set name' PURGE command for each data set name in the member.
Back to top
View user's profile Send private message
SENTHIL MURUGAAN
Warnings : 1

New User


Joined: 12 Jan 2013
Posts: 28
Location: India

PostPosted: Thu Apr 09, 2015 12:08 pm    Post subject:
Reply with quote

Hi Steve,

Thanks for reply. I dont have knowledge on rexx . Can you please share me a sample code. So that I can try on my side.

Thanks,
Senthil
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 178
Location: UK

PostPosted: Thu Apr 09, 2015 12:58 pm    Post subject:
Reply with quote

It's unlikely that Steve will have a Rexx ready that does exactly what YOU want.

You will need to read the manuals, experiment, and come back to the forum if there are any particular points you are not clear on.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Thu Apr 09, 2015 1:22 pm    Post subject: Reply to: Delete list of PS files within PDS member
Reply with quote

why not use Your sort product to build the idcams delete statements ???
see here for a example

http://www.ibmmainframes.com/viewtopic.php?t=63190&highlight=sort+idcams+delete
Back to top
View user's profile Send private message
SENTHIL MURUGAAN
Warnings : 1

New User


Joined: 12 Jan 2013
Posts: 28
Location: India

PostPosted: Thu Apr 09, 2015 11:20 pm    Post subject:
Reply with quote

Hi enrico,

I used a sort card to concatenate "DELETE" prefixing the file names using INREC and copied the output using IEBGENER to a PDS member and passed it to sysin DD card of IDCAMS and it worked fine.

Thanks,
Senthil
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Apr 10, 2015 1:11 am    Post subject: Reply to: Delete list of PS files within PDS member
Reply with quote

You don't need the IEBGENER step, SORT can write directly to a PDS member, and anyway a plain sequential dataset can easily be used as input to IDCAMS (a library(pdsmem) is nothing more than a sequential dataset at that level).

If you post your SORT step we can review it, and have a useful example.
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 getting three output files out of JOI... migusd SYNCSORT 4 Mon Jun 05, 2017 11:30 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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