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
 

 

Question abount XSUM or SELECT FROM(IN)

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

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Sat Jun 19, 2010 1:21 am    Post subject: Question abount XSUM or SELECT FROM(IN)
Reply with quote

Hello there. I have a question about eliminating duplicates. Let's say I have a file with duplicates. If I use XSUM, can I eliminate dups and in the same step reformat output file which has dups.
This is my JCL (it doesn't work, only to show my input):
Code:
//TOOLMSG DD SYSOUT=*                                         
//DFSMSG DD SYSOUT=*                                         
//IN    DD *                                                 
----+----1----+----2----+----3----+----4----+----5----+----6--
AAAAAXXXXX1111111111XXXXXXXXXXXXXX                           
AAAAAXXXXX1111111111XXXXXXXXXXXXXX                           
AAAAAXXXXX1111111111XXXXXXXXXXXXXX                           
BBBBBXXXXX2222222222XXXXXXXXXXXXXX                           
BBBBBXXXXX2222222222XXXXXXXXXXXXXX                           
CCCCCXXXXX3333333333XXXXXXXXXXXXXX                           
/*                                                           
//OUT DD SYSOUT=*                                             
//SORTXSUM DD SYSOUT=*                                       
//TOOLIN DD *                                                 
 SELECT FROM(IN) TO(OUT) ON(1,3,CH) FIRST DISCARD(SORTXSUM) -
 USING(CTL1)                                                 
/*                                                           
//CTL1CNTL DD *                                               
  OUTREC FIELDS=(11,10)   


This is how my main output file (OUT) should look like:

Code:
AAAAAXXXXX1111111111XXXXXXXXXXXXXX
BBBBBXXXXX2222222222XXXXXXXXXXXXXX
CCCCCXXXXX3333333333XXXXXXXXXXXXXX


This is what my DUPS output (SORTXSUM) should look like:
Code:
1111111111
1111111111
2222222222
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: Sat Jun 19, 2010 1:40 am    Post subject:
Reply with quote

Just use the following DFSORT statements for CTL1CNTL:

Code:

//CTL1CNTL DD *                           
  OUTFIL FNAMES=OUT                       
  OUTFIL FNAMES=SORTXSUM,BUILD=(11,10)     
/*
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Sat Jun 19, 2010 1:54 am    Post subject:
Reply with quote

Frank, thanks. Every time you answer it looks so simple. Just awesome.
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: Sat Jun 19, 2010 2:30 am    Post subject:
Reply with quote

I have the DFSORT books memorized (since I wrote them). icon_wink.gif
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 Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


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