IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How does EZT keep the order of output records


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amit Kumar
Warnings : 1

New User


Joined: 27 Mar 2007
Posts: 3
Location: chennai

PostPosted: Wed May 16, 2007 12:15 pm
Reply with quote

Hi All,

i m using dfsort to sort the input file. In the input some records having same value in sort fields. Can u tell me in which order these records will come in output file is there any way so i can change the order of records.

Amit
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Wed May 16, 2007 12:35 pm
Reply with quote

Amit,
You must be specifying a SORT FIELDS stetement in the JCL SORT step.

The SORT FIELDS can contain 1 or more fields for sorting.

Say SORT FIELDS=(1,9,CH,A,83,9,CH,A)
It will sort using first 9 bytes, then using 9 bytes from 83rd byte.

Hope this helps you.

Thanks,
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed May 16, 2007 3:04 pm
Reply with quote

Amit Kumar wrote:
In the input some records having same value in sort fields. Can u tell me in which order these records will come in output file
If you do not specify that you want equal keys kept in their current sequence, the order they output is unpredictable.
Quote:
is there any way so i can change the order of records.
The only way to change their order is by adding an additional key to the sort.
Back to top
View user's profile Send private message
Amit Kumar
Warnings : 1

New User


Joined: 27 Mar 2007
Posts: 3
Location: chennai

PostPosted: Wed May 16, 2007 3:28 pm
Reply with quote

Hi all,

I came accross a easytrieve program that is sorting a input file , i m trying to simulate the same by using jcl or cobol.
So far i used only dfsort but the output by easytrieve and dfsort is not matching.
The order of records in output fie is not matching for those records which all having same value in sort fields.

I come to know that internally easytrieve is also calling dfsort may be with different options.

If u have any suggestion. reply me back !

Amit
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 16, 2007 3:30 pm
Reply with quote

Does the easytrieve job print out the sort statemnts that it uses ?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed May 16, 2007 3:34 pm
Reply with quote

Amit Kumar wrote:
I came accross a easytrieve program that is sorting a input file , i m trying to simulate the same by using jcl or cobol.
So far i used only dfsort but the output by easytrieve and dfsort is not matching.
The order of records in output fie is not matching for those records which all having same value in sort fields.
I come to know that internally easytrieve is also calling dfsort may be with different options.
What is the order in the output file for the equals? The same as the input file?
What in the EZT program gives you the idea that sort is being called?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 16, 2007 8:28 pm
Reply with quote

For DFSORT, the EQUALS or NOEQUALS option determines the order of duplicate records. With EQUALS in effect, the duplicate records appear in the output in the same order they appear in the input. With NOEQUALS in effect, the duplicate records can appear in any order. If you have EQUALS in effect for DFSORT and easytrieve, then the order of the duplicate records will match. Otherwise, they won't necessarily match.

DFSORT message ICE128I shows EQUALS=Y for EQUALS or EQUALS=N for NOEQUALS.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 16, 2007 8:34 pm
Reply with quote

This is a duplicate of your other thread at:

ibmmainframes.com//viewtopic.php?t=20929

See my response there about EQUALS and NOEQUALS. I'm closing this duplicate thread.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top