dovetail.com Forum Index dovetail.com
Knowledge Base / Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

D37 Abend in ZFile writing to a PDS that is out of space

 
Post new topic   Reply to topic    dovetail.com Forum Index -> JZOS
View previous topic :: View next topic  
Author Message
gregt



Joined: 05 Mar 2010
Posts: 2

PostPosted: Fri Mar 05, 2010 3:20 pm    Post subject: D37 Abend in ZFile writing to a PDS that is out of space Reply with quote

Hi there,

We're receiving a D37 abend when attempting to use ZFile to write a member in an existing partioned data set (PDS) that has no available space:

CEE3250C The system or user abend SD37 R=00000004 was ssued. From entry point ZFileImpl::close() at compile unit offset +0000000079D

Below is a small sniplet of the code that writes to this PDS. I've inserted debug statements and determined the abend occurs when the zFile.close() method is called. In addition, the code works properly when the PDS has available space.

String zJCLMember = ZFile.getSlashSlashQuotedDSN(jclDSName + "(" + dataSetMember + ")", true);
try {
zFile = new ZFile(zJCLMember, "wt,noseek,lrecl=80,"recfm=FB");
}
catch(ZFileException e){
// handle the error...
}
catch(RuntimeException e) {
// handle the error...
}

String enc = ZUtil.getDefaultPlatformEncoding();
try {
StringBuffer is = swriter.getBuffer();
BufferedReader in = new BufferedReader(new StringReader(is.toString()));
OutputStream os = zFile.getOutputStream();
BufferedWriter wtr = new BufferedWriter(new OutputStreamWriter(os, enc));
String outline;
while ((outline = in.readLine()) != null) {
wtr.write(outline);
wtr.newLine();
}
wtr.flush();
}
catch(ZFileException e){
// handle the error...
}
catch(Exception e) {
// handle the error...
}
finally {
try {
if (zFile != null) {
zFile.close();
}
}
catch(Exception e) {
// handle the error...
}
}

Shouldn't this type of error produce a ZFileException instead of a D37 abend?

Thanks for any assistance you can offer.

Greg Terwilliger
IBM SMPE Development
Back to top
View user's profile Send private message
dovetail
Site Admin


Joined: 29 Jul 2004
Posts: 878

PostPosted: Fri Mar 05, 2010 3:34 pm    Post subject: Reply with quote

Yes, it would be nice...

ZFile is a wrapper around the C Library, and there is a known problem with the C library in that some abends (such as this D37) are not handled by the C library. My understanding is that some of these are not even "retryable".

I suggest that you open a problem against the z/OS C library to see if this abend is one that they should have surfaced as an C I/O error rather than abending.
Back to top
View user's profile Send private message Send e-mail
gregt



Joined: 05 Mar 2010
Posts: 2

PostPosted: Mon Mar 08, 2010 11:56 am    Post subject: Reply with quote

Ok, thanks. So it sounds like there are a number of error conditions that could result in an abend instead of a C I/O error. Are you familiar with what these are? We were hoping to use ZFile to write a member in a PDS but may need to reevaulate it's use if the underlying C functions do not handle these types of errors.
Back to top
View user's profile Send private message
dovetail
Site Admin


Joined: 29 Jul 2004
Posts: 878

PostPosted: Mon Mar 08, 2010 12:18 pm    Post subject: Reply with quote

These should be documented in the z/OS C/C++ Programmers Guide.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    dovetail.com Forum Index -> JZOS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group