View previous topic :: View next topic
|
Author |
Message |
dssenthil
New User
Joined: 14 Aug 2008 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dssenthil
New User
Joined: 14 Aug 2008 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I think that if you searched the DFSORT forum, you will find a SORT solution to do what you want. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
That could get an answer, but would not help one to learn Easytrieve. . .
Sentil - what progress? |
|
Back to top |
|
|
titan
New User
Joined: 23 Jul 2006 Posts: 3
|
|
|
|
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. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dssenthil
New User
Joined: 14 Aug 2008 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To access a sequential file, you want to use GET rather than READ. |
|
Back to top |
|
|
mnnarayankar
New User
Joined: 21 Jan 2008 Posts: 23 Location: bangalore
|
|
|
|
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 |
|
|
mnnarayankar
New User
Joined: 21 Jan 2008 Posts: 23 Location: bangalore
|
|
|
|
ITS A COUNTER LOGIC
U CAN FOLLOW TITAN'S SIMPLE REPORT LOGIC
|
|
Back to top |
|
|
|