HP OpenVMS Systemsask the wizard |
The Question is: When a BASIC application crashes, and has open sequential files being used for output, these files show up as having blocks allocated, but their file size is 0 (seen using DIR/SIZ=ALL). As far as VMS is concerned these files seem to have nothing in them. I am wondering if there is a way to "close" these files, so that the file content is accessable. The Answer is : The upcoming OpenVMS V7.3-2 release will flush the contents of the RMS caches upon application exit; will effectively invoke the RMS rundown processing. Regardless, the OpenVMS Wizard would encourage you to incorporate a signal handler in your application; a routine which closes out critical files. (This works on all releases.) The OpenVMS Wizard would also encourage you to open log files with sharing enabled, as discussed in the OpenVMS Frequently Asked Questions (FAQ). Additionally, a log server application can be a useful addition. As for relocating the End Of File mark to access data which has been written to a file when the EOF has not been updated (the literal answer to the question posed), you can use the DCL command: SET FILE/END_OF_FILE The data at the end of the file may or may not be valid, and you may or may not see all of the data you might expect -- again, the OpenVMS Wizard recommends an application-specific signal handler. Topics (2078), (7826) and (8119) are related, and please see (2868) for a performance-related discussion of log files. For details on debugging, please see (1661) and particularly (7552), and consider using the SS$_DEBUG dynamic invocation of the debugger and related; see topics (1017), (1314), (1661), (3031) and (4129). (The dynamic debugger invocation can provide you with the call stack and related details upon incidence of an application failure.)
|