Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-12 Thread Shmuel Metz (Seymour J.)
In 4244327715204510.wa.paulgboulderaim@listserv.ua.edu, on
09/11/2012
   at 08:42 AM, Paul Gilmartin paulgboul...@aim.com said:

You veered away from the topic of my question

I was addressing different issues; whether a fake [BQ]SAM read of the
directory returns actual TTR's at all, and whether it is desirable to
use that technique instead of DESERV. It's certainly reasonable for
legacy code, but I don't see the point of doing it for new code.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-11 Thread Shmuel Metz (Seymour J.)
In p0624080bcc7321fafda9@[192.168.1.11], on 09/10/2012
   at 01:03 AM, Robert A. Rosenberg hal9...@panix.com said:

At 15:30 -0400 on 09/07/2012, Shmuel Metz (Seymour J.) wrote about 
Re: Anyone know how to copy a PDS directory as a flat file?:

  Got paraphrase of WAD.

Broken as designed?

That is BAD - ie: The design is wrong but the code works as the 
design says it should.

WAD is Working As Designed - The code works as the design says it 
should and the design describes the intended
result/functioning.

If the intended result/functioning is poorly thought out then it is
BAD.

In this case it is WAD if you want to find the entries in any of the
 PDS and PDS(E) Libraries in the concatenation ignoring any HFS 
libraries encountered

If you get an S0C4 or inappropriate error message as a result then it
is *not* ignoring any HFS libraries encountered.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-11 Thread Shmuel Metz (Seymour J.)
In 000801cd8f44$116df7a0$3449e6e0$@att.net, on 09/10/2012
   at 06:04 AM, Kenneth J. Kripke kenneth_kri...@att.net said:

Next will come the member NAME, ttr, C field, and, the number of
TTRN's. You will want to AND out the C field.  Then multiply the
number of ttrn's by 2 to convert to bytes.  

This will be your increment to the next entry into the Directory
block. 

Close but no cigar. First, TTRN is 4 bytes, not two. Second, you don't
even need to worry about the number of TTRN's, since they are
contained in the user data. And, finally, you need to multiply bits
3-7 of C by two to get the length of the user data. Add the last to
the basic 12 bytes to get the offset to the next entry.

I don't know if the directory block is marked with XL4'F' 
as a member name or not to denote the logical end. 

Yes. The last entry in the last used directory block has a name field
of maximum binary value (all 1s, a TTR field of zeros, and a
zero-length user data field).
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Anyone know how to copy a PDS directory as a flat file?

2012-09-10 Thread Kenneth J. Kripke
Ref:  z/os V1R13.0 DFSMS Using Data Sets, SC26-7410-11

This has the structure of a PDS Directory Block.  

Since you will be most likely be using QSAM to process, the first half word
will contain the maximum number of bytes used in the directory block.  You
won't see the COUNT and KEY fields of the DIRECTORY.  

Next will come the member NAME, ttr, C field, and, the number of TTRN's.
You will want to AND out the C field.  Then multiply the number of ttrn's by
2 to convert to bytes.  

This will be your increment to the next entry into the Directory block.  I
don't know if the directory block is marked with XL4'F' as a member
name or not to denote the logical end.  This will have to be verified.  

At any rate, if your goal is just to get a list of the members contained in
a PDS or PDSE, I think this will work.  I have some code that pretty much
does this in ALC to read and process a PDS, and, it works.   

 

K. Kripke 

kkri...@mindspring.com

 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-10 Thread Paul Gilmartin
On Mon, 10 Sep 2012 01:03:31 -0400, Robert A. Rosenberg wrote:

In this case it is WAD if you want to find the entries in any of the
PDS and PDS(E) Libraries in the concatenation ignoring any HFS
libraries encountered (and if the same name occurs in more than one
library, return the first one encountered). It is BAD if you do not
want to ignore HFS Libraries in the concatenation.
 
The judgment between WAD and BAD should strongly consider
consistency with the behavior of BLDL which most utilities still
use to look up catenation members.  By this criterion, DDLIST
and DESERV are both BAD.

Hmmm... Will BLDL and DESERV report mixed-case names,
easily created in a PDS with STOW or with Binder, and even
more easily in UNIX directories?  IIRC they do appear in ISPF
member lists.

And how will BLDL treat UNIX members WOMBAT and
WOMBAT , the latter having a trailing blank, which is
not portable but possible?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-10 Thread John Gilmore
Paul Gilmartin's point---that consistent values among DDLIST, DESERV,
and BLDL outputs is desirable---is important.  Its importance would
indeed be hard to exaggerate.

Moreover, the time for jibbing at mixed-case values in reporting
contexts is long past.  They are not, as they should be, usable
everywhere.  They will not be usable everywhere soon.  They are,
however, usable in some wheres; and service macros and the like should
no longer ignore them.

IBM is a large, sprawling organization; and for this reason alone it
has always had difficulty reusing even code that is clearly reusable.

Even when one knows that something has already been done many times,
[re]writing a small block of code that does it yet again is often
easier than finding and reusing code 'owned' by another entity and
then coordinating its subsequent maintenance.

Still, two code sequences that notionally address the same functional
objective are all but certain to do some things differently.  These
differences grate.  Worse, they complicate simple tasks that ought not
to be problematic.

All these things said, the underlying problem is an intractable one;
and moralistic posturings about it are unhelpful.

John Gilmore, Ashland, MA 01721 - USA

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-10 Thread Paul Gilmartin
On Fri, 7 Sep 2012 08:19:53 -0400, Shmuel Metz (Seymour J.) wrote:

