Page 1 of 1

Help with DSExecute in routine

Posted: Sun Dec 03, 2017 3:23 pm
by India2000
HI,

Need your help in resolving the below error from the routine:
where File is the value extracted inside the routine for file path and file name.




I'm using the command as :

Command= "wc -l " : File
Call DSLogInfo(Command,DSJobName)
Call DSExecute( "UNIX",Command, Output, SystemReturnCode)


output from the routine

Message to be logged is...

> wc -l /filepath/filename.txt

>
DSLogInfo called from : 0
Message to be logged is...
> Unmatched quotation marks.
> Verb """ is not in your VOC.

Thanks,

Posted: Sun Dec 03, 2017 5:26 pm
by chulett
Okay... there's no need to jump on the end of an eight year old post, even if it does have the same error message in it. I split this out to your own post so you have control over the fate of your particular version of the issue.

:? I'm not sure what "message to be logged" means here, that makes it sound like what you want it to say rather than what it actually says. Why not post your complete routine rather than snippets? I'd also like to see posted the complete / unedited message that DSLogInfo wrote to the log. I don't like guessing and I think it's the only way we're going to be able to help track down your unmatched quotes error.

Posted: Sun Dec 03, 2017 11:06 pm
by India2000
Here's the code.Files.txt contains complete file path.

Code: Select all

FILEPATH/FILENAME

$INCLUDE DSINCLUDE JOBCONTROL.H 




Call DSExecute( "UNIX",Command, Out, SystemReturnCode)

Call DSLogInfo(Out,DSJobName)

Command = "wc -l " : Out

Call DSLogInfo(Command,DSJobName)

Call DSExecute( "UNIX",Command, Out, SystemReturnCode)

Call DSLogInfo(Out,DSJobName)

Ans=0

Posted: Mon Dec 04, 2017 1:53 am
by ray.wurlod
Which call to DSLogInfo throws the message in the post at the beginning of this thread?

Posted: Mon Dec 04, 2017 7:49 am
by chulett
Apparently the second one. Still would like to see the full message that was logged by it.

Posted: Mon Dec 04, 2017 8:55 pm
by ray.wurlod
Try using "SH" rather than "UNIX" as the first argument to DSExecute.
Both should work, but neither should throw errors about VOC.