We are running Co:Z SFTP V3.1.1. I'm using a cozbatch SFTP job to "get" a Variable Blocked dataset named tsmds0.hello.world.vb from another z/os system. It's a small dataset that contains 3 logical records that look like this:
Record1
Record2
Record3
The controls statements I'm using are:
lzopts clientcp=IBM-1047,servercp=IBM-1047,mode=binary
lzopts lrecl=255,recfm=vb,space=cyl.5.1
get //tsmds0.hello.world.vb //tsmds1.hello.world.vb
The SFTP get is successful but all 3 records of the tsmds1.hello.world.vb dataset that is created are stacked up in the the first logical record and looks like this:
Record1Record2Record3.
If I add "lzopts linerule=rdw" to the control statements and retry the "get" I get this error:
cozsftp> get //tsmds0.hello.world.vb //tsmds1.hello.world.vb
Fetching //tsmds0.hello.world.vb to //tsmds1.hello.world.vb
ZosDataset[E]: RecordStreamException: unclaimed data at end of input stream; len=21, maxLen=0, streamOffset=21,
recordNumber=0
CoZBatch: returning rc=exitcode=1
What am I doing wrong ?
get of recfm=vb dataset not formatted correctly
Re: get of recfm=vb dataset not formatted correctly
With Co:Z on both ends, you need to set the options to match on both ends.
For recfm=vb, here is your best bet:
zopts mode=binary,linerule=rdw
lzopts mode=binary,linerule=rdw
lzopts lrecl=255,recfm=vb,space=cyl.5.1
get //tsmds0.hello.world.vb //tsmds1.hello.world.vb
Running in batch, you might want replace the last two lines with:
get //tsmds0.hello.world.vb //DD:TODD
and use a DD card to specify the name and allocation information.
For recfm=vb, here is your best bet:
zopts mode=binary,linerule=rdw
lzopts mode=binary,linerule=rdw
lzopts lrecl=255,recfm=vb,space=cyl.5.1
get //tsmds0.hello.world.vb //tsmds1.hello.world.vb
Running in batch, you might want replace the last two lines with:
get //tsmds0.hello.world.vb //DD:TODD
and use a DD card to specify the name and allocation information.
Re: get of recfm=vb dataset not formatted correctly
Thanks ! That worked. Is this mentioned in the coz sftp user manual ? To keep the options on both ends matched up that is. I'll look it over again.