Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us