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
 

 

How to eliminate unwanted record in the same step

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

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Sat Jan 18, 2014 12:24 am    Post subject: How to eliminate unwanted record in the same step
Reply with quote

Code:
//PS050    EXEC PGM=ICETOOL,COND=(4,LT)                     
//TOOLMSG    DD SYSOUT=*                                   
//DFSMSG     DD SYSOUT=*                                   
//SORTIN     DD DSN=File1.SORTED,DISP=SHR       
//           DD DSN=File2.PRVDSN,DISP=SHR       
//OUTPUT     DD DSN=File3.CURDSN,               
//TOOLIN     DD *
SELECT FROM(SORTIN) TO(OUTPUT) ON(1,80,CH) NODUPS
/*
         


CASE #1
The above code working what i need in the below senerio

Sorted file
1
2
3
PRVDSN file
1
2
and desired out put is
3

Case #2
Sorted file
1
2
PRVDSN file
1
2
3
But its writing record 3 of PRVDSN file into output file which I don't want to happen... Is there anyway...highly helpful
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jan 18, 2014 12:31 am    Post subject:
Reply with quote

Hello,

Suggest you read about JOINKEYS.

There are many examples here in the forum. In the blue line near the top of the page is a SEARCH function. Search for JOINKEYS in this part of the forum (DFSORT/ICetool).

If you are going to do more with the sort, suggest you download a copy of the documentation so it will be convenient.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Sat Jan 18, 2014 1:18 am    Post subject:
Reply with quote

Read the manual about JOIN UNPAIRED

Lots of examples in forum

Also let us know the sort product that is being used
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Sat Jan 18, 2014 12:43 pm    Post subject: Reply to: How to eliminate unwanted record in the same step
Reply with quote

Code:

//STEP01 EXEC PGM=SORT,COND=(4,LT)
//SYSOUT   DD SYSOUT=*                                     
//SORTJNF1 DD DSN=File1.SORTED,DISP=SHR       
//SORTJNF2 DD DSN=File2.PRVDSN,DISP=SHR       
//SORTOUT  DD DSN=DSN=File3.CURDSN,DISP=SHR       
//SYSIN    DD *
  JOINKEYS FILE=F1,FIELDS=(1,1,A)                     
  JOINKEYS FILE=F2,FIELDS=(1,1,A)
  REFORMAT FIELDS=(F1:1,Lenthoffile1.sorted)                                       
  JOIN UNPAIRED,F1,ONLY
  SORT FIELDS=COPY
/*
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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