errno=37 while getting a BufferedReader

General discussion on the JZOS batch launcher and toolkit
Post Reply
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

errno=37 while getting a BufferedReader

Post by Cogito-Ergo-Sum »

Hello all,
Can someone please tell me what is to be done for the following message ?

Code: Select all

EDC5037I The specified ddname was not found. errno=37 errno2=0xc00b05b1 last_op=40
Firstly, the job step is having the DD name coded. Secondly, I am not able to locate the errno=37 in /usr/include/errno.h. Thirdly, I do not see 05b1 in errno2 list in the USS Messages and Codes manual.

This is the method I have:

Code: Select all

public BufferedReader getBuffInput(String DDname) throws IOException {
 BufferedReader iBuff = FileFactory.newBufferedReader(DDname);        
 return iBuff;                                                        
}    
where, DDname is "//DD:NAME".

At Java 5, 64 bit on z/OS V1R9.

Help !

Regards,
Nagesh
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

This problem happens even on Java 5, z/OS V1R9.

Regards,
Nagesh
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

I am also baffled at the EDC message and errno that you are getting. It doesn't seem to be documented anywhere.

Are you launching the JVM with the JZOS batch launcher? Otherwise, (and especially if you are using BPXBATCH), your JVM may be in a separate address space and the DDNAME will be unavailable.

BTW, the following works fine for me if I run under the JZOS batch launcher:

Code: Select all

import java.io.BufferedReader;
import com.ibm.jzos.FileFactory;

public class DDReaderTest {

	public static void main(String args[]) throws Exception {
		BufferedReader rdr = FileFactory.newBufferedReader("//DD:INPUT");
		String line = null;
		int count = 0;
		while ((line = rdr.readLine()) != null) {
			System.out.println("" + (++count) + ": " + line);
		}
		rdr.close();
	}
}
If this is of no help, I can only suggest that you open a PMR with IBM, expecially since you are getting an undocumented message from LE.
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

Hello,
Are you launching the JVM with the JZOS batch launcher? Otherwise, (and especially if you are using BPXBATCH), your JVM may be in a separate address space and the DDNAME will be unavailable.
I just noticed that, when I run with Batch Launcher, the step runs forever with no messages whatsoever. The message indeed comes from using BPXBATCH. How do I ensure that they run in the same address space ? (I vaguely recall reading something to the effect of different address space but do not know where.)

Finally, this problem does not happen regularly. Its almost idiosyncratic ! There are instances of getting BufferedReader in JZOS or BPXBATCH that ran successfully.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

Hi,
Just for curiosity's sake, can you please try getting more than one BufferedReader instances in the same main() method ?

BTW, I tried with _BPX_SHAREAS=NO and _BPX_SPAWN_SCRIPT=NO. That did not help either.

Regards,
Nagesh
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Well, what the heck is the matter with you? This is precisely why we wrote JZOS :).

Seriously, if you want to access DD names, you'll either need to use BPXBATSL or the JZOS batch launcher. We specifically don't provide any support for bpxbat(sl) here.
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

Well, what the heck is the matter with you?
Just this, Steve...
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
:)
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
Cogito-Ergo-Sum
Posts: 30
Joined: Thu Jan 25, 2007 8:31 am
Location: Bengaluru, India

Post by Cogito-Ergo-Sum »

Roiling things here: developerWorks
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
--Sherlock Holmes
Post Reply