EXECSH command for file in

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
faujong
Participant
Posts: 11
Joined: Fri Aug 17, 2018 9:03 am

EXECSH command for file in

Post by faujong »

How can I use the following EXECSH command in After-job subroutine ?

Code: Select all

for file in /dev/DataStage/myProject/source/TEST/MyFile_*.csv; do echo "Testing" done
The above code gives an error "sh: -c: line 1: syntax error: unexpected end of file"

Thank you
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I would highly suggest you do all of your testing directly from the server's command line and get something working there on a single line. Once it's working, stick it in your ExecSH.
-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 »

Perhaps another semi colon between the echo command and the done loop terminator?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
faujong
Participant
Posts: 11
Joined: Fri Aug 17, 2018 9:03 am

Post by faujong »

Yes, that's it. Thank you Ray!!
Post Reply