Command activity checking for a file pattern
Posted: Mon Jun 10, 2013 7:17 am
Datastage PX version 8.5 on windows(MKS installed):
I have the same scenario to implement as noted here.
Step2 in the previous post: "2. Exec command activity checking for a file pattern using a if condition. If file found print 'Found' else sleep for some seconds. "
I tried the below commands in the execute command stage. I am getting error. can anyone help me to debug this ?
[-f "Client_Export_Out_"* ]&& ECHO "file exists"||SLEEP 60
(or)
IF [-f "Client_Export_Out_"* ]; THEN ECHO "file exists" ELSE SLEEP 60
error from log:
..JobControl (@Execute_Command_0): Executed: [ -f "Client_Export_Out_"* ]&& ECHO "file exists"||SLEEP 60
Reply=0
Output from command ====>
'[' is not recognized as an internal or external command,
operable program or batch file.
I have the same scenario to implement as noted here.
Step2 in the previous post: "2. Exec command activity checking for a file pattern using a if condition. If file found print 'Found' else sleep for some seconds. "
I tried the below commands in the execute command stage. I am getting error. can anyone help me to debug this ?
[-f "Client_Export_Out_"* ]&& ECHO "file exists"||SLEEP 60
(or)
IF [-f "Client_Export_Out_"* ]; THEN ECHO "file exists" ELSE SLEEP 60
error from log:
..JobControl (@Execute_Command_0): Executed: [ -f "Client_Export_Out_"* ]&& ECHO "file exists"||SLEEP 60
Reply=0
Output from command ====>
'[' is not recognized as an internal or external command,
operable program or batch file.