> but the issue is the store_nbrs are of different length, the .csv is > not getting created correctly . Could some one let me know how we > can append the .csv also when the store is of variable length >
Ron, Try this DFSORT JCL //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * ITEM_NBR } ITEM_DESC1 } STORE_NBR } ----+----1----+----2----+----3----+----4----+----5----+- 500849599 }ENT MASSA TORTA 2 KG }33 500878286 }CAST DE CAJU TS 120G }331 500862526 }MTR MASS LASANH SECA }3 500877131 }PERU INTEIR C MIUDOS }3323 500034169 }ACUC FIT UNIAO }3311 500832360 }AMPOLA PANTENE UNIDA }33 //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY,SKIPREC=1 INREC PARSE=(%=(REPEAT=2,ENDAT=C'}'), %01=(ENDBEFR=C'{', ENDBEFR=C' ', FIXLEN=8)), BUILD=(C' SPUT ''', C'K01.BB.RST.PTEM.FUTR.RTLDTA.REPT01''', C' FUTRETAIL_', DATE1(-)-1, %01,JFY=(SHIFT=LEFT, LEAD=C'_', TRAIL=C'.CSV', LENGTH=16)) /* Thanks, Kolusu DFSORT Development IBM Corporation ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN