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

counting of occurences


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


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

PostPosted: Fri May 29, 2009 8:48 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Get next 5 numeric from a string of '... COBOL Programming 4
No new posts Complex counting and grouping DFSORT/ICETOOL 8
No new posts How to include a particular field val... DFSORT/ICETOOL 8
No new posts ADSO Store Procedure to receive mutip... IDMS/ADSO 2
No new posts Reformat multiple records into single... JCL & VSAM 5
Search our Forums:

Back to Top