BTW, I saw a quote from an earlier message, but not the message
itself, talking about reading directory blocks from a PDSE. For the
record, those are not the actual PDSE directory blocks[1][2] but fake
blocks made to look like they came from a PDS; ise DESERV if you want
the actuial entries. And, yes, the TTR's are usable.

DESERV provides the CONN_INTENT=HOLD parameter to cause
a held connection to the member.  I assume this is implicit with
BLDL.  I doubt that this is supported for sequential reading of
fake directory blocks.  So while the TTRs are instantaneously usable, 
I suspect that any change such as replacing a member will make
at least its TTR unusable.

-- gil


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-09 Thread Blaicher, Christopher Y.
See 'z/OS V1R12 DFSMS Using Data Sets', Chapter 26.  It has a section titled 
'Reading a PDS Directory Sequentially'.  Chapter 27 has a similar section for 
reading a PDSE directory.

Chris Blaicher
Senior Software Engineer, Software Services
Syncsort Incorporated
50 Tice Boulevard, Woodcliff Lake, NJ 07677
P: 201-930-8260  |  M: 512-627-3803
E: cblaic...@syncsort.com

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Thursday, September 06, 2012 9:56 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:

Assuming you have the authority to do so, superzap the F1 DSCB for your source 
PDS so that its DSORG is PS instead of PO.  Then do your IEBGENER.  Then zap 
the F1 back to PO.  It might work.  I have never tried this myself.

Perhaps you don't know about overrides in JCL DD and ALLOCATE commands?

Adding to my prior remark, specify _everything_ in SYSUT1 DD.
DSORG, RECFM, LRECL, BLKSIZE.


On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:

Lizette's point that IBM can change the information in a PDS directory
without notice is of course generically correct

That conceded, such changes have been infrequent for many years; and
the functional stabilization of PDS support that came about with the
introduction of PDSEs makes further such changes unlikely.  Brutally
put, PDSEs are changing, PDSs are not.

So much IBM software (probably ISPF) and customer software depend on the PDS 
directory format that I understand that a PDSE can be opened as PS and PDSE 
support emulates the PDS directory format.

Have you succeeded in opening your PDS as a sequential file?

I've done it in Rexx.  Assembler is for people who like that sort of thing.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN



ATTENTION: -

The information contained in this message (including any files transmitted with 
this message) may contain proprietary, trade secret or other  confidential 
and/or legally privileged information. Any pricing information contained in 
this message or in any files transmitted with this message is always 
confidential and cannot be shared with any third parties without prior written 
approval from Syncsort. This message is intended to be read only by the 
individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any use, disclosure, copying or distribution of this message, in any form, is 
strictly prohibited. If you have received this message in error, please 
immediately notify the sender and/or Syncsort and destroy all copies of this 
message in your possession, custody or control.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-09 Thread Robert A. Rosenberg
At 10:05 -0500 on 09/06/2012, Kirk Wolf wrote about Re: Anyone know 
how to copy a PDS directory as a flat file?:



But don't PDS directory blocks have keys on disk?   IEBGENER won't copy
those - your target dataset will be regular DSORG=PS.


You can ignore the existence of the keys. Their sole purpose is to 
allow the PDS code to locate the correct record which contains the 
entry information without the need to read the full directory 
sequentially to locate the entry. You use the key to locate the 
required record and read IT sequentially.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-09 Thread Robert A. Rosenberg
At 15:30 -0400 on 09/07/2012, Shmuel Metz (Seymour J.) wrote about 
Re: Anyone know how to copy a PDS directory as a flat file?:



 Got paraphrase of WAD.

Broken as designed?


That is BAD - ie: The design is wrong but the code works as the 
design says it should.


WAD is Working As Designed - The code works as the design says it 
should and the design describes the intended result/functioning.


In this case it is WAD if you want to find the entries in any of the 
PDS and PDS(E) Libraries in the concatenation ignoring any HFS 
libraries encountered (and if the same name occurs in more than one 
library, return the first one encountered). It is BAD if you do not 
want to ignore HFS Libraries in the concatenation.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Charles Mills
 (The OP would be you, right?)

Yup. That's what makes me the expert on what his question meant.

 However, you cannot sequentially read a UNIX directory.

Bummer indeed. I need a module that can sort out four cases, given a z/OS file 
name.

- It is a sequential conventional dataset or PDS member.
- It is a PDS(E): return all of the effective names, i.e., for a PDS FOO.BAR, 
return FOO.BAR(MEMBER1), FOO.BAR(MEMBER2), ...
- It is a regular HFS file
- It is an HFS directory: return all of the effective names, i.e., for foo/bar, 
return foo/bar/file1, foo/bar/file2, ...

Oh yeah, with wildcard masking on the file or member names. 

It is a much bigger job than it ought to be. It is a Sherlock Holmes job 
figuring out which of the four cases applies. Not the biggest programming job 
ever -- yes, I have all of the little tricks figured out -- but bigger than it 
ought to be. 

How many times has this wheel been re-invented? 

Yeah, I could use DESERV for the PDS instead of reading the directory, but I 
would have to build a C-Assembler front-end to do so. Not much different than 
just doing the job in C. A little harder to maintain, because there is logic in 
two places (and I have both skill sets, but a future maintainer might not).

The PDS thing is kind of fun in C++. I have a PDS directory entry class that 
has a member that knows how to get the next entry in the block:

inline int PDSdirEntryLen() { return (C.numberOfUserDataHalfwords * 2) + 
sizeof(memberName) + sizeof(C) + sizeof(firstRecord); }

