On earlier versions of SB+ - running on Unidata - we have created a couple of processes that can be used to create and delete a temporary work file for use by whatever logic falls between the CREATE.WORK.FILE and DELETE.WORK.FILE processes. In trying to port these to SB/XA on UV we're running into a situation where Universe won't delete the data portion of the work file.
Basically these process are wrappers for the CREATE.FILE and DELETE.FILE TCL verbs. Each process builds a variable with the appropriate command and then calls a subroutine to silently EXECUTE the command and return the results. If I run the two back to back from TCL the file is created and deleted without incident. If, however, something is written into the work file between these two commands - as might be done from a program or paragraph - the DELETE.WORK.FILE process (calling the DELETE.FILE TCL verb) will remove the dictionary of the file, but not the data nor the VOC pointer. The error returned from the DELETE.FILE command (executed by this process) is "Unable to delete file "WRK.xxxx" where the xxxx's are the current port #. Before the file is deleted, both the dictionary and data portions are closed using the CLOSE statement in an SB+ paragraph. Even more interesting is that after the process is complete and has returned to its caller, the DELETE.WORK.FILE process works without incident. It's almost like SB+ is holding an open file buffer after the file has been closed or somehow the DELETE.FILE is running at a different execution level than the CREATE.FILE that originally made the file. So to factor SB+ out of the mix I created a real simple test program: 001: EXECUTE 'CREATE.FILE WRK.3604 1 1' 002: OPEN 'WRK.3604' TO F.WRK THEN 003: WRITE '' ON F.WRK,'X' 004: CLOSE F.WRK 005: END 006: EXECUTE 'DELETE.FILE WRK.3604' CAPTURING OUTPUT 007: CRT OUTPUT This program reliably creates and deletes the file each time, yet it is almost identical to what we're trying to do from the SB+ paragraph. So here's my question: Is UV sensitive about execution levels when deleting a work file? What might make Universe think the file is open when we've attempted to close it using the CLOSE statement in an SB+ paragraph (other than the obvious possibility that CLOSE might be broken)? -Kevin http://www.PrecisOnline.com _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
