Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us