From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,1670c267b7f4262d X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,1670c267b7f4262d X-Google-Attributes: gid1164f8,public X-Google-Thread: 1094ba,1670c267b7f4262d X-Google-Attributes: gid1094ba,public From: cornelius@eisner.decus.org (George Cornelius) Subject: Re: new to VMS need help with indexed files Date: 1998/12/26 Message-ID: <1998Dec26.184207.1@eisner>#1/1 X-Deja-AN: 426032327 X-Nntp-Posting-Host: eisner.decus.org References: <36843058.415BB923@cyberdude.com> X-Trace: news.decus.org 914715740 16630 CORNELIUS [192.67.173.2] Organization: DECUServe Newsgroups: comp.sys.dec,comp.os.vms,comp.lang.fortran In article <36843058.415BB923@cyberdude.com>, Dani Steinmetz writes: > If anyone has examples of indexed file processing that they can share, I > would greatly appreciate it. I'm coding in Fortran so that would be > best. I notice that on the 5.5-2 VMS system I am posting from there's a sample program in SYS$EXAMPLES that has some indexed operations in it - see listing below for some excerpts found with SEARCH. I notice that this program is no longer present as of Alpha VMS 7.1, though. -- George Cornelius cornelius@eisner.decus.org cornelius@mayo.edu ****************************** SYS$COMMON:[SYSHLP.EXAMPLES]RUFEXAMPLE.FOR;1 OPEN (UNIT=10, FILE= 'RUF$CHECKING.DAT', STATUS = 'OLD', 1 ORGANIZATION = 'INDEXED', ACCESS = 'KEYED') OPEN (UNIT=11, FILE= 'RUF$SAVINGS.DAT', STATUS = 'OLD', 1 ORGANIZATION = 'INDEXED', ACCESS = 'KEYED') * * Recovery unit to initialize savings and checking account files. * Note that any I/O errors in this recovery unit will be ignored. *************** READ (UNIT=10, IOSTAT=IOS, 1 KEYEQ = Checking_account.number,ERR = 9992) 2 Checking_account * * Subtract $10 from the checking account balance. *************** * REWRITE (UNIT=10, IOSTAT=IOS, ERR = 9993) Checking_account TYPE *, 'Pausing for 5 seconds' CALL LIB$WAIT (5) *************** READ (UNIT=11, IOSTAT=IOS, 1 KEYEQ = Savings_account.number,ERR = 9994) Savings_account * * Add $10 to the savings account. * *************** * REWRITE (UNIT=11, IOSTAT=IOS, ERR = 9995) Savings_account * * End the recovery unit. *