That is very neat! Thanks. I need to put that in my bag of tricks. Actually, I need to really get into the DFSORT book to see all the new nifties. I'd bet that we could use it to replace a lot of our EasyTrievePlus processing.
On Tue, Jan 15, 2013 at 12:19 PM, Sri h Kolusu <[email protected]> wrote: > Charles, > > You can use RESIZE operator to break a large record into small records. I > assumed that each record starts with X'5B' ($) and each record has a max > length of 200 bytes and you have a max of 10 records in a single large FB > record. > > //STEP0100 EXEC PGM=ICETOOL > //TOOLMSG DD SYSOUT=* > //DFSMSG DD SYSOUT=* > //IN DD * > $AAAAAAAAAAAAAAAAAAA$BBBBBBB$CCCCCC$DDD > //OUT DD SYSOUT=* > //TOOLIN DD * > RESIZE FROM(IN) TO(OUT) TOLEN(200) USING(CTL1) > //* > //CTL1CNTL DD * > OPTION COPY > INREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'$',FIXLEN=199), > %02=(ENDBEFR=X'5B',FIXLEN=199), > %03=(ENDBEFR=X'5B',FIXLEN=199), > %04=(ENDBEFR=X'5B',FIXLEN=199), > %05=(ENDBEFR=X'5B',FIXLEN=199), > %06=(ENDBEFR=X'5B',FIXLEN=199), > %07=(ENDBEFR=X'5B',FIXLEN=199), > %08=(ENDBEFR=X'5B',FIXLEN=199), > %09=(ENDBEFR=X'5B',FIXLEN=199), > %10=(ENDBEFR=X'5B',FIXLEN=199)), > BUILD=(X'5B',%01,X'5B',%02,X'5B',%03,X'5B',%04,X'5B',%05, > X'5B',%06,X'5B',%07,X'5B',%08,X'5B',%09,X'5B',%10) > > OUTFIL FTOV,VLTRIM=C' ',OMIT=(2,199,CH,EQ,C' ') > //* > > The output from this job is > > $AAAAAAAAAAAAAAAAAAA > $BBBBBBB > $CCCCCC > $DDD > > > Check this link which explains in detail about RESIZE operator. > > http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/7.13 > > If that is not what you want please show us a sample data and desired > output along with DCB properties of both input and output.. > > Thanks, > Sri Hari Kolusu > DFSORT Development > -- Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
