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: 8794
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: 8794
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: 1348
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 Selecting multiple constant records DB2 3
This topic is locked: you cannot edit posts or make replies. Writng matched records into output fi... DFSORT/ICETOOL 11
No new posts Compare the file record count percent... DFSORT/ICETOOL 4
No new posts Merging more than two records DFSORT/ICETOOL 15
No new posts Matching and non matching records usi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top