Is there any problem in Thread API or JNI API, that doesn't allow a thread to open (or read from ) COBOL VSAM files?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   srinivas_devatha
Posted On:   Thursday, June 5, 2003 05:21 AM

I am building a java servlet which has to read a COBOL index file. I have COBOL API for accessing the index file. Our organization has a C wrapper, which talks to that COBOL API. I am using JNI to make the C method call. When the method call "C1MATCHI" is being made, it throws the following error. C1MATCHI fatal error, Unable to open ZIPIDX, File status=35. File status 35 from IBM COBOL Manual says: An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a non-optional file that was not present. I have written a server socket application, which invokes the method C1MATCHI using JNI. I am making the method call inside a thread (needed for multi-threaded server socket ,right?).    More>>

I am building a java servlet which has to read a COBOL index file. I have COBOL API for accessing the index file. Our organization has a C wrapper, which talks to that COBOL API. I am using JNI to make the C method call.

When the method call "C1MATCHI" is being made, it throws the following error.


C1MATCHI fatal error, Unable to open ZIPIDX, File status=35.
File status 35 from IBM COBOL Manual says: An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a non-optional file that was not present.


I have written a server socket application, which invokes the method C1MATCHI using JNI. I am making the method call inside a thread (needed for multi-threaded server socket ,right?). I get the same problem then too. But, if I remove the code from inside the thread and put it in the main method itself, the code works properly. (ie. make the code as a Single-threaded server).


This means that my environment is O.K. And the program is able to open the file and give the results normally. The same code, if I invoke inside a thread, it gives the above fatal error, for the first request itself. I would have thought of it as a synchronization problem, if it gives error for concurrent requests. But, it doesn't work for the first request itself .


Is there any problem in Thread API or JNI API, that doesn't allow the program to open (or read from ) files?

   <<Less
About | Sitemap | Contact