Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Output procedure in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Output procedure in Easytrieve
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: 2360
Location: Israel

PostPosted: Wed Nov 11, 2009 2:52 pm    Post subject:
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    Post subject: Reply to: Output procedure in Easytrieve
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Wed Nov 11, 2009 10:39 pm    Post subject:
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

Site Director


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

PostPosted: Thu Nov 12, 2009 2:00 am    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Thu Nov 12, 2009 2:59 am    Post subject:
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

Site Director


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

PostPosted: Thu Nov 12, 2009 4:15 am    Post subject:
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    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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us