View previous topic :: View next topic
|
Author |
Message |
kbmk
New User
Joined: 27 Sep 2007 Posts: 24 Location: Chennai
|
|
|
|
Hi Everyone,
I have submitted two sort jobs. The data are given as follows. The difference in the data for job1 and job2 are that, for job2 first 10 records are alone given as input.
57AD4 1
57AD5 2
57AD5 3
57AD4 4
57AD5 5
57AD4 6
57AD4 7
57AD5 8
57AD4 9
57AD5 10
97D53 11
973G3 12
97D67 13
What I have expected to see that the output of job1 and job2 to match.
Job1 Output
57AD4 4
57AD4 1
57AD4 6
57AD4 7
57AD4 9
57AD5 10
57AD5 8
57AD5 5
57AD5 2
57AD5 3
97D53 11
97D67 13
973G3 12
Job2 Output
57AD4 9
57AD4 4
57AD4 1
57AD4 6
57AD4 7
57AD5 8
57AD5 5
57AD5 2
57AD5 3
57AD5 10
JCL used for both of the jobs
Code: |
//SORT EXEC PGM=SORT
//SORTIN DD *
I/P
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
/*
//* |
Kindly clarify me on why I am seeing the difference in the output.
Regards,
Bala[/list] |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
When the sort field is the same value on multiple records, the output sequence can be different each run unless you add the EQUALS parameter to keep the same sequence as the input file. |
|
Back to top |
|
|
kbmk
New User
Joined: 27 Sep 2007 Posts: 24 Location: Chennai
|
|
|
|
Thanks Dennis:) |
|
Back to top |
|
|
|