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

Delete list of PS files within PDS member


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SENTHIL MURUGAAN
Warnings : 1

New User


Joined: 12 Jan 2013
Posts: 32
Location: India

PostPosted: Thu Apr 09, 2015 12:01 am
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: 869
Location: The Universe

PostPosted: Thu Apr 09, 2015 12:05 am
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: 32
Location: India

PostPosted: Thu Apr 09, 2015 12:08 pm
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: 197
Location: UK

PostPosted: Thu Apr 09, 2015 12:58 pm
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

Senior Moderator


Joined: 14 Mar 2007
Posts: 10714
Location: italy

PostPosted: Thu Apr 09, 2015 1:22 pm
Reply with quote

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

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: 32
Location: India

PostPosted: Thu Apr 09, 2015 11:20 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Fri Apr 10, 2015 1:11 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to list BMS MAP screens in BMS Ph... CICS 1
This topic is locked: you cannot edit posts or make replies. Copy list of files from PS to another... CLIST & REXX 11
No new posts JOINKEYS to match two input files on ... DFSORT/ICETOOL 3
No new posts DB2 group member usage DB2 0
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
Search our Forums:

Back to Top