From: martin@radiogaga.harz.de Sent: Wednesday, September 26, 2001 11:00 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: Announcing ht://Dig 3.1.5 for OpenVMS Pat Rankin (rankin@eql14.caltech.edu) wrote: > In article <9os15r$epg1o$1@ID-56200.news.dfncis.de>,\ > "Martin Vorlaender" writes... > > P.S.: Is there a way to set the LRL attribute *after* writing (i.e. > > just before closing) the file? > > If you write the file in record mode instead of using > stream mode then RMS will do that automatically. Problem is, I'll have to find all subsequent fopen()s then and modify them accordingly. But that's probably what I'll do anyway. > > A file gets created by one program > > (Stream_LF, LRL 32767), and then SOR$ted by another program - > > which devours time and disk space. As a workaround, I inserted > > a call to CONVERT which renders the file as (LRL less than 100) > > which helps the SOR$t (much). > > I don't know how to change the attributes when C or > C++ still has the file open, but if you get the routine > LYVMS_FixedLengthRecords() out of the lynx sources, you'll > find something which does the type of operation you want > after closing the file. [...] Which, of course, is as good. Thanks for the hint. I'll have a look. > I'm sure there are > umpteen other examples of using the XQP interface to set > file attributes. That's the primary reason why I was asking. I'm not (yet) very comfortable with handling files at the XQP level. > Now that I think about it, the RMS > routine SYS$MODIFY() might be able to handle this simple > task too. Errr, beg your pardon? There's no such routine in my copy of the RMS Services Reference?! > If you're processing the data with multiple programs, > why not just stick a SET FILE /ATTRIBUTE=LRL=xxx command > in between them? That's effectively what the code above > would be doing anyway, but with SET FILE you won't need > to do any extra coding.... I'd have to code it as a system() call then, because after the end of the first program, I don't have the correct LRL any more. But that's effectively what I do now, with a call to CONVERT (plain simple, without an /FDL). Thanks, Martin -- | Martin Vorlaender | VMS & WNT programmer OpenVMS: When you | work: mv@pdv-systeme.de KNOW where you want | http://www.pdv-systeme.de/users/martinv/ to go today. | home: martin@radiogaga.harz.de