Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How does EZT keep the order of output records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: How does EZT keep the order of output records
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    Post subject: Re: Order of output records
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: 3158
Location: Tucson AZ

PostPosted: Wed May 16, 2007 3:04 pm    Post subject: Re: Order of output records
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    Post subject: Dfsort option order of records in output fie is not matching
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 16, 2007 3:30 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed May 16, 2007 3:34 pm    Post subject:
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 Moderator


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

PostPosted: Wed May 16, 2007 8:28 pm    Post subject:
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 Moderator


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

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

This is a duplicate of your other thread at:

http://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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us