inline PDSdirEntry *PDSdirEntryNext() { return reinterpret_castPDSdirEntry *( 
PDSdirEntryLen() + reinterpret_castchar *(this) ); }  

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Thursday, September 06, 2012 6:45 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

On Thu, 6 Sep 2012 15:30:57 -0700, Charles Mills wrote:

Nope, the below is one of the answers to the OP's question.

(The OP would be you, right?)

It also works for PDSE, believe it or not.

It says that in Using Data Sets, 3.8.11 Reading a PDSE Directory:

You can read a PDSE directory sequentially just by opening the data set 
(without using positioning macros) and reading it.
...
If you also want to read the keys (the name of the last member in that 
block), use BSAM and specify KEYLEN=8. 

It fakes it all.  It even fakes keys.  But does it return a usable TTR; one 
that can be used in a subsequent POINT?
...
However, you cannot sequentially read a UNIX directory.

Bummer.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Shmuel Metz (Seymour J.)
In 07df01cd8c4d$b1408b20$13c1a160$@mcn.org, on 09/06/2012
   at 09:35 AM, Charles Mills charl...@mcn.org said:

Did you read my preceding post? g

The one that denied the key field for PDS directory blocks? ;-)

BTW, I saw a quote from an earlier message, but not the message
itself, talking about reading directory blocks from a PDSE. For the
record, those are not the actual PDSE directory blocks[1][2] but fake
blocks made to look like they came from a PDS; ise DESERV if you want
the actuial entries. And, yes, the TTR's are usable.

[1] Mapped by IGWSMDE

[2] No entries with names longer than 8 will be retruned.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Paul Gilmartin
On Fri, 7 Sep 2012 07:03:10 -0700, Charles Mills wrote:

How many times has this wheel been re-invented? 

Yeah, I could use DESERV for the PDS instead of reading the directory,

Does DESERV understand UNIX directories?  ISTR not.

And I suspect that ISPF still relies on reading PDS(E) directories as
PS data sets rather than using DESERV.  Likely a major reason for the
simulated directory support for PDSE.

And the DDLIST panel's MEMBER command will return only members
of PDS(E), not UNIX directories in mixed catenations, potentially
badly misleading when the name occurs in an earlier UNIX catenand.
PMR.  Got paraphrase of WAD.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Bob Shannon
And I suspect that ISPF still relies on reading PDS(E) directories as PS data 
sets rather than using DESERV

I would be astounded if ISPF doesn't use standard services. 

Since the format of PDSEs has never been published, and since directory space 
can be created when needed in non-contiguous areas, I seriously doubt ISPF can 
read the directory as a PS data set. 

Bib Shannon
Rocket Software

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Charles Mills
 I seriously doubt ISPF can read the directory as a PS data set

But that's the thing -- anyone can. It's fairly trivial. Follow the PDS 
directory read documentation, and it works like magic on a PDSE. (I have no 
knowledge or opinion on what ISPF actually does.)

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bob Shannon
Sent: Friday, September 07, 2012 8:49 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

And I suspect that ISPF still relies on reading PDS(E) directories as 
PS data sets rather than using DESERV

I would be astounded if ISPF doesn't use standard services. 

Since the format of PDSEs has never been published, and since directory space 
can be created when needed in non-contiguous areas, I seriously doubt ISPF can 
read the directory as a PS data set. 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Paul Gilmartin
On Fri, 7 Sep 2012 15:30:25 -0400, Shmuel Metz (Seymour J.) wrote:

Got paraphrase of WAD.

Broken as designed?
 
Something to the effect that DDLIST was designed to use ISPF
services to support ISPF functions, and ISPF has no service to
scan a UNIX directory.  They also mentioned that DDLIST is somehow
oriented to problem analysis.  I pointed out that identifying the
wrong member of a library catenation can seriously mislead a
programmer attempting to analyze a problem.  They were
unmoved.

That was several years ago.  ISPF has become more UNIX-friendly
in the interim.  DDLIST remains BAD.

I routinely use UNIX directories in my SYSEXEC catenation, but
the first catenand must not not be a UNIX directory.  I reported
this as a problem, and IBM says, Not supported.  They give
the appearance of not caring.  (I get sporadic S0C4 when exiting
a panel, but never more than once per session.)

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-07 Thread Greg Price
On 8/09/2012 1:49 AM, Bob Shannon wrote:
 Since the format of PDSEs has never been published, and since directory space 
 can be created when 
needed in non-contiguous areas, I seriously doubt ISPF can read the directory 
as a PS data set.

Well, if reading the directory with QSAM or BSAM counts, then why not?

The REVIEW command can be used with the DATA operand
to browse the directory of a PDS or PDSE.  It uses BSAM so
the hardware keys can be seen as well.  You could then
use the CUT subcommand to copy it to a data set if that
was your fancy.

For a PDSE end-of-file is presented right after the last
used directory block, whereas for a PDS the unused
directory blocks can also be read before reaching
end-of-file.

Time was when the first QSAM GET to a PDSE directory
returned a buffer of mainly zeros, but the second GET
gave access to the first (mocked up by the system)
directory block.  That was fixed a decade or two ago.

So, if ISPF reads the directory sequentially (and I do not
know if it does or not, though SMF 14/15 records might
give a clue) it could acquire all of the ISPF stats and
usual load module attributes for PDS and PDSE members.

Of course, DESERV does give extra directory entry
information for program objects which are not present
in the data structure described by the IHAPDS macro.

