[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Digital Fortran |
Notice: | Read notes 1.* for important information |
Moderator: | QUARK::LIONEL |
|
Created: | Thu Jun 01 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1333 |
Total number of notes: | 6734 |
1176.0. "collating sequences : FOR-F-INVMATKEY" by MUNICH::WWERNER (When in doubt, do as the INTs do) Fri Feb 14 1997 10:11
Once there was a problem with collating sequences and keyge/keygt on VAX
(see FORTRAN-VAX 1870). Still a problem on Alpha ? The workaround is the
same as 1992, btw. ;-)
Versions used: OpenVMS Alpha 6.2, DEC Digital Fortran 77 V7.1-107
Wolfgang
$ TYPE R.FOR
c this is the 'reader'
character*2 mykey
character*2 buf
open (unit=10,file='test1.dat',accesS='keyed',
1 form='unformatted',organization='indexed',status='old',
2 key=(1:2:character:ascending),
3 recordtype='fixed', recl=2)
mykey='A1'
c this works
c read (10,keyid=0,keynxt=mykey) buf
c this gives a FOR-F-INVMATKEY
read (10,keyid=0,keyge=mykey) buf
type *,buf
close (10)
end
$ TYPE W.FOR
c indexed file is written like this
open (unit=10,file='test.dat',accesS='keyed',
1 form='unformatted',organization='indexed',status='new',
2 key=(1:2:character),
3 recordtype='fixed', recl=2)
write (10) 'A1'
write (10) '�1'
write (10) 'O1'
write (10) '�1'
write (10) 'U1'
write (10) '�1'
close (10)
end
This is the FDL File
SYSTEM
SOURCE OpenVMS
FILE
ALLOCATION 9
BEST_TRY_CONTIGUOUS no
BUCKET_SIZE 2
CLUSTER_SIZE 3
CONTIGUOUS no
EXTENSION 0
FILE_MONITORING no
GLOBAL_BUFFER_COUNT 0
ORGANIZATION indexed
RECORD
BLOCK_SPAN yes
CARRIAGE_CONTROL none
FORMAT fixed
SIZE 8
AREA 0
ALLOCATION 9
BUCKET_SIZE 2
EXTENSION 0
KEY 0
CHANGES no
DATA_KEY_COMPRESSION no
COLLATING_SEQUENCE "GERMAN"
DATA_RECORD_COMPRESSION no
DATA_AREA 0
DATA_FILL 100
DUPLICATES no
INDEX_AREA 0
INDEX_COMPRESSION no
INDEX_FILL 100
LEVEL1_INDEX_AREA 0
NAME ""
NULL_KEY no
PROLOG 3
SEG0_LENGTH 2
SEG0_POSITION 0
TYPE collated
ANALYSIS_OF_AREA 0
RECLAIMED_SPACE 0
ANALYSIS_OF_KEY 0
DATA_FILL 11
DATA_KEY_COMPRESSION 0
DATA_RECORD_COMPRESSION 0
DATA_RECORD_COUNT 6
DATA_SPACE_OCCUPIED 2
DEPTH 1
INDEX_COMPRESSION 0
INDEX_FILL 2
INDEX_SPACE_OCCUPIED 2
LEVEL1_RECORD_COUNT 1
MEAN_DATA_LENGTH 8
MEAN_INDEX_LENGTH 4
T.R | Title | User | Personal Name | Date | Lines |
---|
1176.1 | | QUARK::LIONEL | Free advice is worth every cent | Fri Feb 14 1997 10:35 | 11 |
| Your test programs don't match your problem description. They write and read
different files and explicitly specify normal string key. Properly written,
they would use the same file and would open an 'OLD' file to write (and read)
the records without specifying a KEY= at all.
After all that, there is a bug in the RTL in that it has hardcoded key types
to determine ascending vs. descending and mis-interprets a COL type as
descending. Not that this is really a big deal - just use KEYNXT - but it
should be fixed nonetheless. We'll add it to the list. Thanks.
Steve
|
1176.2 | Sorry... | MUNICH::WWERNER | When in doubt, do as the INTs do | Fri Feb 14 1997 10:46 | 4 |
| I've forgotten to add the 'CONV/FDL=TEST.FDL TEST.DAT TEST1.DAT' to 0.
Wolfgang
|
1176.3 | | QUARK::LIONEL | Free advice is worth every cent | Fri Feb 14 1997 11:44 | 3 |
| Ah. Well, you also need to take the KEY= out from the OPEN in R.FOR.
Steve
|