Skip to main content

Our programs were converted over from Wang Cobol 10 years ago @ Unicon. So Far so good until now. I am testing version 10.3.0 and have errors opening a file for output if that file already exists. Are there any routines or ??? available for handling a file that already exists? I would like the option to either scratch it or rename it if possible.

Our programs were converted over from Wang Cobol 10 years ago @ Unicon. So Far so good until now. I am testing version 10.3.0 and have errors opening a file for output if that file already exists. Are there any routines or ??? available for handling a file that already exists? I would like the option to either scratch it or rename it if possible.

You should be able to use the Declaratives to capture when file errors occur, then  write a routine to try opening the file INPUT first and if that succeeds then either rename it or scratch it depending on what is your preference


You should be able to use the Declaratives to capture when file errors occur, then  write a routine to try opening the file INPUT first and if that succeeds then either rename it or scratch it depending on what is your preference

ok I will give that a try,