OTOH, I agree that ISPF would not directly access the 4K
blocks on the tracks occupied by a PDSE and figure out
the stats and facts using logic which decodes the internal
PDSE data structures.

Cheers,
Greg Price

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
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

//GENEREXEC 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)) 

but IEBGENER is too smart for that:

IEB311I CONFLICTING DCB PARAMETERS
IEB311I CONFLICTING DCB PARAMETERS   

(and copied nothing).

Anyone know how to accomplish this, short of writing an assembler program to
do it?  

Charles 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Paul Gilmartin
Specify LRECL

On Thu, 6 Sep 2012 06:28:42 -0700, Charles Mills wrote:

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

//GENEREXEC PGM=IEBGENER
//SYSUT1   DD   DSN=MY.PDS,DISP=SHR,RECFM=F,DSORG=PS

Add LRECL=256 should do it.

//SYSUT2   DD   DSN=THE.SAMPLE.PDSDIR,DISP=(NEW,CATLG),
//  SPACE=(TRK,(1,1))

but IEBGENER is too smart for that:

IEB311I CONFLICTING DCB PARAMETERS
IEB311I CONFLICTING DCB PARAMETERS

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Lizette Koehler
Charles,

If I recall when writing an Assembler Program for a STOW macro there were
some pointers on how to dump a PDS Directory.  And I think there may be
information in the ISPF Manuals as well.

Though I think you are better served by doing this with an assembler
program.  Also, remember IBM can change the info in the directory without
explanation.

Lizette


 
 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
 
 //GENEREXEC 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))
 
 but IEBGENER is too smart for that:
 
 IEB311I CONFLICTING DCB PARAMETERS
 IEB311I CONFLICTING DCB PARAMETERS
 
 (and copied nothing).
 
 Anyone know how to accomplish this, short of writing an assembler program
to
 do it?
 
 Charles
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Scott Ford
Charles,

You can create the file using IEFBR14 ...haven't tried to copy a directory to 
it ...

Scott ford
www.identityforge.com

On Sep 6, 2012, at 9:28 AM, Charles Mills charl...@mcn.org wrote:

 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
 
 //GENEREXEC 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)) 
 
 but IEBGENER is too smart for that:
 
 IEB311I CONFLICTING DCB PARAMETERS
 IEB311I CONFLICTING DCB PARAMETERS   
 
 (and copied nothing).
 
 Anyone know how to accomplish this, short of writing an assembler program to
 do it?  
 
 Charles 
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread John Gilmore
Lizette's point that IBM can change the information in a PDS directory
without notice is of course generically correct

That conceded, such changes have been infrequent for many years; and
the functional stabilization of PDS support that came about with the
introduction of PDSEs makes further such changes unlikely.  Brutally
put, PDSEs are changing, PDSs are not.

Have you succeeded in opening your PDS as a sequential file?

--jg

On 9/6/12, Lizette Koehler stars...@mindspring.com wrote:
 Charles,

 If I recall when writing an Assembler Program for a STOW macro there were
 some pointers on how to dump a PDS Directory.  And I think there may be
 information in the ISPF Manuals as well.

 Though I think you are better served by doing this with an assembler
 program.  Also, remember IBM can change the info in the directory without
 explanation.

 Lizette



 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

 //GENEREXEC 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))

 but IEBGENER is too smart for that:

 IEB311I CONFLICTING DCB PARAMETERS
 IEB311I CONFLICTING DCB PARAMETERS

 (and copied nothing).

 Anyone know how to accomplish this, short of writing an assembler program
 to
 do it?

 Charles


 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Bill Fairchild
Assuming you have the authority to do so, superzap the F1 DSCB for your source 
PDS so that its DSORG is PS instead of PO.  Then do your IEBGENER.  Then zap 
the F1 back to PO.  It might work.  I have never tried this myself.

Bill Fairchild
Programmer
Rocket Software
408 Chamberlain Park Lane * Franklin, TN 37069-2526 * USA
t: +1.617.614.4503 *  e: bfairch...@rocketsoftware.com * w: 
www.rocketsoftware.com


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Thursday, September 06, 2012 8:29 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Anyone know how to copy a PDS directory as a flat file?

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

//GENEREXEC 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)) 

but IEBGENER is too smart for that:

IEB311I CONFLICTING DCB PARAMETERS
IEB311I CONFLICTING DCB PARAMETERS   

(and copied nothing).

Anyone know how to accomplish this, short of writing an assembler program to
do it?  

Charles 

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread John P Kalinich
There are also software vendors that can change the information in a PDS
directory without notice.  PDSMAN and Endevor come to mind.

Regards,
John K

John Gilmore of the IBM Mainframe Discussion List
IBM-MAIN@listserv.ua.edu wrote on 09/06/2012 08:56:31 AM:

 Lizette's point that IBM can change the information in a PDS directory
 without notice is of course generically correct

 That conceded, such changes have been infrequent for many years; and
 the functional stabilization of PDS support that came about with the
 introduction of PDSEs makes further such changes unlikely.  Brutally
 put, PDSEs are changing, PDSs are not.

 Have you succeeded in opening your PDS as a sequential file?

 --jg

 On 9/6/12, Lizette Koehler stars...@mindspring.com wrote:
  Charles,
 
  If I recall when writing an Assembler Program for a STOW macro there
were
  some pointers on how to dump a PDS Directory.  And I think there may be
  information in the ISPF Manuals as well.
 
  Though I think you are better served by doing this with an assembler
  program.  Also, remember IBM can change the info in the directory
