Hi group, I don't know if it is relevant but wen Paragraph use a CLOSE x, SB+ run CALL SB.FILEVAR.S(FILES.OPENED<x>, 2, FILEVAR(x), ERR)
Into SB.FILEVAR.S(FNAME, MODE, F.VAR, ERR), we found : * ------------------- found with VLIST DM SB.FILEVAR.S ------------- INCLUDE DMSKELCODE COMMON COMMON /SBFILES/ SBF.NAMES,SBF.PTR,SBF.DELLIST,SBF.HANDLES(750) ... if mode = 2 then CLOSE F.VAR ** look on the primary file cache LOCATE(FNAME,FILES.OPENED ; RG) THEN FILES.OPENED<RG> = '' FILEVAR(RG) = 0 END ** look on the secondary file cache LEN.FNAME = LEN(FNAME) LOCATE(FNAME, SBF.NAMES, 1, LEN.FNAME; RG) THEN POSFILE = SBF.NAMES<2, LEN.FNAME, RG> SBF.HANDLES(POSFILE) = 0 SBF.DELLIST<(-1)> = POSFILE ;** remember the available pos SBF.NAMES = DELETE(SBF.NAMES, 1, LEN.FNAME, RG) SBF.NAMES = DELETE(SBF.NAMES, 2, LEN.FNAME, RG) END end ... ---------------- There is no "CLOSE" basic statement executed; only a free(filevar) <<filevar=''>> Is it the problem for UV ?? My 2 pence. Manu > -----Message d'origine----- > De : u2-users-boun...@listserver.u2ug.org [mailto:u2-users- > boun...@listserver.u2ug.org] De la part de Kevin King > Envoyé : mercredi 3 novembre 2010 22:45 > À : u2-users@listserver.u2ug.org > Objet : [U2] UV 10.3.3/SB+ 6.0.3 > > 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 > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users