Possibly the ADRDSSU or some other authorized program is OPENing a DCB, 
modifying its DEB, then when finished with that DCB it CLOSEs the DCB without 
having previously restored the DEB's contents that it altered, so that CLOSE 
cannot find the same DEB with the same contents that it uses for all of its 
compares and checks on each DEB.  I had this problem many years ago  when I 
built an authorized program to OPEN a DCB, change the DEB's extents, do I/O to 
the file, then CLOSE the DEB and I got a weird ABEND.  Then I added code to 
save the DEB fields that I planned to change before I changed them and restore 
them later just before doing the CLOSE.  No more weird ABEND. 
Bill Fairchild 

----- Original Message -----

From: "Alan Haff" <[email protected]> 
To: [email protected] 
Sent: Thursday, April 10, 2014 1:26:34 PM 
Subject: Re: Diagnosing QSAM CLOSE RC4 

Following up on this problem. 

The close fails because the DEB address in the DCB is pointing to a DEB 
that's not in the TCB's DEB chain. 

I don't know why/how the DEB chain in the TCB is losing this particular 
DEB. I'm certainly not manipulating the TCB in any way. Perhaps ADRDSSU is 
keeping track of its TCB and is restoring its copy when the exit returns 
control. 

For the time being, I've modified my code to open the DCB on each entry to 
the exit and then close it before I return control. (Previously I was 
opening the DCB when ADRDSSU called the exit at function startup and then 
closing the DCB when the exit got called at function end.) 

FYI, I'm doing all of this because I tried using file 678 on the CBT tape 
and I discovered that it's severely broken. 


On Thu, Apr 3, 2014 at 9:03 AM, Alan Haff <[email protected]> wrote: 

> I'm writing a relatively trivial assembler program that writes output to a 
> Unix file. I'm getting return code 4 from CLOSE, which of course simply 
> indicates that the close was unsuccessful. No additional diagnostic 
> messages are generated. 
> 
> I've confirmed that I haven't clobbered the DCB or otherwise mangled any 
> control blocks (as best I can tell, anyway). 
> 
> Any tips on how to determine the reason that CLOSE refused to close the 
> file? Thanks... 
> 
> (The program is an ADRDSSU User Interaction Module exit that reformats 
> DUMP records into AWSTAPE format and writes them to a Unix file. The path 
> will eventually be an NFS-mounted filesystem when I get everything working.) 
> 

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


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

Reply via email to