Page 1 of 1

Sort file in JCL

PostPosted: Wed Oct 14, 2015 12:07 pm
by Kallu
Hi Friends,

I need your help... i need to sort one file and change few fields from PD to ZD and then need to add ; after each fields can you please tell me sort card for the same.

Re: Sort file in JCL

PostPosted: Wed Oct 14, 2015 1:03 pm
by BillyBoyo
You''ll need a SORT statement, and BUILD on OUTREC. start,length,PD,TO=ZD,LENGTH= on BUILD for the conversions, C';' for the delimiter and the remaining data unchanged.

Re: Sort file in JCL

PostPosted: Wed Oct 14, 2015 1:59 pm
by Kallu
Hi thanks , can you please provide me syntax

Re: Sort file in JCL

PostPosted: Wed Oct 14, 2015 3:05 pm
by enrico-sorichetti
if You had cared to search the forum You would have found quite a few examples

Re: Sort file in JCL

PostPosted: Wed Oct 14, 2015 5:56 pm
by Robert Sample
i need to sort one file and change few fields from PD to ZD and then need to add ; after each fields can you please tell me sort card for the same.
No, we cannot. You did not provide any details (such as field starting position and length for each PD, for example). If you want generic information, go read the SORT manual. If you want specific information, you must provide specific information.

Re: Sort file in JCL

PostPosted: Wed Oct 14, 2015 6:59 pm
by NicC
You cannot do it with JCL alone - you need to execute your sort utility. Moved to DFsort part of the forum.