On Tue, 27 Jul 2010 09:01:46 -0500, Etienne Thijsse wrote:
>
>That may well be true. At this moment however, I know nothing about ISPF
>services or how to call them from C. I'll keep this in mind as a lost resort, 
>if all
>else fails.

The best I can say is that it's in the book.

>At the moment I am contemplating creating a separate executable, DELMBR,
>that will use remove() to delete it, thereby locking the PDSE, but when it
>finishes, the PDSE is unlocked. If I use system() to call this program then
>maybe the PDSE won't be locked when DELMBR finishes and fopen()
>succeeds... hopefully.
>
Is your C program holding an ENQ SHR on the DSN?  You can probe this
prior to the remove() by submitting a batch job that attempts to
allocate the PDSE with DISP=OLD.  If you hold the ENQ SHR, then:

o If system(DELMBR) runs in the same address space, it will upgrade
  the ENQ to EXC and leave the PDSE locked.

o If system(DELMBR) runs in a separate address space, it will attempt
  to obtain an ENQ EXC and fail.

-- gil

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