Return values from script ran through execute Command

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kamaldeep.kaur
Participant
Posts: 17
Joined: Thu Oct 26, 2006 12:47 am
Location: chennai

Return values from script ran through execute Command

Post by kamaldeep.kaur »

Hi,


I am running a simple script from execute command activity,which writes the the return value 0 when scripts complete.
(Triggers :- ReturnValue <> 0 then abort)

But it abort even if the return value is 0 as Reply from the script is 1.

Please guide me how this reply comes in the picture.(please suggest if something is missing from the script.)

Below is the output from the sequence:-
Seq_agg_monthly_subs_acq..JobControl (@Exe_load_tgt): Executed: sh -x /datafs3/Datastage_Resources/BI/Scripts/Load_Incremental.sh devbi1 ibmbi2011 BIEDW AGG_MONTHLY_SUBS_ACQ /datafs3/Datastage_Resources/BI/AGG_MON_SUBS_ACQ.csv
Reply=1
Output from command ====>
+ '[' 5 -ne 5 ']'
+ usr=devbi1
+ pd=ibmbi2011
+ db2 'connect to bidev user devbi1 using ibmbi2011'

Database Connection Information

Database server = DB2/LINUXX8664 9.5.7
SQL authorization ID = DEVBI1
Local database alias = BIDEV

+ SCHEMANAME=BIEDW
+ TABNAME=AGG_MONTHLY_SUBS_ACQ
+ FILEPATH=/datafs3/Datastage_Resources/BI/AGG_MON_SUBS_ACQ.csv
+ db2 'load client from /datafs3/Datastage_Resources/BI/AGG_MON_SUBS_ACQ.csv of del modified by coldel| warningcount 10 insert into BIEDW.AGG_MONTHLY_SUBS_ACQ nonrecoverable'
SQL3109N The utility is beginning to load data from file
"/datafs3/Datastage_Resources/BI/AGG_MON_SUBS_ACQ.csv".

SQL3500W The utility is beginning the "LOAD" phase at time "10/11/2011
17:44:53.145143".

SQL3519W Begin Load Consistency Point. Input record count = "0".

SQL3520W Load Consistency Point was successful.

SQL3110N The utility has completed processing. "113472" rows were read from
the input file.

SQL3519W Begin Load Consistency Point. Input record count = "113472".

SQL3520W Load Consistency Point was successful.

SQL3515W The utility has finished the "LOAD" phase at time "10/11/2011
17:44:53.886202".

SQL3500W The utility is beginning the "BUILD" phase at time "10/11/2011
17:44:53.886496".

SQL3213I The indexing mode is "INCREMENTAL".

SQL3515W The utility has finished the "BUILD" phase at time "10/11/2011
17:44:57.975906".


Number of rows read = 113472
Number of rows skipped = 0
Number of rows loaded = 113472
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 113472

+ kml=0
+ '[' 0 '!=' 0 ']'
+ return 0
/datafs3/Datastage_Resources/BI/Scripts/Load_Incremental.sh: line 52: return: can only `return' from a function or sourced script
+ exit
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to determine under what circumstances the /datafs3/Datastage_Resources/BI/Scripts/Load_Incremental.sh script can generate an exit status of 1.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply