Conditional execution of job

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

Moderators: chulett, rschirm, roy

prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

I need the record count in a file. Yes it creates a empty file when there is no record.
Am saying we need not take record count, i was explaining check whether there are any contents in file
Like head command in unix, guess more +1 <file> will give first few lines of file. So in the trigger expression we can check the output of the command executed. If there are content trigger success link.
Thanks,
Prasanna
sudha03_vpr
Participant
Posts: 34
Joined: Tue Feb 26, 2013 9:36 am
Location: Chicago

Post by sudha03_vpr »

You can probably check the wc-1 (word count) of the file and use this condition in Custom Conditional -> Trigger tab

convert(@FM,"", exec_filesize_isst.$CommandOutput) > 0

This means if the file size is greater than 0 it would trigger the subsequent job.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

I think we are waiting for the OP to check if the MKS toolkit is present and unix commands can be executed on that server.

From what I know, all 8.x DataStage server (PX) (even client) comes with MKS toolkit and they did not even scaled it down till 9.1, where it relies mainly on native calls instead of MKS toolkit but MKS Toolkit is still there.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

Post by suja.somu »

Thanks everyone for your help.

I am able to run the unix command, so it means MKS toolkit is installed.

I close this post, marking as resolved.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)
-craig

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