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
 
How to get total number of records of a file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
murali.gummadi

New User


Joined: 17 May 2006
Posts: 5

PostPosted: Fri Jun 09, 2006 10:26 am    Post subject: How to get total number of records of a file?
Reply with quote

Hi all,

I have got requirement that,
I am sorting the records and put them into another output file,But its okey
Now my requirement is, i want to display the count (i.e. Total number records in a output file) in the same file(output file).
Another thing i want to do changes in JCl only.

Please give me the solution as soon as possible its urgent

Thanks in advance
Murali
Back to top
View user's profile Send private message

vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Jun 09, 2006 12:02 pm    Post subject:
Reply with quote

Please use sort sysin as below


INREC FIELDS=(C'00000000000001',

-------fields
SORT FIELDS=field1

SUM FIELDS=(2,13,ZD)

first use inrec and assign "C'00000000000001'" value then sort and write outrec

U have any questions please let me know

thanks
Back to top
View user's profile Send private message
murali.gummadi

New User


Joined: 17 May 2006
Posts: 5

PostPosted: Fri Jun 09, 2006 12:17 pm    Post subject:
Reply with quote

Hi vicky10001,

Thanks for your kind response
Okey i will try this and i will get back to you if it wont work.
Please clear me that will it give us the count in out put file(number of records)

Thanks & Regards
Murali
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jun 09, 2006 8:19 pm    Post subject:
Reply with quote

You don't need to use INREC, SUM and OUTREC. You can do it much more easily with a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
   SORT FIELDS=(...)
   OUTFIL REMOVECC,
       TRAILER1=(COUNT=(M11,LENGTH=8))
/*


This will give you an 8-byte count as the last record of your output file after the sorted records.
Back to top
View user's profile Send private message
murali.gummadi

New User


Joined: 17 May 2006
Posts: 5

PostPosted: Wed Jun 14, 2006 11:24 am    Post subject: Re: How to get total number of records of a file?
Reply with quote

Hi Frank Yaeger,

Thank you very much in helping me out in this regard.

Thaks a lot man Its working fine.

Regards
Murali
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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