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
 

 

To find the maximum number of records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Wed Jun 17, 2009 11:07 am    Post subject: To find the maximum number of records
Reply with quote

Hi,
I have a flat file of LRECL 550. Key is account number. There are multiple entries for one account number. I need to code an easytrieve to find out what is the maximum number of records for an account number. Please someone suggest some ideas.

Thanks in advance.
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: Wed Jun 17, 2009 11:16 am    Post subject:
Reply with quote

Hello,

What have you coded so far?

People here will help but will not write the code for you.

Suggest you clone some already working code that does something similar on your system and make whatever modificationa are needed for this requirement.
Back to top
View user's profile Send private message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Wed Jun 17, 2009 11:31 am    Post subject:
Reply with quote

Hi Dick,
Thanks for your quick response. I have sort jcl to count the number of records but since i am new to easytrieve, i dont know how to start with. Please help me in this regards.
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: Wed Jun 17, 2009 9:57 pm    Post subject:
Reply with quote

Hello,

Someone else using your system is probably not completely new to Easytrieve. . . To repeat:
Quote:
Suggest you clone some already working code that does something similar on your system and make whatever modifications are needed for this requirement.


If you are not willing to speak with your peers, there are some examples in the Easytrieve documentation. If your organization is licensed to use the product, all of the material may be downloaded for free from the CA Support site.

You also need to get the correct execution jcl from someone - this is site-specific.
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: Thu Jun 18, 2009 11:01 am    Post subject:
Reply with quote

I think that if you searched the DFSORT forum, you will find a SORT solution to do what you want.
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 Jun 18, 2009 10:28 pm    Post subject:
Reply with quote

Hello,

That could get an answer, but would not help one to learn Easytrieve. . .

Sentil - what progress?
Back to top
View user's profile Send private message
titan

New User


Joined: 23 Jul 2006
Posts: 3

PostPosted: Fri Jun 19, 2009 7:42 am    Post subject:
Reply with quote

You can use the TALLY to generate a report. Do like this,

REPORT RPT01 SUMMARY

Sequence acct-number
Control final noprint acct-number
Line acct-number TALLY

TALLY column will show you the number of duplicates for each acct-numbers.

This way is not the most convenient one, believe there is an effective method in DFSORT/SYNCSORT. icon_smile.gif
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: Fri Jun 19, 2009 8:17 am    Post subject:
Reply with quote

Hello,

Titan,

Senthil already has sort jcl. . .

The goal is to learn Easytrieve.


Senthil,

Have you asked anyone for the proper jcl to use on your system?
Back to top
View user's profile Send private message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Fri Jun 19, 2009 8:58 am    Post subject:
Reply with quote

Thanks Titan and Dick... I was trying myself to code the easytrieve program and i was succeeded in coding match programs( after learning sample documents). But i am facing difficulty in reading a file and increasing the counter since i am not able to understand the READ concept.

Please help me with an READ statement example.
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: Fri Jun 19, 2009 9:21 am    Post subject:
Reply with quote

Hello,

To access a sequential file, you want to use GET rather than READ.
Back to top
View user's profile Send private message
mnnarayankar

New User


Joined: 21 Jan 2008
Posts: 24
Location: bangalore

PostPosted: Fri Jul 03, 2009 1:53 pm    Post subject:
Reply with quote

Hi,

Library section contains -

WS-REC-CNT-HD W 27 A
WS-REC-CNT-LB WS-REC-CNT-HD 20 A VALUE ' TOTAL RECORD COUNT:'
WS-REC-CNT WS-REC-CNT-HD +20 07 N VALUE 0.

WS-ARE-THERE-MORE-REC W 1 A VALUE 'Y'
Activity section contains -

IF WS-ARE-THERE-MORE-REC = 'Y'
WS-REC-CNT = WS-REC-CNT + 1
PUT OUTFILE
MOVE 'N' TO WS-ARE-THERE-MORE-REC
END-IF



MOVE '*************************************' +
TO OUTFILE-REC.
PUT OUTFILE
MOVE WS-REC-CNT-HD TO OUTFILE-REC.
PUT OUTFILE
MOVE '*************************************' +
TO OUTFILE-REC.
PUT OUTFILE
Back to top
View user's profile Send private message
mnnarayankar

New User


Joined: 21 Jan 2008
Posts: 24
Location: bangalore

PostPosted: Fri Jul 03, 2009 1:55 pm    Post subject:
Reply with quote

ITS A COUNTER LOGIC

U CAN FOLLOW TITAN'S SIMPLE REPORT LOGIC
icon_rolleyes.gif
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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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