Article 129234 of comp.os.vms: Path: nntpd.lkg.dec.com!crl.dec.com!pa.dec.com!decuac.dec.com!haven.umd.edu!news.umbc.edu!cs.umd.edu!newsfeed.gsfc.nasa.gov!ames!hookup!usenet.eel.ufl.edu!news.mathworks.com!uunet!in2.uu.net!spcuna!wlbr!news.cerf.net!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms Subject: Re: /since qualifier with different commands Date: 14 Sep 1995 01:04:09 GMT Organization: HST Wide Field/Planetary Camera Lines: 173 Distribution: world Message-ID: <437v29$atc@gap.cco.caltech.edu> References: <436a16$1o4@rzsun02.rrz.uni-hamburg.de> <437ela$khp@gap.cco.caltech.edu>,<13SEP199517351015@eql.caltech.edu> Reply-To: carl@SOL1.GPS.CALTECH.EDU NNTP-Posting-Host: sol1.gps.caltech.edu In article <13SEP199517351015@eql.caltech.edu>, rankin@eql.caltech.edu (Pat Rankin) writes: =In article <437ela$khp@gap.cco.caltech.edu>,\ = shoppa@altair.krl.caltech.edu (Tim Shoppa) writes... =[...] => So I would make a wild-assed guess that DELETE checks things in this order: => (1). Could you delete the file if you wanted to? => (2). Does it meet the date selection criteria specified? => and it complains about (1) even if (2) isn't satisfied. I imagine => this could be important to you if the warning exit status from delete was => enough to screw up one of your command files. = = If you want a simpler theory: it has to access the file in order =to obtain the date values. It's not possible to make any date comparison =without first getting ahold of the relevant date info from the file header. =DIRECTORY knows how to circumvent locked file access and does so, which =makes sense since the consequences of it happening to get inconsistent =data are fairly benign. The following might be instructive (I knew SET WATCH had to be useful for something :-). At any rate, DELETE attempts an ACCESS of files matching the specification; DIRECTORY doesn't. My guess (I don't have access to the listings at the moment) is that DIRECTORY is calling the QIO/ACP interface directly, while DELETE is working through RMS and using SYS$OPEN to get the date information about the files in question. $ SET PROC/PRIV=CMEXEC $ SET WATCH FILE/CLASS=ALL $ SET PROC/PRIV=NOCMEXEC $ DIRECTORY/SINCE=TOMORROW TEST.DAT %XQP-I-FUNCTION, FIB contents: 00000000 0002010B 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 0002010B 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Read attributes: Record attributes CARL.DIR;1 (267,2,0) %XQP-I-FUNCTION, Read attributes: User file characteristics CARL.DIR;1 (267,2,0) %XQP-I-FUNCTION, Read attributes: File header CARL.DIR;1 (267,2,0) %XQP-I-FUNCTION, Access CARL.DIR;1 (267,2,0) Status: 00000001 %XQP-I-FUNCTION, FIB contents: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 0002010B 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Deaccess (267,2,0) Reads: 1, Writes: 0, Status: 00000001 %XQP-I-FUNCTION, FIB contents: 00000000 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Read attributes: Record attributes TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Creation date TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Revision date TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Expiration date TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Backup date TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Statistics block TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Owner UIC TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: File protection TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: User file characteristics TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: ASCII dates TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Journal flags TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: ACL length TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: RU active TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.DAT;5 (12572,1176,0) %XQP-I-FUNCTION, Lookup TEST.DAT;5 (12572,1176,0) Status: 00000001 %DIRECT-W-NOFILES, no files found $ DELETE/CONFIRM/SINCE=TOMORROW TEST.DAT; %XQP-I-FUNCTION, FIB contents: 00000000 00000000 010B0000 00000002 00000000 00000100 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 00000000 010B0000 00000002 00000000 00000100 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Read only directory access (267,2,0) %XQP-I-FUNCTION, Directory scan for: TEST.DAT;0, Status: 00000001 %XQP-I-FUNCTION, Lookup (12572,1176,0) Status: 00000001 %XQP-I-FUNCTION, FIB contents: 00000000 00000000 010B0000 00000002 00000000 00000100 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 00000000 010B0000 00000002 00000000 00000100 00000000 00000000 00000000 00000000 00000000 00030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Read only directory access (267,2,0) %XQP-I-FUNCTION, Directory scan for: TEST.DAT;0, Status: 00000001 %XQP-I-FUNCTION, Lookup (12572,1176,0) Status: 00000001 %XQP-I-FUNCTION, FIB contents: 00200001 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00200001 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Access TEST.DAT;5 (12572,1176,0) Status: 00000800 %XQP-I-FUNCTION, FIB contents: 00000001 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000001 0498311C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Access TEST.DAT;5 (12572,1176,0) Status: 00000800 %DELETE-W-FILNOTACC, file not accessible DISK$USERDISK:[CARL]TEST.DAT;5 -RMS-E-FLK, file currently locked by another user And when running the following program: #include rms #define ckstat(x) if (((stat = x) & 7) != 1) SYS$EXIT(stat) main() { struct FAB my_fab; unsigned long stat, SYS$OPEN(), SYS$CLOSE(); my_fab = cc$rms_fab; my_fab.fab$l_fna = "test.dat"; my_fab.fab$b_fns = strlen(my_fab.fab$l_fna); my_fab.fab$b_fac = 0; my_fab.fab$v_bio = 1; ckstat(SYS$OPEN(&my_fab)); ckstat(SYS$CLOSE(&my_fab)); printf("%s has %d blocks allocated.\n", my_fab.fab$l_fna, my_fab.fab$l_alq); } we see: $ r test %XQP-I-FUNCTION, FIB contents: FF010841 00000000 010B0000 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 00000000 00000000 00000001 %XQP-I-FUNCTION, FIB contents: FF010841 00000000 010B0000 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 00000001 00000000 00000001 %XQP-I-FUNCTION, Read only directory access (267,2,0) %XQP-I-FUNCTION, Directory scan for: TEST.EXE;0, Status: 00000001 %XQP-I-FUNCTION, Read attributes: Access mode TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: Access mode TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: Journal flags TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: RU active TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: Statistics block TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: Find ACE by type TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: Record attributes TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Read attributes: User file characteristics TEST.EXE;51 (17616,132,0) %XQP-I-FUNCTION, Access TEST.EXE;51 (17616,132,0) Status: 00000001 %XQP-I-FUNCTION, FIB contents: 00000001 00000000 010B0000 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000001 00000000 010B0000 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01030000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Read only directory access (267,2,0) %XQP-I-FUNCTION, Directory scan for: TEST.DAT;0, Status: 00000001 %XQP-I-FUNCTION, Access TEST.DAT;6 (14720,20,0) Status: 00000800 %RMS-E-FLK, file currently locked by another user %XQP-I-FUNCTION, FIB contents: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 %XQP-I-FUNCTION, FIB contents: 00000000 008444D0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000000 %XQP-I-FUNCTION, Deaccess (17616,132,0) Reads: 4, Writes: 0, Status: 00000001 -------------------------------------------------------------------------------- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My understanding of astronomy is purely at the amateur level (or below). So unless what I'm saying is directly related to VAX/VMS, don't hold me or my organization responsible for it. If it IS related to VAX/VMS, you can try to hold me responsible for it, but my organization had nothing to do with it.