Page 1 of 1

Need help with shell script which calls Datastage Job

Posted: Mon Nov 28, 2011 4:40 am
by mac4rfree85
Hi Guys,

I have shell script which is calling Datastage job and is running perfectly.
The problem is the parameters needed are in a Oracle table which i need to fetch.
I am able to fetch them if i write in a separate script,but when i include the same code in the script which is calling Datastage (sourcing dsenv file), the sql is failing with the below errror.

Code: Select all

Error 19 initializing SQL*Plus
Invalid NLS character set for this OS environment
My guess is dsenv is changing some of the required params for Oracle. Has anybody included a SQL command in a Datastage calling Script.

Please guide me as what i am doing wrong.

Cheers!!!!

Posted: Mon Nov 28, 2011 6:11 am
by datisaq
Make sure you have ORACLE_HOME and ORACLE_SID variables properly set for the environment.

then use sqlplus -s username/pwd comnd for logging
after that u can just type SQL cmnds directly.

e.g:-

sqlplus -S $user/$pass <<EOF
SELECT * FROM tableName;
exit;
EOF

Posted: Mon Nov 28, 2011 7:51 am
by chulett
If you still have an issue, suggest you post the relevant section of your script.