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
 

 

Problem with replacing of data from input files.

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

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Wed Apr 01, 2009 5:57 pm    Post subject: Problem with replacing of data from input files.
Reply with quote

Hi All,

I have an input file1 which has got the only date value in the below format.

Input File1 Data :
2009-04-01

I have one more file which has got a simple query like

Input File2 Data :

select * from
TABLE1
where date > &tempdate

Now, I want the &tempdate of file2 data to be replaced with date value contained in file2.

To be more clear the Required Output should be:

select * from
TABLE1
where date > 2009-04-01

Please let me know how can we resolve this.

Dubasi
Back to top
View user's profile Send private message

himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Wed Apr 01, 2009 6:14 pm    Post subject:
Reply with quote

What field do you want to replace with what?
can you be a bit clear?
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Apr 01, 2009 9:03 pm    Post subject: Reply to: Problem with replacing of data from input files.
Reply with quote

dubasir,

If your intention is to generate the query for a unload or something , you really don't have to do any thing. Simply concatenate both files together and you should be all set

Code:

//STEP0100 EXEC PGM=IKJEFT01           
//SYSTSPRT DD SYSOUT=*,DCB=BLKSIZE=121 
//SYSPRINT DD SYSOUT=*                 
//SYSTSIN  DD *                         
 DSN SYSTEM(xxx)                       
 RUN  PROGRAM(DSNTIAUL) -               
      PLAN(DSNTIAUL)    -               
      PARMS('SQL')      -               
      LIB('xxxx.RUNLIB.LOAD')           
//SYSREC00 DD SYSOUT=*                 
//SYSPUNCH DD SYSOUT=*                 
//SYSIN    DD DSN=Your 80 byte query file,DISP=SHR
//         DD DSN=your 80 byte date file,DISP=SHR
//*


That sysin would be translated as follows

Code:

//SYSIN    DD *                         
SELECT *                               
  FROM table1                       
 WHERE date >                           
//         DD *                         
2009-04-01;                                   
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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