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

Is it possible to do in a single step???


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

New User


Joined: 01 Jun 2011
Posts: 5
Location: Chennai

PostPosted: Tue Dec 20, 2011 3:59 pm
Reply with quote

Dear All,

I have a PS file which a have a list of customer's e-mail address. Now, the requirement is need to identify the statistics of E-mail Service provider

Ex: mail-address @ Service Provider

Sample file:-
=============
aaaaaaa@yahoo.co.in
bbbbbbbb@gmail.com
cccccc@hotmail.com
dddd@facebook.com
eeeeeeee@hotmail.com
ffff@yahoo.co.in

Expected Output:-
=============
yahoo.co.in 2
gmail.com 1
hotmail.com 2
facebook.com 1

Is it possible to do the above task in a single step?
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: Tue Dec 20, 2011 11:27 pm
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
aaaaaaa@yahoo.co.in
bbbbbbbb@gmail.com
cccccc@hotmail.com
dddd@facebook.com
eeeeeeee@hotmail.com
ffff@yahoo.co.in
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  INREC PARSE=(%01=(STARTAFT=C'@',FIXLEN=25)),BUILD=(%01)
  SORT FIELDS=(1,25,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    BUILD=(80X),
    SECTIONS=(1,25,
      TRAILER3=(1,25,X,COUNT=(M10,LENGTH=8)))
/*


SORTOUT would have:

Code:

facebook.com                     1     
gmail.com                        1     
hotmail.com                      2     
yahoo.co.in                      2     
Back to top
View user's profile Send private message
dgokulakrishnan

New User


Joined: 01 Jun 2011
Posts: 5
Location: Chennai

PostPosted: Wed Dec 21, 2011 7:37 am
Reply with quote

Thank you Very Much Frank !!!!
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top