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

count the number of records from different 5 files


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

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Mon Mar 25, 2019 11:29 pm
Reply with quote

I need to write a program in Easytrieve where i have 5 input files I and want to count the number of records of each file with RECORD-COUNT keyword.

Later i want to create an output file like below-

Name of file Number of records
XXXXXX 1001
YYYYYY 2001
ZZZZZZ 3001

Please let me know how to achieve this. I was able to display it for 1 file only.
Please help me out.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 26, 2019 12:36 pm
Reply with quote

One program does one file, so adapt the JCL to process each one individually.

Of course, knowing your notations of what XXXXXX, YYYYYY and ZZZZZZ mean may affect any suggested solution.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Mar 26, 2019 7:43 pm
Reply with quote

Thanks for replying expat.

the XXXX and YYYY are file names of 5 files. Like one is for "Store Inventory" and one "Coupan file". so similarly i have 15 files.

My program is able to count for 1 file. I gave all these 15 files in DD name in JCL step.

Now I am trying to get the record count in each file and then want an output file like name of files and respective counts.

Can i do it with Easytrieve? Please suggest else i will adopt JCL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 27, 2019 12:31 pm
Reply with quote

I don't know if you can do it with Easytrieve, but like most other languages there will probably be some functionality which allows you to get the DSname from the DDname , and also the ability to read a dataset sequentially and count the records.

So IMHO it is possible, but not being an Easytrieve programmer will not state that it is.

If you are looking for code without showing us what you have accomplished yourself and explaining the problems that you have had, I think that you will have a long wait for that code.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Mar 27, 2019 7:58 pm
Reply with quote

janmejay wrote:
I need to write a program in Easytrieve...

Do you really need to write a program ?
Why not use your SORT product ?
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 To get the count of rows for every 1 ... DB2 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
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