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

How to get total number of records of a file?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 Developer


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

PostPosted: Fri Jun 09, 2006 8:19 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top