Hello,
In one of my Job, I have used a Exec command stage activity in which I am trying to capture the Job Statistics from the server as below
DSHOME=`cat /.dshome`;. $DSHOME/dsenv;
SRC_CNT=$($DSHOME/bin/dsjob -linkinfo MCB_IDAP_P jb_SRC_to_TGT_Norm_Load ODBC_Delta lnk_ODBC_Delta | awk 'NR>1{exit};1{print $5}');
TGT_CNT=$($DSHOME/bin/dsjob -linkinfo MCB_IDAP_P jb_SRC_to_TGT_Norm_Load XFM_Split_I_D_U lnk_XFM_Split_I_D_U | awk 'NR>1{exit};1{print $5}');
REJ_CNT=$($DSHOME/bin/dsjob -linkinfo MCB_IDAP_P jb_SRC_to_TGT_Norm_Load XFM_Null_Handling lnk_XFM_Reject | awk 'NR>1{exit};1{print $5}');
JOB_STATUS=$($DSHOME/bin/dsjob -jobinfo MCB_IDAP_P jb_SRC_to_TGT_Norm_Load | egrep 'Job Status');
JOB_START_TIME=$($DSHOME/bin/dsjob -report MCB_IDAP_P jb_SRC_to_TGT_Norm_Load | egrep 'Job start time');
JOB_END_TIME=$($DSHOME/bin/dsjob -report MCB_IDAP_P jb_SRC_to_TGT_Norm_Load | egrep 'Job end time');
JOB_ELAPSED_TIME=$($DSHOME/bin/dsjob -report MCB_IDAP_P jb_SRC_to_TGT_Norm_Load | egrep 'Job elapsed time');
echo $SRC_CNT,$TGT_CNT,$REJ_CNT,$JOB_STATUS,$JOB_START_TIME,$JOB_END_TIME,$JOB_ELAPSED_TIME;
The expected outcome of this activity is
Reply=0
Output from command ====>
Status code = 0
Status code = 0
Status code = 0
Status code = 0
23945,1313,88,Job Status : RUN with WARNINGS (2), Job start time=2019-04-10 16:21:38, Job end time=2019-04-10 16:22:27, Job elapsed time=00:00:49
And most of times the job gives me correct result but in last few days my jobs are randonly failing as I am getting additional row (Status =0) which is making the return row count to 6 instead of 5
Reply=0
Output from command ====>
Status code = 0
Status code = 0
Status code = 0
Status code = 0
Status code = 0
23945,1313,88,Job Status : RUN with WARNINGS (2), Job start time=2019-04-10 16:21:38, Job end time=2019-04-10 16:22:27, Job elapsed time=00:00:49
And job fails as it is trying to read the Row no. 5.
When I reset the sequncer and re-run the same job, it executes successful and create the correct output i.e. 5 rows instead of 6.
Can anyone help me in fixing this behaviour which looks quite wiered, how the same job can return different values when there is no change anywhere.
Regards
Neeraj
Exec Command Activity
A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett, rschirm, roy
Jump to
- Moderators' Choice
- ↳ Editor's BLOG Corner
- ↳ Ask the Experts! - Dads and Grads
- ↳ DSXchange Testimonials
- ↳ Cognos (IBM BI)
- FAQs
- ↳ FAQs
- ↳ FAQ Discussion
- DataStage
- ↳ General
- ↳ IBM<sup>®</sup> Infosphere DataStage Server Edition
- ↳ IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- ↳ Archive of DataStage Users@Oliver.com
- IBM<sup>®</sup>Infosphere Products<sup></sup>
- ↳ Business Glossary
- Suggestions
- ↳ Site/Forum
- ↳ Enhancement Wish List
- Consulting
- ↳ Talent
- ↳ Looking for Talent
- Support
- ↳ Parameter Manager
- ↳ Compile All Plus
- Usergroup Forums
- ↳ Usergroup Central Forum
- ↳ Heartland Usergroup Forum
- The Written Word
- ↳ Articles, White Papers and Tips and Tricks
- ↳ Product Documentation
- Third Party Applications
- ↳ Third Party Applications
- Product Derivatives
- ↳ Functions
- ↳ Routines
- ↳ Jobs
- ↳ Logs
- Tools
- ↳ Tools Forum
- Category
- ↳ Infosphere Master Data Management
- ↳ Data Quality Best Practices
- ↳ IBM QualityStage
- ↳ Information Analyzer (formerly ProfileStage)
- ↳ IBM<sup>®</sup> SOA Editions (Formerly RTI Services)
- ↳ IBM<sup>®</sup> DataStage TX
- ↳ BI
- ↳ Data Integration