A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett , rschirm , roy
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Tue Apr 07, 2009 11:38 am
Hi,
I am writing a routine to check the format of the file. If it is a file with .txt extension I need to zip it. I am using following lines to zip my file. But it is giving error message 'UnMatched Quotation Marks'
ucom1 = 'zip /chcprov/tempdir/Eload.zip '
ucom1 = ucom1:'/chcprov/tempdir/':inrec
CALL DSExecute('UNIX',ucom1,fil1,SYSRET)
where inrec contains the file name having *.txt extn. If I hardcode the file name in above statements it is working fine.
Luciana
Participant
Posts: 60 Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil
Post
by Luciana » Tue Apr 07, 2009 11:54 am
Code: Select all
ucom1 = 'zip /chcprov/tempdir/Eload.zip '
ucom1 = ucom1:'/chcprov/tempdir/':inrec
* CALL DSExecute('UNIX',ucom1,fil1,SYSRET)
Ans = ucom1
Include "*" before the line Call DSExecute ... and print the ucom1 variable. Check if the command is right.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Apr 07, 2009 12:10 pm
You get this error when - compile time, run time, what? Also, is "fil1" a local variable you've built as well?
-craig
"You can never have too many knives" -- Logan Nine Fingers
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Tue Apr 07, 2009 12:21 pm
I have checked the value of ucom1. It is looking fine.
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Tue Apr 07, 2009 12:22 pm
I got this error while executing the routine.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Apr 07, 2009 3:03 pm
Post the unedited log message (copy/paste) that shows the 'executed command'. And answer the question about 'fil1'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Wed Apr 08, 2009 7:57 am
Value of ucom1= zip /xyz/abc/Eload.zip /xyz/abc/FILE1.txt
Error Message from routine :
Result = Unmatched quotation marks.
Verb """ is not in your VOC.
fil1 is a local variable defined in routine