Your should use code tags for your example.
Your job has no //SORTOUT DD statement.
It looks like you expect output in a temporay dataset - //OUTDD - but don't tell SORT this.
You have both OUTREC and OUTFIL - only one should be used.
Constants in your BUILD control card don't match your stated requirements.
You will not find 'IN' in positions 9,2 of the input file.
This approach will not dynamically create the dataset.
Is today's date significant?
Joined: 10 May 2007 Posts: 2418 Location: Hampshire, UK
1) Use code tags when posting data, code
2) Search - this has been answered before
3) Do you want JCL or sort control statements? they are not the same.
4) If you need urgent then pay a consultant - people responding on forums do so for free, in their own time, and as and when they want - if they want to.