Hello everyone.
I'm running a routine in a SQR program to delete a file after it processes it. In SQRW works perfectly, but when I run the program through the System Process Request even though I have a successful return on the <call system using> command, the file is not deleted.
I have used the following commands:
1st try
let MyFile= d:\path_to_file\outputfile.txt
...program lines
let #MyResult= delete($MyFile)
2nd try
...
let $command= getenv('COMSPEC')||' /c del /q '||$MyFile
call system using $command #MyResult
3rd try
let $PS_PATH= 'd:\path_to_file\'
...
let $command= getenv($PS_PATH)||' /c del /q outputfile.txt'
call system using $command #MyResult
4th try
...
let $command= getenv($PS_PATH)||MyBatFile.bat
call system using $command #MyResult
where MyBatFile.bat:
cmd.exe /c del /q outputfile.txt
The .bat file is located where the file to be deleted is
created.
-------------- ----------------------
I believe I'm working in Windows environment. Would it be different if it is Unix?
Any suggestions will be greatly appreciated.
Thanks.
I'm running a routine in a SQR program to delete a file after it processes it. In SQRW works perfectly, but when I run the program through the System Process Request even though I have a successful return on the <call system using> command, the file is not deleted.
I have used the following commands:
1st try
let MyFile= d:\path_to_file\outputfile.txt
...program lines
let #MyResult= delete($MyFile)
2nd try
...
let $command= getenv('COMSPEC')||' /c del /q '||$MyFile
call system using $command #MyResult
3rd try
let $PS_PATH= 'd:\path_to_file\'
...
let $command= getenv($PS_PATH)||' /c del /q outputfile.txt'
call system using $command #MyResult
4th try
...
let $command= getenv($PS_PATH)||MyBatFile.bat
call system using $command #MyResult
where MyBatFile.bat:
cmd.exe /c del /q outputfile.txt
The .bat file is located where the file to be deleted is
created.
-------------- ----------------------
I believe I'm working in Windows environment. Would it be different if it is Unix?
Any suggestions will be greatly appreciated.
Thanks.