Not sure what it is the OP wants but the IEHLIST may be all they need.  Also 
works for PDS/e.
Regards,
Herman Stocker

It is impossible to make anything foolproof, because fools are so ingenious.
 -- Robert Heinlein


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Steve Thompson
Sent: Thursday, September 06, 2012 2:19 PM
To: [email protected]
Subject: Anyone know how to copy a PDS directory as a flat file?

Try IDCAMS.

You do a REPRO of your PDS where you give the count that matches the number of 
directory blocks and your output DD. You will need to specify the INPUT DCB 
parameters, probably like this:  DCB=(RECFM=F.LRECL=256).

The output DD can be defined as FB with LRECL=256.

This will give you a file of nothing but the directory blocks.

I do things like this with RECFM=U and specify DUMP so that I can get a dump of 
directory blocks when I am trying to figure out some problem with a directory 
after I have hosed it with a bad STOW or some such.

Regards,
Steve Thompson
Staff Software Engineer
Connect:Direct for z/OS

__________________

I want to make a PS (flat file) copy of the series of 256-byte blocks of a PDS 
directory. (I want to copy the data to another platform so I can test some code 
with it more readily.)

I tried

//GENER    EXEC PGM=IEBGENER
//SYSUT1   DD   DSN=MY.PDS,DISP=SHR,RECFM=F,DSORG=PS
//SYSUT2   DD   DSN=THE.SAMPLE.PDSDIR,DISP=(NEW,CATLG),
//  SPACE=(TRK,(1,1))
<SNIPPAGE>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

 ---

The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. The sender's employer is not liable for any loss or damage
arising in any way from this message or its attachments.

 ---

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to