without
  explanation.
 
  Lizette
 
 
 
  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
 
  //GENEREXEC 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))
 
  but IEBGENER is too smart for that:
 
  IEB311I CONFLICTING DCB PARAMETERS
  IEB311I CONFLICTING DCB PARAMETERS
 
  (and copied nothing).
 
  Anyone know how to accomplish this, short of writing an assembler
program
  to
  do it?
 
  Charles

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Webster, Chris
This should work for you.

//GENEREXEC PGM=IEBGENER 
//SYSPRINT DD SYSOUT=*   
//SYSUT1   DD   DSN=MY.CLIST,DISP=SHR,RECFM=FB,DSORG=PS, 
// LRECL=256,BLKSIZE=256 
//SYSUT2   DD DISP=SHR,DSN=MY.CLIST.DIR, 
// SPACE=(CYL,(5,1),RLSE),STORCLAS=DEVS90,   
// LRECL=256,RECFM=FB,DSORG=PS   
//SYSIN DD DUMMY 

...chris.

 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Charles Mills
 Sent: Thursday, September 06, 2012 8:29 AM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Anyone know how to copy a PDS directory as a flat file?
 
 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
 
 //GENEREXEC 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))
 
 but IEBGENER is too smart for that:
 
 IEB311I CONFLICTING DCB PARAMETERS
 IEB311I CONFLICTING DCB PARAMETERS
 
 (and copied nothing).
 
 Anyone know how to accomplish this, short of writing an assembler program
 to
 do it?
 
 Charles
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions, send email to
 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread John Gilmore
The content of a PDS directory can of course change.   How not?

My points were two: 1)  that it has been a very long time since
changes in a mapping DSECT for a PDS directory block were required,
and 2) that such changes are now highly unlikely.   (Neither PDSMAN
nor Endevor makes use of new or redefined fields.)

Such a change is not, of course, absolutely precluded; nor again is
grave damage inflicted by a purple cow falling from the sky.

--jg

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Paul Gilmartin
On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:

Assuming you have the authority to do so, superzap the F1 DSCB for your source 
PDS so that its DSORG is PS instead of PO.  Then do your IEBGENER.  Then zap 
the F1 back to PO.  It might work.  I have never tried this myself.
 
Perhaps you don't know about overrides in JCL DD and ALLOCATE
commands?

Adding to my prior remark, specify _everything_ in SYSUT1 DD.
DSORG, RECFM, LRECL, BLKSIZE.


On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:

Lizette's point that IBM can change the information in a PDS directory
without notice is of course generically correct

That conceded, such changes have been infrequent for many years; and
the functional stabilization of PDS support that came about with the
introduction of PDSEs makes further such changes unlikely.  Brutally
put, PDSEs are changing, PDSs are not.
 
So much IBM software (probably ISPF) and customer software depend
on the PDS directory format that I understand that a PDSE can be
opened as PS and PDSE support emulates the PDS directory format.

Have you succeeded in opening your PDS as a sequential file?

I've done it in Rexx.  Assembler is for people who like that sort of thing.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Kirk Wolf
I'm certain that you can read a PDS directory by specifying a DD with
DSORG=PS,RECFM=F,LRECL=256,BLKSIZE=256.

But don't PDS directory blocks have keys on disk?   IEBGENER won't copy
those - your target dataset will be regular DSORG=PS.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com
+1 636.300.0901

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Tony's office PC

I've used this simple method in the past

//S1 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=YOUR.OUTPUT.FILE,DISP=(NEW,CATLG,), etc etc etc
//SYSTSIN DD *
PROF NOPREFIX
LISTDS 'YOUR.PDS' MEMBERS




- Original Message - 
From: Paul Gilmartin paulgboul...@aim.com

Newsgroups: bit.listserv.ibm-main
To: IBM-MAIN@LISTSERV.UA.EDU
Sent: Thursday, September 06, 2012 9:55 AM
Subject: Re: Anyone know how to copy a PDS directory as a flat file?


On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:

Assuming you have the authority to do so, superzap the F1 DSCB for your 
source PDS so that its DSORG is PS instead of PO.  Then do your IEBGENER. 
Then zap the F1 back to PO.  It might work.  I have never tried this 
myself.



Perhaps you don't know about overrides in JCL DD and ALLOCATE
commands?

Adding to my prior remark, specify _everything_ in SYSUT1 DD.
DSORG, RECFM, LRECL, BLKSIZE.


On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:


Lizette's point that IBM can change the information in a PDS directory
without notice is of course generically correct

That conceded, such changes have been infrequent for many years; and
the functional stabilization of PDS support that came about with the
introduction of PDSEs makes further such changes unlikely.  Brutally
put, PDSEs are changing, PDSs are not.


So much IBM software (probably ISPF) and customer software depend
on the PDS directory format that I understand that a PDSE can be
opened as PS and PDSE support emulates the PDS directory format.


Have you succeeded in opening your PDS as a sequential file?

I've done it in Rexx.  Assembler is for people who like that sort of 
thing.


-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Lizette Koehler
Tony,

That will list the members, I think Charles wants the hex data found in the 
directory itself. I am not sure there is an option on LISTD that will dump the 
HEX data of the directory itself.

