Etienne Thijsse wrote:
On Mon, 26 Jul 2010 12:23:10 -0500, Paul Gilmartin <paulgboul...@aim.com> wrote:

On Mon, 26 Jul 2010 11:02:24 -0500, Etienne Thijsse wrote:
If I use the C function remove() to remove a member from a PDSE, then from
that moment on, the PDSE is locked, ISPF says "in use", I can't create a new
member in it using fopen() in the same program. The PDSE only gets
unlocked
after the program has ended.

The C RTL is a moron.  It ought to use ISPF-style serialization
rather than doing a blanket RESERVE.  (I know; Shmuel will say
that wouldn't be safe.  Tell that to the ISPF designers.)

And it ought to know the rules are different for PDSEs.

If remove() fails to close the data set when it finishes, this
ought to be cause for a PMR.  But is there another stream that
might be holding the data set open?

-- gil

Thanks for responding, Gil. There is no other stream. When I run under the debugger, the PDSE remains accessible with ISPF right up to the remove() statement; when I step over it, it is locked.

I think I will try some other methods to remove it, maybe a dynalloc() with __DISP_DELETE followed by dynfree() will remove it without locking up the PDSE. Or maybe if I first allocate the PDSE with dynalloc and then remove() the member using the DDNAME, and then dynfree() the DDNAME; maybe that will work.


What is a real shame is that ISPF LMM services were not built on top of a services layer. In the 21st century the last thing a programmer wants to do is hack about with assembler macros. SAS/C has a nice BSAM low-level layer which has an osstow() function which is just what we need on z/OS. Unfortunately, it's time to RYO.


Thanks,

Etienne

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to