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

Unique Record Count


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anandhan87

New User


Joined: 09 Feb 2016
Posts: 1
Location: India

PostPosted: Tue Feb 09, 2016 4:06 pm
Reply with quote

I have a PS file of LRECL 240 and RECFM FB and I am looking for the unique record count as output.

For Eg:

I/p File

AAAA 1111 AAAAAAAA
AAAA 1111 AAAAAAAA
AAAA 1111 AAAAAAAA
BBBB 2222 BBBBBBBB
BBBB 2222 BBBBBBBB
BBBB 2222 BBBBBBBB
CCCC 3333 CCCCCCCC
CCCC 3333 CCCCCCCC
CCCC 3333 CCCCCCCC

O/P should be

RECORD STATS REPORT
---------------------------

Total No.of Records = 3
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Feb 09, 2016 6:45 pm
Reply with quote

Use WHEN=GROUP and OUTFIL reporting features,

Code:
  OPTION COPY
                                           
  INREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,18),
               PUSH=(19:ID=5),RECORDS=1)
  OUTFIL INCLUDE=(19,5,CH,NE,C' '),
         REMOVECC,
         NODETAIL,
         TRAILER1=(C'Total No.of Records = ',
                   19,5)


If you really want the count left-justified and with no leading zeros, you should be able to manage that yourself with WHEN=INIT in INREC or OUTREC.
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 To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top