Lizette


 I've used this simple method in the past
 
  //S1 EXEC PGM=IKJEFT01
  //SYSTSPRT DD DSN=YOUR.OUTPUT.FILE,DISP=(NEW,CATLG,), etc etc etc
 //SYSTSIN DD *  PROF NOPREFIX  LISTDS 'YOUR.PDS' MEMBERS
 
 
 
 
  - Original Message -
  From: Paul Gilmartin paulgboul...@aim.com
  Newsgroups: bit.listserv.ibm-main
  To: IBM-MAIN@LISTSERV.UA.EDU
  Sent: Thursday, September 06, 2012 9:55 AM
  Subject: Re: Anyone know how to copy a PDS directory as a flat file?
 
 
  On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:
 
 Assuming you have the authority to do so, superzap the F1 DSCB for
 your source PDS so that its DSORG is PS instead of PO.  Then do your 
 IEBGENER.
 Then zap the F1 back to PO.  It might work.  I have never tried this
 myself.
 
  Perhaps you don't know about overrides in JCL DD and ALLOCATE
  commands?
 
  Adding to my prior remark, specify _everything_ in SYSUT1 DD.
  DSORG, RECFM, LRECL, BLKSIZE.
 
 
  On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:
 
 Lizette's point that IBM can change the information in a PDS directory
 without notice is of course generically correct
 
 That conceded, such changes have been infrequent for many years; and
 the functional stabilization of PDS support that came about with the
 introduction of PDSEs makes further such changes unlikely.  Brutally
 put, PDSEs are changing, PDSs are not.
 
  So much IBM software (probably ISPF) and customer software depend on
  the PDS directory format that I understand that a PDSE can be opened
  as PS and PDSE support emulates the PDS directory format.
 
 Have you succeeded in opening your PDS as a sequential file?
 
  I've done it in Rexx.  Assembler is for people who like that sort of
  thing.
 
  -- gil
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread John Gilmore
Chris Webster's JCL will do the job, and I like its restraint.  The
input BLKSIZE= is necessary and is specified.  An output BLKSIZE= is
inappropriate and is not specified.

Moreover, while I have never myself encountered a PDS directory that
filled even five 3390 crypto-cylinders, reference to the manual shows
that such a directory is, at least in principle, possible.

--jg

On 9/6/12, Kirk Wolf k...@dovetail.com wrote:
 I'm certain that you can read a PDS directory by specifying a DD with
 DSORG=PS,RECFM=F,LRECL=256,BLKSIZE=256.

 But don't PDS directory blocks have keys on disk?   IEBGENER won't copy
 those - your target dataset will be regular DSORG=PS.

 Kirk Wolf
 Dovetailed Technologies
 http://dovetail.com
 +1 636.300.0901

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Tony's office PC
Yep, correct.  I optimistically thought the OP was content with a member 
list.  When I want all the detail I've used SAS PROC SOURCE.





- Original Message - 
From: Lizette Koehler stars...@mindspring.com

Newsgroups: bit.listserv.ibm-main
To: IBM-MAIN@LISTSERV.UA.EDU
Sent: Thursday, September 06, 2012 10:21 AM
Subject: Re: Anyone know how to copy a PDS directory as a flat file?


Tony,

That will list the members, I think Charles wants the hex data found in the 
directory itself. I am not sure there is an option on LISTD that will dump 
the HEX data of the directory itself.


Lizette



I've used this simple method in the past

 //S1 EXEC PGM=IKJEFT01
 //SYSTSPRT DD DSN=YOUR.OUTPUT.FILE,DISP=(NEW,CATLG,), etc etc etc
//SYSTSIN DD *  PROF NOPREFIX  LISTDS 'YOUR.PDS' MEMBERS




 - Original Message -
 From: Paul Gilmartin paulgboul...@aim.com
 Newsgroups: bit.listserv.ibm-main
 To: IBM-MAIN@LISTSERV.UA.EDU
 Sent: Thursday, September 06, 2012 9:55 AM
 Subject: Re: Anyone know how to copy a PDS directory as a flat file?


 On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:

Assuming you have the authority to do so, superzap the F1 DSCB for
your source PDS so that its DSORG is PS instead of PO.  Then do your 
IEBGENER.

Then zap the F1 back to PO.  It might work.  I have never tried this
myself.

 Perhaps you don't know about overrides in JCL DD and ALLOCATE
 commands?

 Adding to my prior remark, specify _everything_ in SYSUT1 DD.
 DSORG, RECFM, LRECL, BLKSIZE.


 On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:

Lizette's point that IBM can change the information in a PDS directory
without notice is of course generically correct

That conceded, such changes have been infrequent for many years; and
the functional stabilization of PDS support that came about with the
introduction of PDSEs makes further such changes unlikely.  Brutally
put, PDSEs are changing, PDSs are not.

 So much IBM software (probably ISPF) and customer software depend on
 the PDS directory format that I understand that a PDSE can be opened
 as PS and PDSE support emulates the PDS directory format.

Have you succeeded in opening your PDS as a sequential file?

 I've done it in Rexx.  Assembler is for people who like that sort of
 thing.

 -- gil



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread John Gilmore
Lizette is correct.  There is/was no such option.

There are a number of routines out there that provide what amount to
formatted dumps of PDS directories.  C's original post did, however,
suggest that he needed a portable dataset, one he could take
elsewhere, containing the contents of such a directory.

--jg

