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
 

 

counting of occurences

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

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Fri May 29, 2009 7:10 pm    Post subject: counting of occurences
Reply with quote

I have a file fixed block 20

44556601
43556600
42556600
44556601
42556600
44556602
43556600
44556601
44556601
48556600


I would like to see in an outputfile the values together with the number of occurences which have 00 on position 7-8
So output will be (FB 20)

425566 0000002
435566 0000002
485566 0000001

Can someone help?

thanks
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 May 29, 2009 8:48 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...   input file (FB/20)
//SORTOUT DD DSN=...  output file (FB/20)
//SYSIN    DD    *
  INCLUDE COND=(7,2,CH,EQ,C'00')
  SORT FIELDS=(1,6,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(1,6,
      TRAILER3=(1,6,X,COUNT=(M11,LENGTH=7)))
/*
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Fri May 29, 2009 10:25 pm    Post subject:
Reply with quote

Frank

thank you very much
Monday it will be tested
let you know
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 ADSO Store Procedure to receive mutip... yogi.47eie IDMS/ADSO 2 Fri Aug 21, 2015 7:14 pm
No new posts Reformat multiple records into single... rmd3003 JCL & VSAM 5 Thu May 23, 2013 9:03 pm
No new posts copy groups of records based on subgr... Balaji Canabady DFSORT/ICETOOL 1 Thu Mar 15, 2012 5:56 pm
No new posts Number of occurences of a value in th... lakshmikondur JCL & VSAM 11 Fri Feb 24, 2012 10:30 am
No new posts counting the number of lines of code kalyan_lc5 Java & MQSeries 7 Thu Aug 25, 2011 11:25 am


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