Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
TonyLeBlanc Super Contributor.
Super Contributor.
1086 views

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

0 Likes
2 Replies
Chuck Edgin Absent Member.
Absent Member.

RE: Question about file errors and DECLARATIVES

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.

0 Likes
TonyLeBlanc Super Contributor.
Super Contributor.

RE: Question about file errors and DECLARATIVES

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.