Page 1 of 1

reformat the data

PostPosted: Thu Mar 15, 2012 4:55 pm
by rakesh086
Hi Every One,

Could you plz help me, I have a data .The File Which Contain the below Data is VB.
202,"5558888813916052647",303
202,"5558888813916902627",303
202,"5558888818555068946",303
202,"5558888818555068946",303
202,"5558888818555111746",303
202,"5558888818555111746",303
202,"5558888818555157244",303
202,"5558888818555401741",303
202,"5558888818555476396",303
202,"5558888818555496592",303
202,"5558888818555496592",303
202,"5558888818555501144",303
202,"5558888818555587200",303
202,"5558888818555626834",303

I want to Rearrange the Above Data in the Below order and that too In the Fixed Block Format..
202,303,5558888813916052647

Like this all the data above is one example...

Colud any One help me in resolving the Issue...

Re: reformat the data

PostPosted: Thu Mar 15, 2012 5:09 pm
by enrico-sorichetti
jcl in se does nothing...it just executes programs
why not do a bit of research Yourself in the forum section related to the <sort> product You are useing
hint INREC BUILD=(to,from,to,from,to,from,.........)

Re: reformat the data

PostPosted: Thu Mar 15, 2012 10:21 pm
by Frank Yaeger
rakesh086,

You can use a DFSORT job like the following to do what you asked for:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (FB/27)
//SYSIN DD *
   OPTION COPY
   OUTFIL VTOF,BUILD=(5,3,C',',31,3,C',',10,19)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080

Re: reformat the data

PostPosted: Fri Mar 16, 2012 2:10 pm
by rakesh086
Frank,

Thanks A lot. i got desired output.