Hi ,
I have a file with the below data
xxxxxxxHMBD 20100515
record 1
record 2
.
.
record 2552
xxxxxxxTMBD 201005150002552
1.i have to compare header and trialer first 7 bytes 'xxxxxxx'
2.compare date of the header and trailer EG: here 20100515
3.compare total record count with the count in trailer
4.finally if all the conditions satisfy fire RC 4 if any one of the condition fails then fire rc 12
so i plan to write the header and trailer along with count as shown below .
xxxxxxx20100515
---------------------0002552xxxxxxx20100515
please assume - as spaces
After this i plan to use SLICE and then compare the data.
i have tried the below code but both are copying the input to output.
code 1:
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
/*
//CTL1CNTL DD *
OPTION COPY
INCLUDE=(1,8,CH,EQ,C'CMSMSPDH')
BUILD=(1,7,17,8,80:1X)
TRAILER1=(16:COUNT-1=(M11,LENGTH=07),24:1,7,31:17,15)
/*
code 2:
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
/*
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=(1,8,CH,EQ,C'CMSMSPDH'),BUILD=(1:1,7,8:17,8,80:1X))
OUTFIL REMOVECC,
TRAILER1=(16:COUNT-1=(M11,LENGTH=07),24:1,7,31:17,15)
/*
Can any one help me?
My system is using SYNCTOOL RELEASE 1.6.2 - COPYRIGHT 2007 SYNCSORT INC.