Routine to zip a file
Posted: 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.
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.