How to empty a member in a PDS



Help for IBM's record-oriented filesystem VSAM, ESDS, KSDS, RRDS, LDS and Storage management Subsystems

How to empty a member in a PDS

Postby JorenWillems » Mon Jan 23, 2012 8:16 pm

Hi

I want to erase the content of a member in a PDS. Now, I use the following:

AAD0     SORT                         
*                                     
SORTIN   FILE  NAME=JORE0001,MODE=I   
SORTOUT  FILE  NAME=JORE0002,MODE=O   
*                                     
SYSIN    DATA  *                     
 SORT FIELDS=COPY                     
OMIT COND=ALL                   
         DATAEND                     
*                                     
SYSOUT   REPORT SYSOUT=*             
SYSPRINT REPORT SYSOUT=*   


Is there a better way to do this ?
JorenWillems
 
Posts: 9
Joined: Thu Feb 24, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to empty a member in a PDS

Postby enrico-sorichetti » Mon Jan 23, 2012 8:27 pm

useless complication
why not use something simple like

//IEB     EXEC PGM=IEBGENER                                             
//SYSIN     DD DUMMY                                                   
//SYSPRINT  DD SYSOUT=*                                                 
//SYSUT1    DD DUMMY,DCB=(RECFM=FB,LRECL=80)                           
//SYSUT2    DD DISP=SHR,DSN=<your pds>(<your member>)         


modify the SYSUT1 DCB according to the DCB of <Your pds>
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How to empty a member in a PDS

Postby steve-myers » Mon Jan 23, 2012 9:16 pm

What is your real purpose here? This is simpler and faster than the previous "solutions."
//A       EXEC PGM=IKJEFT01,
// PARM='DELETE ''DATASET(MEMBER)'''
//SYSTSPRT DD  SYSOUT=*
//SYSTSIN  DD  DUMMY
None of the solutions presented so far (including my solution) will prevent the member from being brought back by PDS "undelete" programs. The only way to prevent that is to "compress" the PDS after you have deleted the member as in my solution or replaced the member with a null member as in the previous "solutions," or to use a PDSE, which does not have a method to "undelete" a member.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How to empty a member in a PDS

Postby JorenWillems » Tue Jan 24, 2012 12:55 pm

Stece-myers. I don't want to 'delete' the record, I want to erase the content of it... Make it empty.
JorenWillems
 
Posts: 9
Joined: Thu Feb 24, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to empty a member in a PDS

Postby BillyBoyo » Tue Jan 24, 2012 1:02 pm

The solutions provide should do that. What Steve Myers is pointing out is that if you want a "security delete" of a member (where you can't get the data back afterwards), don't rely directly on these.

Have you tried the solutions? What problems do you feel they presented?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to empty a member in a PDS

Postby JorenWillems » Tue Jan 24, 2012 2:07 pm

Allright! The method of enrico-sorichetti works fine!
Thank you guys
JorenWillems
 
Posts: 9
Joined: Thu Feb 24, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 0 time


Return to VSAM/SMS

 


  • Related topics
    Replies
    Views
    Last post