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

Merge with overlay


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

New User


Joined: 28 Mar 2008
Posts: 69
Location: 125.16.180.5

PostPosted: Fri Apr 03, 2009 5:56 pm
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: 69
Location: 125.16.180.5

PostPosted: Fri Apr 03, 2009 6:24 pm
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: 3156
Location: Tucson AZ

PostPosted: Fri Apr 03, 2009 6:42 pm
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
Reply with quote

Karthik_sripal,

I answered exact question here

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
No new posts Merge 2 input files after sort SYNCSORT 14
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
Search our Forums:

Back to Top