by zaino22 » Fri May 22, 2009 9:11 pm
i tried following code but it captures before and after bytes as well. Now, I also want to add check if the first record contains '001 then take the date only e.g. 2009-02-04 and copy it to a GDG file without any before and after spaces.
i have tried following as well, which get rid of before bytes, but still contain after bytes.
INREC BUILD=(1,4,34,34)
Header sample:001 2009-02-05 10:55:06 MLK00 2009-02-04 SOURCE.DATASET.NAME(0)
//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=SOURCE.DS,DISP=SHR
//OUT DD DSN=TARGET.DS,
// DISP=(NEW,CATLG,DELETE),
// DCB=(SRCDSCB,RECFM=VB,LRECL=43,BLKSIZE=0,DSORG=PS),
// SPACE=(10,(1,1),RLSE),AVGREC=K
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
INREC BUILD=(1,4,30,39)
OPTION STOPAFT=1
/*