Posted: Thu Feb 06, 2014 10:39 am Post subject: SORT FIELDS - Picks which columns? Quick question
I have the below sort where the output record layout is changed using INREC.
Now, with sort card= (1,13,CH,A,14,3,CH,A,17,4,BI,A,22,5,CH,D)
This the sort that I want to apply for the output file layout. will this work? or do I need to specify once the output file is created?
I tested with this and it worked as expected - output file is sorted, but what I thought is that the sort card applies to the input file but here the output file is getting sorted, how is this, I missing something?.
please advise pros.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Feb 06, 2014 1:29 pm Post subject:
vak255 wrote:
The INREC control statement allows you to reformat the input records before they are sorted, merged, or copied.
so the SORT is performed after the INREC conditions are applied?
So 1,13,CH,A will be applied to 7,12 and 13:C'0' on the reformatted input file ?
Vak255,
Yes. Check this link which explains the processing order for record handling, exits, statements, and options. Use this diagram with the text following it to understand the order DFSORT uses to run your job.
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