home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!gatech!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: How to merge two sysuaf.dat files??
- Date: 22 Dec 1992 05:53:38 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 37
- Distribution: world
- Message-ID: <1h6ah2INN9ks@gap.caltech.edu>
- References: <01GSKVJUMIOI9I4IMI@HCACAD.HOLYCROSS.EDU>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <01GSKVJUMIOI9I4IMI@HCACAD.HOLYCROSS.EDU>, JBP@HCACAD.HOLYCROSS.EDU (Father Pomeroy) writes:
- >
- > As usual, I believe I saw this but did not keep it.
- > We have two SYSUAF.DAT files (which we shouldn't, I know), which I now wish
- >to merge into one. the problem is that some of the same entries exist in
- >both, but with variations. VMS SORT will eliminate dups but there is no
- >way to determine which of the two to keep ( we will always wish to keep the
- >entry from the shorter file).
- > The only thing I can think of is to write a program which will read the
- >shorter file and WRITE into the longer file, checking first for the existence
- >of the same key, in which case re-write from the new record. I feel very
- >insecure about this, since it IS the UAF with which I am playing (I would,
- >of course, do it in a work area first, but still??).
- > Suggestions appreciated.
-
- You've got the right idea. If the two SYSUAFs are from the same version of
- VMS, your idea will work with no problems. DEC has changed the format of
- SYSUAF a few times, and if the SYSUAFs are from versions between which DEC made
- changes, it won't work. Assuming you're not in that unenviable position:
- $ OPEN/READ INPFILE short_sysuaf
- $ OPEN/READ/WRITE OUTFILE long_syauaf
- $ SET NOON
- $ LOOP: READ/END=DONE INPFILE REC
- $ WRITE/SYMBOL OUTFILE REC
- $ GOTO LOOP
- $ DONE: CLOSE INPFILE
- $ CLOSE OUTFILE
- will do what you want. You will, of course, want to check the log file to see
- which records conflicted.
- --------------------------------------------------------------------------------
- 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.
-