Question about file errors and DECLARATIVES

Using Extend 8.0 on Windows OS; most of our apps are thin-client, but we have one which writes to server files across the network.  We use a DECLARATIVES section to handle file errors, and part of the DECLARATIVES writes all file errors to a file on the server.

If intermittent network errors result in a file error 35 when opening the ERRORLOG file, then we open the file for output.

We have a particular desire to open the file for EXTEND instead; however, because this OPEN EXTEND is done INSIDE the DECLARATIVES paragraph, if the file still cannot be opened (it is not declared as OPTIONAL), then it results in a file error, and that causes the program to exit (presumably because DECLARATIVES cannot be performed iteratively).

Is there any way around this?

Thanks

Tony

  • You can set the configuration variable "EXTEND_CREATES" to 1 (or on/true/yes).  This should cause the file to be created if it doesn't exist - i.e. the same behavior as if it were opened output.

  • Thanks, Chuck - unfortunately, we don't want to create the file for output; what we want to do is try to open it EXTEND; if that doesn't work, pause and try OPEN EXTEND again - repeating this up to 5 times.  That would give time for an intermittent network problem to resolve itself, and that way we don't lose the contents of the file (as we do if we create it).  This is kind of an oddball situation where we're trying to help the customer resolve the network issues while not losing data at the same time.