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

To find the maximum number of records


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Jun 17, 2009 11:16 am
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
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

Moderator Emeritus


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

PostPosted: Wed Jun 17, 2009 9:57 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Jun 18, 2009 11:01 am
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

Moderator Emeritus


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

PostPosted: Thu Jun 18, 2009 10:28 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Jun 19, 2009 8:17 am
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
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

Moderator Emeritus


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

PostPosted: Fri Jun 19, 2009 9:21 am
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: 23
Location: bangalore

PostPosted: Fri Jul 03, 2009 1:53 pm
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: 23
Location: bangalore

PostPosted: Fri Jul 03, 2009 1:55 pm
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 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 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
Search our Forums:

Back to Top