On 9/6/12, Lizette Koehler stars...@mindspring.com wrote:
 Tony,

 That will list the members, I think Charles wants the hex data found in the
 directory itself. I am not sure there is an option on LISTD that will dump
 the HEX data of the directory itself.

 Lizette


 I've used this simple method in the past

  //S1 EXEC PGM=IKJEFT01
  //SYSTSPRT DD DSN=YOUR.OUTPUT.FILE,DISP=(NEW,CATLG,), etc etc etc
 //SYSTSIN DD *  PROF NOPREFIX  LISTDS 'YOUR.PDS' MEMBERS




  - Original Message -
  From: Paul Gilmartin paulgboul...@aim.com
  Newsgroups: bit.listserv.ibm-main
  To: IBM-MAIN@LISTSERV.UA.EDU
  Sent: Thursday, September 06, 2012 9:55 AM
  Subject: Re: Anyone know how to copy a PDS directory as a flat file?
 
 
  On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:
 
 Assuming you have the authority to do so, superzap the F1 DSCB for
 your source PDS so that its DSORG is PS instead of PO.  Then do your
  IEBGENER.
 Then zap the F1 back to PO.  It might work.  I have never tried this
 myself.
 
  Perhaps you don't know about overrides in JCL DD and ALLOCATE
  commands?
 
  Adding to my prior remark, specify _everything_ in SYSUT1 DD.
  DSORG, RECFM, LRECL, BLKSIZE.
 
 
  On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:
 
 Lizette's point that IBM can change the information in a PDS directory
 without notice is of course generically correct
 
 That conceded, such changes have been infrequent for many years; and
 the functional stabilization of PDS support that came about with the
 introduction of PDSEs makes further such changes unlikely.  Brutally
 put, PDSEs are changing, PDSs are not.
 
  So much IBM software (probably ISPF) and customer software depend on
  the PDS directory format that I understand that a PDSE can be opened
  as PS and PDSE support emulates the PDS directory format.
 
 Have you succeeded in opening your PDS as a sequential file?
 
  I've done it in Rexx.  Assembler is for people who like that sort of
  thing.
 
  -- gil
 

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
Ta-da! Thanks all. The below was sufficient. (And as a bonus, it didn't even 
hose up my original PDS!) Thanks all.

//GENEREXEC PGM=IEBGENER  
//SYSUT1   DD   DSN=MY.PDS,DISP=SHR,RECFM=F,DSORG=PS, 
//  LRECL=256,BLKSIZE=256 
//SYSUT2   DD   DSN=THE.SAMPLE.PDSDIR,DISP=(NEW,CATLG),
//  SPACE=(TRK,(1,1)),RECFM=F,LRECL=256,BLKSIZE=256,DSORG=PS  
//SYSPRINT DD   SYSOUT=*  
//SYSINDD   DUMMY  
   
Was good enough to make ISPF edit happy:

** * Top 
01  8$GINCL1 
   0F5CCDCDF40020002012020200
   08B7953310081F1101198F198F640E
-
02  ¹GINCLUD4GP2INCLUGSAMPLE 
   0DCCDCDECF0020CDFCDCDECECDDDC4
   0A79533444003077295334011072147350
-

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Thursday, September 06, 2012 6:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

Specify LRECL

On Thu, 6 Sep 2012 06:28:42 -0700, Charles Mills wrote:

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.)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
Yes, I have done that in the past. I no longer own that code, so I am doing
it again. C++ this time, FWIW.

IBM could change anything at any time but I think the basic format of PDS
directories is going to outlive most of us. FWIW it's documented in Using
Datasets and there is no note that it is not GUPI.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Lizette Koehler
Sent: Thursday, September 06, 2012 6:46 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

Charles,

If I recall when writing an Assembler Program for a STOW macro there were
some pointers on how to dump a PDS Directory.  And I think there may be
information in the ISPF Manuals as well.

Though I think you are better served by doing this with an assembler
program.  Also, remember IBM can change the info in the directory without
explanation.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
 But don't PDS directory blocks have keys on disk?

I don't *think* so.

In any event I just want something I can FTP to another box and that will
behave like reading the first few blocks of a PDS with B/QSAM, so the keys
don't matter to me.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Kirk Wolf
Sent: Thursday, September 06, 2012 8:05 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

I'm certain that you can read a PDS directory by specifying a DD with
DSORG=PS,RECFM=F,LRECL=256,BLKSIZE=256.

But don't PDS directory blocks have keys on disk?   IEBGENER won't copy
those - your target dataset will be regular DSORG=PS.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Shmuel Metz (Seymour J.)
In
CAHm_n2=y0-wuhodm8q0cyfat2edh-u8mpco4jd0o_sdjc91...@mail.gmail.com,
on 09/06/2012
   at 10:05 AM, Kirk Wolf k...@dovetail.com said:

But don't PDS directory blocks have keys on disk?

Yes, but the OP asked for 256 bytes, suggesting that he doesn't need
the keys and in fact is not prepared to deal with them.

KEYLEN=8 will work if you need the full 264 bytes, but that's not
normally appropriate.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Shmuel Metz (Seymour J.)
In 071a01cd8c33$88e2d440$9aa87cc0$@mcn.org, on 09/06/2012
   at 06:28 AM, Charles Mills charl...@mcn.org said:

Anyone know how to accomplish this, short of writing an assembler
program to do it?  

Write a PL/I or REXX program to read the directory. Assuming that you
don't need the key, the DCB attributes should include LRECL=256 and
BLKSIZE=256. RECFM can be F, FB or U.

Did you try IEBGENER with explicit DCB attributes?

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
 Did you try IEBGENER with explicit DCB attributes?

Did you read my preceding post? g

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Shmuel Metz (Seymour J.)
Sent: Thursday, September 06, 2012 9:15 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

In 071a01cd8c33$88e2d440$9aa87cc0$@mcn.org, on 09/06/2012
   at 06:28 AM, Charles Mills charl...@mcn.org said:

Anyone know how to accomplish this, short of writing an assembler 
program to do it?

