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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am


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