Tom, Thanks for clarifying. Its a pity that the C library doesn't have a call to set directory entry user data before closing. It seems like alot of overhead to OPEN/BLDL/POINT/STOW/CLOSE and rewrite the directory (at least those entries following the one that you updated) each time you replace a member. I assume that one could also use the new DESERV macro...
As far as the motivation for this: we're working on a file transfer tool and I thought that it would be nice if it created ISPF statistics when adding/replacing members. It would also be nice if the C library supported the ISPF ENQ/DEQ protocol for partitioned datasets. IBM's FTP server supports both and it is written mostly in C and doesn't require a TSO or ISPF environment... perhaps they aren't using their own crappy C library for PDS I/O ? :-) FWIW, the JZOS library uses the C library for dataset and PDS I/O, so it suffers the same limitations. It would be great if the C library had general support for DESERV, but I guess eventually z/OS legacy file structures will go away :-) Kirk On Tue, Jul 29, 2008 at 12:46 PM, Tom Marchant <[EMAIL PROTECTED]> wrote: > On Tue, 29 Jul 2008 18:20:27 +0200, Itschak Mugzach wrote: >> >>I don't know an interface, but you can open the PDS as a sequential file and >>read the directory until you get ZZ (if I remember correctly). Don't know >>what will happen if you'll try to write it back..., but I presume that if it >>conforms to the PDS directory format, it will be OK. > > Don't try doing this yourself. Use STOW. You might have to write an > assembler subroutine to do it. When you add the user data, the directory > entry will be larger and the rest of the directory will have to be > rewritten. STOW will take care of that for you. > > BTW, the high key is a PDS is 8 bytes of x'FF'. > > -- > Tom Marchant > > ---------------------------------------------------------------------- > 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 > > ---------------------------------------------------------------------- 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