Write a PL/I or REXX program to read the directory. Assuming that you don't
need the key, the DCB attributes should include LRECL=256 and BLKSIZE=256.
RECFM can be F, FB or U.

Did you try IEBGENER with explicit DCB attributes?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Roberto Halais
If you are in tso 3.4 and looking at the pds directory and you issue:

SAVE LIST

you will get a sequential file with:  USERID.LIST.MEMBERS

IIRC

On Thu, Sep 6, 2012 at 11:39 AM, John Gilmore jwgli...@gmail.com wrote:

 Lizette is correct.  There is/was no such option.

 There are a number of routines out there that provide what amount to
 formatted dumps of PDS directories.  C's original post did, however,
 suggest that he needed a portable dataset, one he could take
 elsewhere, containing the contents of such a directory.

 --jg

 On 9/6/12, Lizette Koehler stars...@mindspring.com wrote:
  Tony,
 
  That will list the members, I think Charles wants the hex data found in
 the
  directory itself. I am not sure there is an option on LISTD that will
 dump
  the HEX data of the directory itself.
 
  Lizette
 
 
  I've used this simple method in the past
 
   //S1 EXEC PGM=IKJEFT01
   //SYSTSPRT DD DSN=YOUR.OUTPUT.FILE,DISP=(NEW,CATLG,), etc etc etc
  //SYSTSIN DD *  PROF NOPREFIX  LISTDS 'YOUR.PDS' MEMBERS
 
 
 
 
   - Original Message -
   From: Paul Gilmartin paulgboul...@aim.com
   Newsgroups: bit.listserv.ibm-main
   To: IBM-MAIN@LISTSERV.UA.EDU
   Sent: Thursday, September 06, 2012 9:55 AM
   Subject: Re: Anyone know how to copy a PDS directory as a flat file?
  
  
   On Thu, 6 Sep 2012 14:14:43 +, Bill Fairchild wrote:
  
  Assuming you have the authority to do so, superzap the F1 DSCB for
  your source PDS so that its DSORG is PS instead of PO.  Then do your
   IEBGENER.
  Then zap the F1 back to PO.  It might work.  I have never tried this
  myself.
  
   Perhaps you don't know about overrides in JCL DD and ALLOCATE
   commands?
  
   Adding to my prior remark, specify _everything_ in SYSUT1 DD.
   DSORG, RECFM, LRECL, BLKSIZE.
  
  
   On Thu, 6 Sep 2012 09:56:31 -0400, John Gilmore wrote:
  
  Lizette's point that IBM can change the information in a PDS directory
  without notice is of course generically correct
  
  That conceded, such changes have been infrequent for many years; and
  the functional stabilization of PDS support that came about with the
  introduction of PDSEs makes further such changes unlikely.  Brutally
  put, PDSEs are changing, PDSs are not.
  
   So much IBM software (probably ISPF) and customer software depend on
   the PDS directory format that I understand that a PDSE can be opened
   as PS and PDSE support emulates the PDS directory format.
  
  Have you succeeded in opening your PDS as a sequential file?
  
   I've done it in Rexx.  Assembler is for people who like that sort of
   thing.
  
   -- gil
  
 
  --
  For IBM-MAIN subscribe / signoff / archive access instructions,
  send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN




-- 
Men will never be free until the last king is strangled with the entrails
of the last priest. Denis Diderot

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Steve Thompson
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

//GENEREXEC 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Stocker, Herman
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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Thompson
Sent: Thursday, September 06, 2012 2:19 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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

//GENEREXEC 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 
lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Charles Mills
Nope, the below is one of the answers to the OP's question. It also works
for PDSE, believe it or not.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Stocker, Herman
Sent: Thursday, September 06, 2012 11:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Anyone know how to copy a PDS directory as a flat file?

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:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Steve Thompson
Sent: Thursday, September 06, 2012 2:19 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Shmuel Metz (Seymour J.)
In 07b601cd8c4a$4065bbd0$c1313370$@mcn.org, on 09/06/2012
   at 09:11 AM, Charles Mills charl...@mcn.org said:

 But don't PDS directory blocks have keys on disk?

I don't *think* so.

Always has, always will. From z/OS DFSMS Using Data Sets.
SC26-7410-09:

 3.7.2  PDS Directory

   PDS member entries vary in length and are blocked into 256-byte
blocks.
   Each block contains as many complete entries as will fit in a
maximum of
   254 bytes. Any remaining bytes are left unused and are ignored.
Each
   directory block contains a 2-byte count field that specifies the
number of
   active bytes in a block (including the count field). In Figure 110,
each
   block is preceded by a hardware-defined key field containing the
name of
   the last member entry in the block, that is, the member name with
the
   highest binary value. Figure 110 shows the format of the block
returned
   when using BSAM to read the directory.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2http://patriot.net/~shmuel
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Anyone know how to copy a PDS directory as a flat file?

2012-09-06 Thread Paul Gilmartin
On Thu, 6 Sep 2012 15:30:57 -0700, Charles Mills wrote:

Nope, the below is one of the answers to the OP's question.

(The OP would be you, right?)

It also works for PDSE, believe it or not.

It says that in Using Data Sets, 3.8.11 Reading a PDSE Directory:

You can read a PDSE directory sequentially just by opening the data set 
(without using positioning macros) and reading it.
...
If you also want to read the keys (the name of the last member in that 
block), use BSAM and specify KEYLEN=8. 

It fakes it all.  It even fakes keys.  But does it return a usable TTR;
one that can be used in a subsequent POINT?
...
However, you cannot sequentially read a UNIX directory.

Bummer.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN