Using Before SQL

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
reddy82
Participant
Posts: 29
Joined: Wed Feb 21, 2007 3:40 am
Location: mumbai
Contact:

Using Before SQL

Post by reddy82 »

Hi ,
I have a job which i need to set the some parameters in the BEFORE SQL tab of DB2 API stage

==> We have user defined datatypes for all the tables and while querying the these statements with our own logins to database other than our instance DB2INST1 we re having issues.

i am trying to set the following variables in before sql

SET PATH=DB2INST1;;
SET SCHEMA=DB2INST1;;

and my SQL statement is :

select * from table where varchar(field name)='????'

Before the above select statemnet executes i want to the SET variables ( mentioned above) to be executed in datastage .

I have unchecked the NON FATAL check box;

Please provide your options / suggestions so that this works

Regards,
Reddy
Reddy
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you're trying to set enviroment variables, that needs to happen before you start the job. 'Before SQL' needs to be valid sql / session statements... are these? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply