Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
count the number of records from different 5 files

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

New User


Joined: 22 Jun 2007
Posts: 84
Location: bangalore

PostPosted: Mon Mar 25, 2019 11:29 pm    Post subject: count the number of records from different 5 files
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: 8779
Location: Welsh Wales

PostPosted: Tue Mar 26, 2019 12:36 pm    Post subject:
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: 84
Location: bangalore

PostPosted: Tue Mar 26, 2019 7:43 pm    Post subject: count the number of records from different 5 files
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: 8779
Location: Welsh Wales

PostPosted: Wed Mar 27, 2019 12:31 pm    Post subject:
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: 1315
Location: Israel

PostPosted: Wed Mar 27, 2019 7:58 pm    Post subject: Re: count the number of records from different 5 files
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    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 Search string from concatenated input... srini24 JCL & VSAM 8 Sat Mar 30, 2019 9:51 pm
No new posts Split input file into multiple files ... srini24 DFSORT/ICETOOL 1 Sat Mar 30, 2019 9:39 pm
No new posts files whose record count varies with ... janmejay CA Products 0 Fri Mar 08, 2019 9:35 pm
This topic is locked: you cannot edit posts or make replies. Copy one file to possible multiple files dibyendumandal11111 SYNCSORT 9 Fri Mar 08, 2019 2:47 am
No new posts Need help in adding Header to records senthamizh SYNCSORT 1 Thu Mar 07, 2019 7:55 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us