On Wed, 8 Jul 2009 11:32:36 -0400, Baraniecki, Ray
<[email protected]> wrote:
>Someone wrote "how can I delete all the members of a PDS" which got me
thinking. Can I do this using Rexx? We have an Assembler program owned by
IBM Global Services (we're outsourced) which will reset a PDS and optionally
change the number of directory blocks as requested in the parm field.
>
>So far all that I have been to accomplish is to destroy my test PDS. I am
opening my test PDS with OLD REUS and specifying a RECFM of F and LRECL and
BLKSIZE of 256. I perform a Do Loop to initialize the stem variable to the
number of directory blocks that I want and then write to the file. the test
file is now trashed. Does anyone know what I am doing wrong?
>
>I'm beginning to think this is beyond Rexx.
>
This of course won't work with a PDSE, but will with a PDS:
/* rexx - zero a PDS Directory */
ARG dsn
"ALLOC F(PDSDIR) DA("dsn") SHR REUSE RECFM(F)", /* pds directory */
"DSORG(PS) LRECL(256) BLKSIZE(256)"
"EXECIO 1 DISKRU PDSDIR (STEM DIR." /* read pds directory */
/* for update */
DIR.1 = '000EFFFFFFFFFFFFFFFF'x /* End of Directory */
"EXECIO 1 DISKW PDSDIR (STEM DIR. FINIS" /* Rewrite Directory */
"FREE F(PDSDIR)"
Exit
This will zero the directory, but it won't "empty" the PDS (leave it in a
compressed state) like the "FIX RESET" command from PDS86 or some
other similar utilities do.
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[email protected]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html