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

Output procedure in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
deogaurav

New User


Joined: 17 May 2008
Posts: 1
Location: India

PostPosted: Wed Nov 11, 2009 12:30 pm
Reply with quote

I have a requirement in which i have to sort a file on 2 fields and then remove duplicate records for that field.

Do we have a process like OUTPUT PROCEDURE as in cobol for easytrieve.
One approach that i can follow is like
sorting the file in one easytrieve program
reading it in another EasyTrieve program and remove duplicates.
But i do not want to use 2 codes.
Kindly help
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 11, 2009 2:52 pm
Reply with quote

What's wrong with the good old DFSORT/SYNCSORT?

O.
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Wed Nov 11, 2009 5:59 pm
Reply with quote

deogaurav,
Easytrieve is mainly used for Report purposse as ofer asked why dont you do in DFSORT which will be simple.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Nov 11, 2009 10:39 pm
Reply with quote

Easytrev (using syncsort ) JCL :

//$ORTPARM DD UNIT=SYSDA,SPACE=(CYL,1)

FILE $ORTPARM FB(80 6160)
SORTREC 1 80 A


INPUT(NULL)
SORTREC = ' SUM FIELDS=NONE'
PUT $ORTPARM

SORT infile TO outfile USING(sort keys)

* nullifying the sort parameter for sorts not interested in duplicates

INPUT(NULL)
SORTREC = ''
PUT $ORTPARM
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 12, 2009 2:00 am
Reply with quote

Hello,

If there are only a few records, sorting within Easytrieve is not so bad. If there is a high volume of records, it is usually not appropriate.

One approach would be tu use your sort product to get the file in sequence and then the Easytrieve to do the processing (depending on what all the code needs to do).

If the process is only to remove duplicates on the sort key (no other code whatever), i'd surely look into doing the entire process with the sort.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Nov 12, 2009 2:59 am
Reply with quote

With all respect Dick, but sorting within Easytrev is just calling/linking Syncsort or any sort product. And after the sort job is done, Easytrev is getting control again to eventually process the sorted data.

And yes if only duplicates have to be removed i agree with your last line,
but i thought that the TS mentioned Easytrev to sort and to continue to process the sorted data in the same Easytrev.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 12, 2009 4:15 am
Reply with quote

Hello,

Quote:
but sorting within Easytrev is just calling/linking Syncsort or any sort product.
True kinda, but An Oversimplification i believe. . . icon_smile.gif

Suggest you try this both ways with a high volume of long records (say 50 million records of 4k each) that are in completely random order. If what happens with this test is the same as what has happened in every test i've seen in the past comparing Easytrieve sort, the COBOL internal sort, and an external/stand-alone sort (although the last time i saw this compared was over 10 years ago and there have been several changes to many of the "players" in that time), the stand-alone sort was much faster. I should mention that most of this testing used Syncsort.

Add-on . . .

As i said earlier, if the volume is small it would not be an issue.
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 Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
No new posts XL C Trace Preprocessor Output All Other Mainframe Topics 3
Search our Forums:

Back to Top