This is my NDM script:
#!/bin/bash -x
#/cdunix/ndm/bin/ndmcli -x -e 4 << _EOF_
#sub maxdelay=unlimited statemnt process snode=$DEST_NODE
export NDMAPICFG=/home/drone/ndmscripts/ndmapi.cfg
NDM_FILE=$1
DEST_FILE=`basename $1`
DEST_NODE=AAA
/cdunix/ndm/bin/ndmcli -x -e 4 << _EOF_
sub maxdelay=unlimited testcopy process snode=$DEST_NODE snodeid=(BBB,123)
setop01 copy from (
SYSOPTS=":DATATYPE=BINARY:XLATE=NO:STRIP.BLANKS=NO:"
file=$NDM_FILE
pnode
)
COMPRESS EXTENDED
to (
DSN=$DEST_FILE(+1)
UNIT=(BATCH,2)
SPACE=(CYL,(500,500),RLSE)
DCB=(RECFM=VB,LRECL=726,BLKSIZE=0)
snode
)
pend;
_EOF_
I've given the LRECL as 1004 here because, the maximum record length is 1000. I've specified the RECFM as VB to denote that is a variable block record. But still on the unix mainframe, they receive the file as fixed length of 1000. My first 3 records are of length 132, 32, 1000. It fills the first line with first 2 records (164) and third record's 836 position's into first line and put the reminder of third record into second line and so on. So, I'm getting a position mismatch on unix mainframe. I can only alter on unix side. But can do nothing on client's unix mainframe side. How can I change my script to send the file as variable length records?
P.S : I've read through all the threads related to this topic. I've tried almost 100's of changes in the past 3 months. Nothing really works for me.