Warning in Sequence

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bbobpop1
Participant
Posts: 29
Joined: Sun Jul 20, 2008 9:55 am

Warning in Sequence

Post by bbobpop1 »

Hi

I need to suppress the warning from sequence. I am reading a file using grep command.

Warning is "
SEQ_NAME..JobControl (EXECUTE_COMMAND_NAME): Command grep -v '^#' did not finish OK, reply = '1'"

During testing our seq, this warning comes when the file is empty.

Is there any method / command which will help to supress this warning?

I searched in this forum, however I didn't find any related result.

I am not very happy with the Message Handler. So If other that Message_Handler will helpful for me.

Thanks
Bob
Thanks
bob
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't process empty files.

Code: Select all

if [ -z filename ] then
   exit 0
else
   grep ...
endif
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That return code of 1 from grep simply means 'No match found' and won't just happen when the file is empty.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That, too. What do you want to achieve?
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