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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Is it possible to do in a single step???
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 Moderator


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

PostPosted: Tue Dec 20, 2011 11:27 pm    Post subject:
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    Post subject: Is it possible to do in a single step???
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    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 Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


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