Load SQL from a file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dasari
Participant
Posts: 2
Joined: Mon Oct 16, 2006 3:15 pm

Load SQL from a file

Post by dasari »

I am trying to use Load SQL from a file option in DSDB2 stage.
I gave the path name of the file. But for some reason DS is still expecting a SQL there and gives an error message "An unexpected token /xxx/xxx was found.

Thanks in advance for any information regarding this.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Welcome Aboard,
Specify the keyword {FILE} before giving the fully qualified path for the sql file. That should do the trick.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dasari
Participant
Posts: 2
Joined: Mon Oct 16, 2006 3:15 pm

Thanks

Post by dasari »

[quote="DSguru2B"]Welcome Aboard,
Specify the keyword {FILE} before giving the fully qualified path for the sql file. That should do the trick.[/quote]

I tried prefixing with {File} . I also tried File. I get the following message.

src_codetables_edw_codevalues..Copy_of_db2blU1IAA02_s: [IBM][CLI Driver] CLI0118E Invalid SQL syntax. SQLSTATE=37000
SQLExecDirect: Error executing statement '{File}/home/a136940/sqlstringU1IAA01'. See following DB2 message for details.
src_codetables_edw_codevalues..Copy_of_db2blU1IAA02_s.DSLink1: DSP.Open GCI $DSP.Open error -100.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

This is right out of dsbooks -> Plugin Documentation -> DB2/UDB API Stage (page 14)


If the property value begins with {FILE}, the remaining text is
interpreted as a pathname, and the contents of the file supplies
the property value.


Provided you have 7.5.1A. If you have any other version then i am not too sure.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply