I'm attempting to send a USS resident file to a zOS dataset using cozsftp and I'm getting this error. I'm successful going the other way, i.e. zOS dataset to USS file.
Co:Z cozsftp version: 1.4.0 beta5 (5.0p1) 2009-08-14
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
Connecting to tcs1...
[00818] Couldn't get handle: Failure
ZosPosixFile: Closing file /u/aimj/test.data - 0 bytes read, 0 bytes sent
Here is the failing JCL
//COZBATCH EXEC PGM=COZBATCH
//A DD DSN=AIMJ.INPUT.DATA.LARGE,DISP=SHR
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put /tcs/ncoahttp/ncoarpt/out/CIRCH12A.xls //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
Couldn't get handle: Failure
File handle problem
I figured out the problem
It seems like the home directory isn't being set correctly with the source of the put is a USS file.
This works
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put /u/aimj/test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
This doesn't
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
cozsftp> put test.data //DD:A
Uploading test.data to //DD:A
Co:Z cozsftp version: 1.4.0 beta5 (5.0p1) 2009-08-14
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
Connecting to tcs1...
[00818] Couldn't get handle: Failure
ZosPosixFile: Closing file /u/aimj/test.data - 0 bytes read, 0 bytes sent
My home directory is set to /u/aimj and the home directory is picked up with I put to a USS file.
//A DD DSN=AIMJ.INPUT.DATA.LARGE,DISP=SHR
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put //DD:A test.data
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
cozsftp> put //DD:A test.data
Uploading //DD:A to /u/aimj/test.data
It seems like the home directory isn't being set correctly with the source of the put is a USS file.
This works
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put /u/aimj/test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
This doesn't
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
cozsftp> put test.data //DD:A
Uploading test.data to //DD:A
Co:Z cozsftp version: 1.4.0 beta5 (5.0p1) 2009-08-14
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
Connecting to tcs1...
[00818] Couldn't get handle: Failure
ZosPosixFile: Closing file /u/aimj/test.data - 0 bytes read, 0 bytes sent
My home directory is set to /u/aimj and the home directory is picked up with I put to a USS file.
//A DD DSN=AIMJ.INPUT.DATA.LARGE,DISP=SHR
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put //DD:A test.data
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
cozsftp> put //DD:A test.data
Uploading //DD:A to /u/aimj/test.data
Home directory problem
DD A is on the same server as the execution of the cozsftp command. All this job is doing is a fancy oput from an MVS dataset to an omvs file on the same system.
I'm still a bit mixed up;
This works;
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put /u/aimj/test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
This doesn't
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
The only difference is that on the working job the USS file is spelled out with it's full path. When I reverse the source and target on the put command I don't need the full path to the uss file.
This works;
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put /u/aimj/test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
This doesn't
//STEPLIB DD DISP=SHR,DSN=MVSISV.COZ.LOAD
//STDIN DD *
cozsftp aimj@tcs1
put test.data //DD:A
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
The only difference is that on the working job the USS file is spelled out with it's full path. When I reverse the source and target on the put command I don't need the full path to the uss file.