We are running Co:Z SFTP version: 5.1.1 (6.4p1). No CRLF when transferring members of a PDS with RECFM=VB from z/OS to z/OS. The resulting files have all the lines stringed together. I have tried linerule=rdw and linerule=crlf.
Thanks for your help.
Howi
sftp VBS PDS members between z/OS
Re: sftp VBS PDS members between z/OS
Try this:
For more information, see: https://dovetail.com/docs/sftp/client.h ... erver_opts
Code: Select all
lzopts mode=binary,l=l4
zopts mode=binary,l=l4
lcd //local.pds
cd //remote.pds
put mem1
Re: sftp VBS PDS members between z/OS
Specifying l=l4 gives me ZosDatasetÝE¨: RecordStreamException: unclaimed data at end of input stream; len=2478, maxLen=0, streamOffset=2478,
recordNumber=0.
recordNumber=0.
Re: sftp VBS PDS members between z/OS
Please post a small example (input and output) of what you are doing.
Re: sftp VBS PDS members between z/OS
The remote and local PDS are RECFM=VB and LRECL=255. One sample remote member contains two lines:
/*************/
/* junk */
/*************/
Without the l=l4 option the get command output on the local PDS member contains one line:
/*************//* junk *//*************/
With the l=l4 option the error message is:
ZosDatasetÝE¨: RecordStreamException: unclaimed data at end of input stream; len=144, maxLen=0, streamOffset=144,
recordNumber=0
Regards,
Howi
/*************/
/* junk */
/*************/
Without the l=l4 option the get command output on the local PDS member contains one line:
/*************//* junk *//*************/
With the l=l4 option the error message is:
ZosDatasetÝE¨: RecordStreamException: unclaimed data at end of input stream; len=144, maxLen=0, streamOffset=144,
recordNumber=0
Regards,
Howi
Re: sftp VBS PDS members between z/OS
*all* of the input, and *all* of the output from the failing case please.
Re: sftp VBS PDS members between z/OS
Please double check that you are setting l=l4 on the client and the server side, i.e. execute lzopts and zopts.
lzopts mode=binary,l=l4
zopts mode=binary,l=l4
You will see the RecordStream error if you have missed one of these settings.
lzopts mode=binary,l=l4
zopts mode=binary,l=l4
You will see the RecordStream error if you have missed one of these settings.
Re: sftp VBS PDS members between z/OS
Thank you Lisa. I need to specify both zopts and lzopts to avoid the ZosDatasetÝE¨: RecordStreamException: unclaimed data at end of input stream
JCL:
//SFTPGET1 EXEC PROC=SFTPPROC
//SFTPIN DD *
user=user1
host=rhost
zopts="mode=text,l=l4:
lzopts="mode=text,l=l4:
# lfile=a text file in your
lfile=//DD:LOCALF2
rfile=//SYSC.XYZ/JUNK
. $script_dir/sftp_get.sh
//LOCALF2 DD DSN=SYSC.XYZ(JUNK),DISP=SHR
input member JUNK:
/*************/
/* junk */
/*************/
SYSOUT:
Co:Z SFTP version: 5.1.1 (6.4p1) 2018-06-01
Copyright (C) Dovetailed Technologies, LLC. 2008-2018. All rights reserved.
Connecting to rhost...
Connected to rhost.
Connection established, ...
cozsftp>
cozsftp> get //SYSC.XYZ/JUNK //DD:LOCALF2
Fetching //SYSC.XYZ/JUNK to //DD:LOCALF2
ZosSettingsÝI¨: Transfer options: mode=binary
ZosDatasetÝI¨: Opening dataset DD:LOCALF2 for write
ZosDatasetÝI¨: Closing dataset //SYSC.XYZ(JUNK) - 45 bytes received, 1 records written
CoZBatchÝI¨: returning rc=exitcode=0
Output
/*************//* junk *//*************/
Thanks.
JCL:
//SFTPGET1 EXEC PROC=SFTPPROC
//SFTPIN DD *
user=user1
host=rhost
zopts="mode=text,l=l4:
lzopts="mode=text,l=l4:
# lfile=a text file in your
lfile=//DD:LOCALF2
rfile=//SYSC.XYZ/JUNK
. $script_dir/sftp_get.sh
//LOCALF2 DD DSN=SYSC.XYZ(JUNK),DISP=SHR
input member JUNK:
/*************/
/* junk */
/*************/
SYSOUT:
Co:Z SFTP version: 5.1.1 (6.4p1) 2018-06-01
Copyright (C) Dovetailed Technologies, LLC. 2008-2018. All rights reserved.
Connecting to rhost...
Connected to rhost.
Connection established, ...
cozsftp>
cozsftp> get //SYSC.XYZ/JUNK //DD:LOCALF2
Fetching //SYSC.XYZ/JUNK to //DD:LOCALF2
ZosSettingsÝI¨: Transfer options: mode=binary
ZosDatasetÝI¨: Opening dataset DD:LOCALF2 for write
ZosDatasetÝI¨: Closing dataset //SYSC.XYZ(JUNK) - 45 bytes received, 1 records written
CoZBatchÝI¨: returning rc=exitcode=0
Output
/*************//* junk *//*************/
Thanks.
Re: sftp VBS PDS members between z/OS
The problem is that "zopts" is not a variable that is used by the sftp_get.sh sample script.
Try using the more flexible "sftp_connect.sh", which allows arbitrary subcommands:
Try using the more flexible "sftp_connect.sh", which allows arbitrary subcommands:
Code: Select all
//SFTPGET1 EXEC PROC=SFTPPROC
//SFTPIN DD *
user=user1
host=rhost
zopts="mode=text,l=l4:
lzopts="mode=text,l=l4:
# lfile=a text file in your
lfile=//DD:LOCALF2
rfile=//SYSC.XYZ/JUNK
. $script_dir/sftp_connect_sh <<EOB
$lzopts
$zopts
get ${rfile} ${lfile}
EOB
//LOCALF2 DD DSN=SYSC.XYZ(JUNK),DISP=SHR
Re: sftp VBS PDS members between z/OS
Corrected the following typos and it worked:
zopts="zopts mode=text,l=l4"
lzopts="lzopts .."
. $script_dir/sftp_connect.sh <<EOB
Thanks!
Howi
zopts="zopts mode=text,l=l4"
lzopts="lzopts .."
. $script_dir/sftp_connect.sh <<EOB
Thanks!
Howi