Following examples found online, I have been trying to get a script to run that contains a directory with spaces in the name. The script zips up the directory using 7-zip. From what I can tell, you should use ~" around args that contain special characters. I have the following:
DOZIP RUN TASK PNODE (PGM=Windows)
SYSOPTS="cmd(7z a ~"&ZipFile~" ~"&FilePath~")"
However, when submitting this process, I get "LAPP013I - Invalid usage in this statement : - ,error at line 2. CCODE=8 FDBK=0"
It seems setting the FilePath variable is causing errors. If I put the directory directly into that variable surrounded by quotes things work fine. But if I pass the variable into the process, I get the error.
I've tried a variety of ways to build the SYSOPTS statement, but I don' t think that's the issue. It seems to be with passing the variable in.
Is there anything I should be doing differently when passing in a value that contains spaces to a process?