EDC5122I Input/output error. (errno2=0x0540011C)

Discussion of the free COZBATCH utility for z/OS
Post Reply
jlbowen
Posts: 1
Joined: Fri Feb 15, 2019 9:53 am

EDC5122I Input/output error. (errno2=0x0540011C)

Post by jlbowen » Fri Feb 15, 2019 12:51 pm

Anyone know where to find what this means?
We are running COZBATCH trying to FETCH a file from a server using the following options:
ZosSettings: Transfer options: clientcp=IBM-1047,mode=text,servercp=ISO8859-1,trim
to a zOS dataset:
//DOWNLD01 DD DSN=TEST.BWJ.PRODVIEW.DT0215,
DISP=(,CATLG,DELETE),DATACLAS=M10,
DCB=(LRECL=50,BLKSIZE=5000,RECFM=FB)

Then receive these messages:
ZosDataset: Opening dataset DD:DOWNLD01 for write
ZosDataset[W]: dataset seek not permitted
ZosDataset[W]: dataset seek not permitted
ZosDataset[W]: dataset seek not permitted
ZosDataset[W]: dataset seek not permitted
ZosDataset[W]: dataset seek not permitted
ZosDataset[W]: dataset seek not permitted
[81.062] debug1: truncating at 327680
[81.063] Couldn't write to "//DD:DOWNLD01": EDC5122I Input/output error. (errno2=0x0540011C)
ZosDataset: Closing dataset //TEST.BWJ.PRODVIEW.DT0214 - 327680 bytes received, 10368 records written

My colleague that normally takes care of this is on medical leave. Any help would be greatly appreciated!

Jeff Bowen

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

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by dovetail » Wed Mar 27, 2019 11:02 am

This problem looks to be caused by bad FXP_DATA packets being received from the remote server.
When doing a "get" (download) in the Co:Z SFTP client where the target is a data set, Co:Z SFTP will send FXP_READ packets to the remote server where each one reads data sequentially. The "ZosDataset[W]: dataset seek not permitted " errors means that a packet was received out of sequence.

rjchavez
Posts: 2
Joined: Tue Aug 06, 2019 7:07 am

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by rjchavez » Thu Aug 08, 2019 3:55 pm

We're trying the software as a POC and have the same issue. The transfer terminates prematurely every time. We then try the same exact file transfer using OpenSSH sftp client provided by z/OS V2R3 and the file transfers without a glitch. Does not seem to be a problem with out-of-sequence packets. If it were, we would have a bigger problem.

Here's the log:

Connected to ??
Connection established, local_addr=?? local_port=6352 remote_addr=?? remote_port=22
cozsftp> lzopts mode=text,lrecl=1200,recfm=fb,blksize=0
blksize=0 lrecl=1200 mode=text recfm=fb
cozsftp> get ifilein //FILE.OUT
Fetching /??/filein to //FILE.OUT
ZosSettingsÝI¨: Transfer options: blksize=0,clientcp=IBM-1047,gdgnt,lrecl=1200,mode=text,recfm=fb,servercp=ISO8859-1,tri
m
ZosDatasetÝI¨: Opening dataset FILE.OUT for write with options: gdgnt old
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
ZosDatasetÝW¨: dataset seek not permitted
Ý28.824¨ debug1: truncating at 393216
Ý28.825¨ Couldn't write to "//FILE.OUT": EDC5122I Input/output error. (errno2=0x0540011C)
ZosDatasetÝI¨: Closing dataset //FILE.OUT - 425984 bytes received, 355 records written
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

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

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by dovetail » Thu Aug 08, 2019 4:45 pm

Do you see any system messages in the job log regarding this data set?
I suspect that you are running out of space, since you have not specified a space parameter on lzopts.

So try:
lzopts mode=text,lrecl=1200,recfm=fb,blksize=0,space=cyl.10.5


An aside: you also might consider just using a DD in your job step and allocating the new data set there, with the DCB and SPACE that you want in JCL.
Then, just do:

lzopts mode=text
get ifilein //DD:MYDD

rjchavez
Posts: 2
Joined: Tue Aug 06, 2019 7:07 am

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by rjchavez » Fri Aug 09, 2019 7:57 am

No messages in job log about the dataset. I have tried the following with same results:

lzopts="mode=text,lrecl=1200,recfm=fb,blksize=0,space=cyl.500.500"

I've also tried your suggestion to pre-allocate the dataset and use the //DD: parameter with same results

Connected to ??
Connection established, local_addr=?? local_port=?? remote_addr=?? remote_port=22
cozsftp> lzopts mode=text
mode=text
cozsftp> get filein //DD:DD1
Fetching filein to //DD:DD1
ZosSettingsÝI¨: Transfer options: clientcp=IBM-1047,gdgnt,mode=text,servercp=ISO8859-1,trim
ZosDatasetÝI¨: Opening dataset DD:DD1 for write
ZosDatasetÝW¨: dataset seek not permitted
Ý35.588¨ debug1: truncating at 65536
Ý35.588¨ Couldn't write to "//DD:DD1": EDC5122I Input/output error. (errno2=0x0540011C)
ZosDatasetÝI¨: Closing dataset //fileout - 65536 bytes received, 55 records written
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

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

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by dovetail » Fri Aug 09, 2019 8:50 am

Hmm. Something strange seems to be happening. To figure it out, we will need a trace.
Add these lines to beginning of your shell script:

# tracing options
sftp_opts="$sftp_opts -vvv"
export COZ_LOG=T

For example:

Code: Select all

//SFTP EXEC PROC=SFTPPROC 
//SFTPIN DD * 
# tracing options
sftp_opts="$sftp_opts -vvv"
export COZ_LOG=T

pwdsn="HLQ.MY.PASSWD(SITE)"
user=myuser 
host=myhost 
                                                          
.  $script_dir/sftp_connect.sh << EOB
lzopts mode=text,lrecl=1200.recfm=fb,blksize=0,space=cyl.10.10
cd somedir
get ifilein //HLQ.FILE.OUT
EOB

// 
Then, download the entire job log and output to a text file and email it to me at info @ dovetail.com
Feel free to scrub any sensitive file names, host names, or ip addresses.

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

Re: EDC5122I Input/output error. (errno2=0x0540011C)

Post by dovetail » Tue Aug 20, 2019 1:18 pm

In this particular case, out-of-order responses were being returned from the remote SFTP server - Amazon S3 SFTP.
The Amazon S3 SFTP server has a peculiar nature in that when multiple read packets are sent by a client, they may be responded to by Amazon out of order.

We just released a new version (5.6.0) which addresses this problem.
See: https://dovetail.com/docs/cozinstall/changes.html

Post Reply