RDW value differtent between COZBATCH and FTP

Discussion of the COZBATCH utility for z/OS
Post Reply
msmith57
Posts: 10
Joined: Wed May 06, 2009 1:57 pm

RDW value differtent between COZBATCH and FTP

Post by msmith57 »

When I send a variable length file using FTP with RDW the length field contains the length of the record plus the 4 bytes header. When I use COZBATCH 1.2.5, I send the same file using ibmrdw, the length field contains just the length of the record.

The first file was sent using FTP

//STEP01 EXEC PGM=FTP,PARM=' (TRACE'
//*
//SYSFTPD DD DSN=SYS1.TCPPARMS(SFTPCSSL),DISP=SHR
//SYSTCPD DD DSN=SYS1.TCPPARMS(SFTPDATA),DISP=SHR
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD *
172.25.254.254 2021
SCMY3 TESTER98
BIN
LOCSITE RDW
PUT 'SCMYS.LDAPLOG.D051109' '/usr/local/scmy3/vbtestrdw'

The length field is length of the data plus 4 bytes.

....*** getopt(0x84)....*** Fork level set to 1....*** Debug level set to 1
0100555488A99A4FAFF501005554C999498A894A8A4A94F01005554C88A8498A894A8A4A94F
0400CCC0753673D0784D0B00CCC066920355530253036010C00CCC045247035553025303601


When I use COZBATCH

//SPAWN EXEC PGM=COZBATCH,
// REGION=&REGSIZE,
// PARM='/RLOGIN=&RLOGIN RFILEOUT=&RFILEOUT'
//STEPLIB DD DSN=&LIBRARY,DISP=SHR
//SYSOUT DD SYSOUT=* < DTLSPAWN and system messages
//STDENV DD PATH='/usr/local/&CURUSR/&CUSTenviron',
// PATHDISP=(KEEP,KEEP),PATHMODE=SIROTH,PATHOPTS=(ORDONLY)
//*
//STDIN DD PATH='/usr/local/&CURUSR/&CUSTfilein',
// PATHDISP=(KEEP,KEEP),PATHMODE=SIRWXU,PATHOPTS=(ORDONLY)
//*
//STDOUT DD SYSOUT=* < spawned program STDOUT
//STDERR DD SYSOUT=* < spawned program STDERR

STDIN:
coz_bin="/usr/lpp/coz/bin"
config1="/usr/local/scmy3/coz_config"
export DISPLAY=FOO
export SSH_ASKPASS='/usr/local/scmy3/termdata'
export PASSDSN='/usr/local/scmy3/scmy3data'
#
ssh_opts="-oBatchMode=no" # allows ssh to use SSH_ASKPASS program
ssh_opts="$ssh_opts -oConnectTimeout=60"
ssh_opts="$ssh_opts -oServerAliveInterval=60"
ssh_opts="$ssh_opts -oStrictHostKeyChecking=no" # accept initial
ssh_opts="$ssh_opts -oLogLevel=DEBUG1"
#
$coz_bin/cozsftp $ssh_opts -b- $RLOGIN <<EOB
lzopts linerule=ibmrdw
put //DD:INFILE1 $RFILEOUT


The header looks like this

....*** getopt(0x84)....*** Fork level set to 1....*** Debug level set to 1
0100555488A99A4FAFF501005554C999498A894A8A4A94F01005554C88A8498A894A8A4A94F
0000CCC0753673D0784D0700CCC066920355530253036010800CCC045247035553025303601


Is There a parameter for COZBATCH that I can set to make it include the 4 bytes?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

(This is actually related to COZ SFTP and DSPIPES, not COZBATCH).

Unfortunately, you are right... Co:Z SFTP and Dataset pipes (which share the same code for record streaming) have "ibmrdw" wrong.

The design was to have "rdw" be a full word length, which would eventually support longer records, and to have "ibmrdw" be the traditional rdw.

This has not only proven confusing, but we screwed up the implementation of ibmrdw - as you point out.

We plan to implement a change in the next release so that "RDW" is a correct IBM RDW and to deprecate the "ibmrdw" switch. Eventually, when we support the "large block interface", "rdw" would then follow IBM's convention of using a high order bit to mean that the record is > 32K.

Thanks for reporting this.
Post Reply