If you need more specific help, show an example of the records in each input file and what you want for the output records. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files.
Thanks for the quick response & the jcl. When I try to implement the same cntl statements on other set of inputs, The sorting is not happening properly. I did change the record length and other crieteria.
Consider I have the following data in PARTS.PS(contains 50000 records)
Part-Name- Part# Qty
A50001AN 4000 02
A50001AN 0 02
A50001CT 4000 01
A50001CT 0 01
A50001MR 4000 09
A50001MR 0 09
892601P465 0 05
892601P466 0 05
123-456-789 1A 01
Part-Name=MaxLength=18, Some records contain "Hypen" along with letters & Numbers.
Part#=Maxlength=4, some records are alphanumeric
And the DS Order.PS has the following data(Contains 10,000 records)
I apologize for the bad formating of record...for your convenience, in PARTS.PS.The part# seems mixed with part-name. From each string, the following values are part#. In teh actual DS, there are 4 blank spaces in between part-name & part#. What ever value follows part# pertains to Qty.
I don't know what you mean by "The sorting is not happening properly" for the first example. The output records will be sorted by the Name field. If you want the output records sorted some other way, you have to tell me how you want them sorted.
I can't make heads or tails out of your second example. I don't see any matches between the two files on the Part-Name. In PARTS.PS the Part-Name values start with A, 8 or 1. In ORDER.PS, the Part-Name values start with 2. So where are the matches? You need to give me a good example and explain the sort order you want before I can help.
It would really help if you would use ubb code tags around your example records. Put <code> before the example lines, but use  instead of <>. Put </code> after the example lines, but use  instead of <>. Example:
with [ for < and ] for >.
That will let you line up the data the way it should actually look.