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
 

 

Merge with overlay

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

New User


Joined: 28 Mar 2008
Posts: 67
Location: 125.16.180.5

PostPosted: Fri Apr 03, 2009 5:56 pm    Post subject: Merge with overlay
Reply with quote

My input file1 will be like
Code:

   SELECT * FROM                   
   TABLE1                         
   WHERE DATE > &TEMPDATE       



and my input file2 will be like

Code:

2009-04-01



and i want my output file to be like
Code:

SELECT * FROM           
TABLE1                 
WHERE DATE > 2009-04-01


and i want to do this via sort
Back to top
View user's profile Send private message

karthik_sripal

New User


Joined: 28 Mar 2008
Posts: 67
Location: 125.16.180.5

PostPosted: Fri Apr 03, 2009 6:24 pm    Post subject:
Reply with quote

Ashish Ranjan wrote:
Use below piece of code:

Code:
SORT FIELDS=(st_pos_of_date,10,CH,A)
INCLUDE COND=(st_pos_of_date,10,CH,GT,C'2009-04-01')


thanks ranjan for the quick reply .

Am using a similar approach currently!!

The thing is i dont want to edit my sort card evry time i wanna change my date. that is the reason why i kept the date in another file .

so in nutshell i want my date to be in seperate file and not sort card.

please correct me if am missing anything.

thnks again
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 03, 2009 6:42 pm    Post subject:
Reply with quote

There are several examples of how to build sort control statements in one step to be used in a second step.
The poorly titled Can this be done in DFSORT is one example.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Apr 03, 2009 9:33 pm    Post subject:
Reply with quote

Karthik_sripal,

I answered exact question here

http://ibmmainframes.com/about39365.html
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 SQL Merge error -254 Robin Sulsona DB2 8 Wed Jun 01, 2016 8:28 pm
No new posts SAS MERGE to DFSORT Musab Ahmed DFSORT/ICETOOL 6 Mon Feb 01, 2016 5:44 pm
No new posts Overlay with right shift Bill Woodger DFSORT/ICETOOL 3 Thu Jan 28, 2016 7:49 pm
No new posts Merge two files having two trailer re... R.Manivannan DFSORT/ICETOOL 7 Wed Nov 25, 2015 9:18 pm
No new posts Overlay with WHEN=Group not working krsenthil85 DFSORT/ICETOOL 7 Wed Oct 21, 2015 4:00 am


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