From: Chris Olive [nospam@raytheon.com] Sent: Thursday, March 06, 2003 10:09 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: RMS version number Larry Kilgallen wrote: > In article , "John" writes: > >>Can anybody tell me how to get the version number of a newly created file? > > > Terse questions lead us to make assumptions. You could post again with > clarification. > > I presume you would not have asked if looking for the latest version of > the file would work... > > ...so you must be in a situation where multiple versions of the same file > are being created, and you want the version created by _your_ process. > > So on the VMS V7.3 (most recent version for your VAX) documentation CDROM > that came with your copy of the operating system > > file:///VMSDOC073/v73/4523/4523pro_021.html#creat_nam_in_fields > > is a table indicating that NAM$B_RSL is updated and the buffer specified > by NAM$L_RSA is updated after your call to $CREATE. That string will > contain the full file specification of the file you just created. Use > the $FILESCAN system service described at > > file:///VMSDOC073/v73/4527/4527pro_040.html#jun_250 > > to extract the version number. Or assuming some FAB context is available (either because you've already got a FAB context/pointer from working code, or you get a FAB context from say LIB$FIND_FILE for instance), then chain to the NAM from the FAB and use NAM$B_VER and NAM$L_VER to get the version number (string) from the ESA. Somehow, I have a feeling this question springs from something deeper than command line access for which the answer is a bit more obvious (and has already been offered.) Maybe a continuation of a question concerning COPYing from a program in the last day or two... or not. Chris ----- Chris Olive Systems Consultant Raytheon Technical Services Corporation Indianapolis, IN email: olivec(AT)indy(DOT)raytheon(DOT)com