If you need other statements (e.g. INCLUDE, SORT), you can put them before INREC in //CTL2CNTL. Change the second COPY operator to a SORT operator if you need a SORT statement. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Apr 20, 2007 10:03 am Post subject:
I thought of a much easier way to do this if your aaaaa, bbb and cccc variables represent strings without embedded blanks. We can just replace each blank with a comma. Here's the DFSORT job:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Posted: Fri Apr 20, 2007 3:18 pm Post subject: Got a change in the requirement
Thanks once again for ur effort frank,
My requirements are changed now to convert the repeating fileds to
display format , among the recurring field one field is COMP-3 9(4).
i think i should be using TO=ZD ???
Also when we overlay the Comma in the records the comma should not be inserted when it is end of record(end of values).
example ,
even after the record is over the output shows ' , , , ,'
any help ?
i guess doing all this by a program would make it simpler , but i need to know whether all these is possible by JCL ?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Apr 20, 2007 4:58 pm Post subject:
I set up the job specifically NOT to put the commas at the end based on what you told me about how the data looks. If the data looks different, then you just need to adjust the positions to account for those last positions. I used 62:62,1589,TRAN=ALTSEQ to avoid putting commas in the last two positions. If you're getting commas past where you want them, then just subtract the number of extra commas from 1589. For example, if you're getting 4 extra commas, change it to 62:62,1585,TRAN=ALTSEQ.
Or for my other job, just adjust the positions to avoid putting commas past where you want them.
COMP-3 9(4) is a 3-byte PD field, so you can use p,3,PD,TO=ZD,LENGTH=n to convert it to ZD where p is the input starting position and n is the output length.
If you have binary or PD values in the recurring fields, the TRAN=ALTSEQ solution problaby won't work because these fields could have embedded X'40' characters.
Conceptually, my other job would work but it wasn't set up to do any conversions because you didn't say you needed to. It would have to be changed based on what your recurring fields actually look like and what you want the output to look like. I don't know exactly what your data looks like, so I can't tell you exactly how to code the job. You should be able to use my job as a model and adjust it for what you need. Just play around with it. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum