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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

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