Page 1 of 1

Execute Command

Posted: Tue Sep 09, 2008 2:17 am
by Magesh_bala
Hi, I need to create the file onces the sequence is completed successfully, So i was i trying to use the Execute command stage to create the file, But i am getting the following error is this because of the Permission.

Is there any alternate option to do it.


Test_Defect..JobControl (@Execute_Command_3): Executed: /opt/Ascential/Data/AIS_MIG_MAINT/MIGRATION/TEST touch 1200_Completed.txt
Reply=126
Output from command ====>
SH: /opt/Ascential/Data/AIS_MIG_MAINT/MIGRATION/TEST: 0403-006 Execute permission denied.

Posted: Tue Sep 09, 2008 2:25 am
by ray.wurlod
You might try a command such as source to execute the script. Or request that execute permission be granted. I take it that /opt/Ascential/Data/AIS_MIG_MAINT/MIGRATION/TEST is the script for which you lack execute permission?

Posted: Tue Sep 09, 2008 4:19 am
by bkumar103
why there is space in the file name(TEST touch 1200_Completed.txt ).
Is it a script? I got this doubt because the extension is .txt. To create a file in and directory you need the write permission in that directory and the execute permission on the script. Please make sure you have the both before running the script.

Posted: Tue Sep 09, 2008 4:40 am
by ray.wurlod
I suspect that the script picks up the remainder of the command line and executes it. To mind this is one unnecessarly level of abstraction, and the touch command itself may be executed directly. However, there may be in-house rules at that site, or the script may do something else first, such as switching to the appropriate directory before executing the command. Without seeing the script we'll never know.

Posted: Tue Sep 09, 2008 6:06 am
by Magesh_bala
Hi,

Its not an script, I need to touch the file in the TEST folder, So i try to execute it through the execute command stage in particulat folder.

Posted: Tue Sep 09, 2008 6:45 am
by ray.wurlod
Try a pipeline of commands then. What you're currently doing is trying to give the pathname of a directory as a command, so it's no wonder you're not allowed to execute. No-one can execute a directory. It's simply not permitted (as well as being meaningless).

Try this pair of commands. The && operator only executes the second command if the first succeeds.

Code: Select all

cd /opt/Ascential/Data/AIS_MIG_MAINT/MIGRATION/TEST && touch 1200_Completed.txt 

Posted: Tue Sep 09, 2008 7:38 am
by chulett
You forgot the 'cd'. And the command separator.

Posted: Tue Sep 09, 2008 7:59 am
by dsusr
try using the below command:

touch /opt/Ascential/Data/AIS_MIG_MAINT/MIGRATION/TEST/1200_Completed.txt

but for this you should have the write permission on this directory