Joined: 24 Jul 2011 Posts: 651 Location: Down on the pig farm
Posted: Tue Oct 30, 2012 6:28 pm Post subject:
You would get a better result if you posted in the sort part of the forum instead of the JCL part as these are distinctly different entities. When posting in the sort section mention which sort product you are using as that section covers all mainframe sort programs. DO NOT REPOST as someone will move your original post. _________________ Regards
dbz's is an approach of "utility", although the trailing "*" will not appear correctly due to the PARSED field having, of necessity, a fixed length. Certainly the "concatenation" is an approach which will work.
HEADERn and TRAILERn will also work for you, and I'm sure you should be able to find examples easily.
Getting the trailing "*" in the correct place is interesting. What is the maximum length of your data?
Let's say for now, it is 20, and assume you have FB 80 coming in (cos it looks like control cards being generated).
I'd use FINDREP, with the thing to "find" being 21 spaces, and the thing to "replace" being "*", and DO=1 and don't let is change the rest of the record (you can look that up yourself, as you'll need to understand the FINDREP anyway).
This way, you don't have to worry about embedded blanks. Your volume will be small, I assume, so minimum code to get wrong (else squeezing, PAIR=, etc).
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