Passing Argument - Wrapper Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
asyed
Participant
Posts: 16
Joined: Sun Dec 12, 2010 10:24 pm
Location: Hyderabad, India

Passing Argument - Wrapper Stage

Post by asyed »

Hi,

I want to run an awk command from Wrapper stage. Something like

Code: Select all

awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName#
I have selected "Value Only" as Conversion in the properties while creating the wrapper stage. I have also tried with Conversion as "None"

However I am getting syntax error when I run the Job, calling this wrapper stage.
Wrapper printed bad property list: Expected "," or "}", got: "~", line 5, stdout text: {
wrapped,
kind = parallel,
usage = "testawk.op AwkScript InputFile OutputFileName"
command = "awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName# test.awk /home/user1/test.txt /home/user2/test_o.txt
status = {good = 0}
}
I have verified whether the value of the variables (#AwkScript#, #InputFile#, #OutputFileName#[/) are getting properly passed.

Looking at the error I tried to remove variables [ #AwkScript#, #InputFile# ,#OutputFileName# ] from command tab, so that it takes values so that proper command gets executed i.e.

Code: Select all

awk -v x="~" -f test.awk /home/user1/test.txt  > /home/user2/test_o.txt

but this time I get an error
Expected IO redirection, pipe, semicolon, or end, got : "["
What is the mistake that I am doing while sending arguments to Wrapper Stage?
asyed
Participant
Posts: 16
Joined: Sun Dec 12, 2010 10:24 pm
Location: Hyderabad, India

Post by asyed »

Sorry for the confusion - bottomline is that I am unable to pass arguments to Wrapper Stage in desired format i.e.

Code: Select all

awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName#
Post Reply