Page 1 of 1

Problem in Running Shell Script Though DataStage

Posted: Tue Sep 06, 2005 8:26 am
by Rubu
Hi ,
I m using DataStage Server Edition 7, Informix 9.3 data base and HP-UX everest B.11.11.
I have recently Installed the DataStage in Unix. Both the DataBase and DataStage Server are in the same Unix Box.
When i am trying to run the Shell Script thru Unix Prmpt , it is running fine.
But when i am trying to Run the same Shell Script the JoB fails after running Few Steps of Shell Scripts.It throws error when its tries to log into Informix DataBase using Dbaccess command.
The same Script and JOBs in a different Unix Box is running fine.

Log is :

"iata
gref30_cr_dev_1@gref_srv
/appl/grefadm/grefadm3/gref3_sync/script/
/appl/grefadm/grefadm3/gref3_sync/script/update_table_serial.sh[32]: 13377 Killed
, SysRetCd=0

Item #: 2218
Event ID: 2217
Timestamp: 2005-09-06 21:41:09
Type: Info
User Name: grefadm3
Message: JOB_CMB_CD_UPDATE_TAB_SER..AfterJob (UpdateTableSerial): table_serial is UPDATED for ts_table_name=iata AND ts_key_type=P

Item #: 2219
Event ID: 2218
Timestamp: 2005-09-06 21:41:09
Type: Info
User Name: grefadm3
Message: JOB_CMB_CD_UPDATE_TAB_SER..AfterJob (UpdateTS): Comm::=sh /appl/grefadm/grefadm3/gref3_sync/script/update_table_serial.sh L 8 iata gref30_cr_dev_1@gref_srv /appl/grefadm/grefadm3/gref3_sync/script/
"

PLease let me know how to resolve.

Rubu

Posted: Tue Sep 06, 2005 9:05 am
by AGStafford
Have you made sure all of your Unix environment variables ($PATH etc) are set correctly.
Many (Most) of the environment variables you take for granted in a command line are not setup when a Unix script is executed from DataStage.

Add a "set" command at the beginning of your script then run it from the command line and through DataStage at compare the results to see which ones are missing in DataStage.

Posted: Tue Sep 06, 2005 4:18 pm
by ray.wurlod
Where's the error? You have posted two informational messages.

Posted: Tue Sep 06, 2005 9:33 pm
by Rubu
HI ,

Ray : If u see the above Log u will find :

"/appl/grefadm/grefadm3/gref3_sync/script/update_table_serial.sh[32]: 13377 Killed
, SysRetCd=0
"


Secondly the Shell Script log information which i found is :

"/usr/lib/pa20_64/dld.sl: '/appl/dsadm/Ascential/DataStage/DSEngine/java/jre/lib/PA_RISC/hotspot/libjvm.sl' is not a valid load mod
ule: Bad magic number"


Thirdly the difference in Enviroment Setting Between two Server :

Server 1(Where the Jobs and Shell Script were running Fine):

PATH=/sbin:/usr/bin:/usr/informix_9.30SDK/bin:/opt/java1.3/bin:/usr/local/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/aCC/bin:.


Server 2 (Where the Shel Script is failing thru DataStage ) :

PATH=/sbin:/usr/bin:/usr/informix_csdk281/bin:/usr/local/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/aCC/bin:.


Please let me know if missing of "/opt/java1.3/bin" path in Env setting is the reson.



Thanks
Rubu

Re: Problem in Running Shell Script Though DataStage

Posted: Wed Sep 07, 2005 5:46 am
by battaliou
Have you specified which korn shell you're using at the start of your script? I had to set mine to:
#!/usr/bin/ksh

Posted: Wed Sep 07, 2005 6:03 am
by Eric
I think you need to preload java in your shell script.
Look at your dsenv file for the entry LD_PRELOAD.
Try getting your shell script to add this environment variable before it calls and java components.