Help with DSExecute in routine

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
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Help with DSExecute in routine

Post 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,
Last edited by India2000 on Mon Dec 04, 2017 6:20 pm, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post 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
Last edited by India2000 on Sun Dec 24, 2017 11:03 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Which call to DSLogInfo throws the message in the post at the beginning of this thread?
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 »

Apparently the second one. Still would like to see the full message that was logged by it.
-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 »

Try using "SH" rather than "UNIX" as the first argument to DSExecute.
Both should work, but neither should throw errors about VOC.
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