JZOS Function to access TAPE files

General discussion on the JZOS batch launcher and toolkit
Post Reply
sharoncaneta
Posts: 2
Joined: Fri Feb 22, 2019 2:51 am

JZOS Function to access TAPE files

Post by sharoncaneta » Fri Feb 22, 2019 3:05 am

Hi All,

I'm currently working with modernization project wherein we're migrating legacy systems to Java.
As of this writing, COBOL and JAVA are co-existing in production.

I have a requirement where I need to process a TAPE file as input but I'm having below error:

fopen() failed; EDC5061I. An error occurred when attempting to define a file to the system;
errno=61 errno2=0xc00b0403 last_op=50 errorCode=0x220.

In mainframe, if we need to process a tape file we normally define the volume where it can be mounted.
I'm not sure how can Java handle it. BTW, I'm a cobol developer and new to all this stuff.

I've came across this site regarding the JZOS toolkit and just trying my luck since most of the people here are knowledgeable in this technology.
Is there any way or method I can use to fulfill this requirement?

Thank you!

dovetail
Site Admin
Posts: 1886
Joined: Thu Jul 29, 2004 12:12 pm

Re: JZOS Function to access TAPE files

Post by dovetail » Sun Feb 24, 2019 10:15 am

The JZOS ZFile class is a wrapper around the IBM C library functions (fopen, fread, etc).
For more information on using this, see "z/OS XLC/C++ Programming Guide".

It will be *very* difficult to get any help if you don't post at least a small fragment of the code, JCL, etc. that you are using.
In this particular case, the probable cause can be found by looking up the errno2 code. The bpxmtext shell command is a handy way to do this:

Code: Select all

> bpxmtext c00b0403 
JrEdc1opsEfiledef03:  The filename argument passed to fopen() or freopen()
specified dsname syntax. Allocation of a ddname for the dsname was attempted,
but failed. 

Action:  Failure information returned from SVC 99 was recorded in the AMRC
structure. Use the information there to determine the cause of the failure. 

sharoncaneta
Posts: 2
Joined: Fri Feb 22, 2019 2:51 am

Re: JZOS Function to access TAPE files

Post by sharoncaneta » Tue Feb 26, 2019 9:44 pm

Hi dovetail,

Thank you for your response. I was able to understand the error based on the bpxmtext shell command.
By the way, is there any way where I can indicate the tape parameters in my java source code?

Since the error is open error of the tape file, I'm thinking if there's a way to let the java know that it's accessing the tape with the needed attributes.

Thank you.

Post Reply