Let's see if someone can help me. I want to create an empty indexed file that contains an integer key with the name LINE and a text string with up to 1024 bytes. I figure I'm going to have to use the CREATE command with the /FDL qualifier, but cannot figure out how to do this. I then want to be able to use the WRITE command to right a record to this indexed file. How do you specify the INDEX or KEY to the write command? Fortunately, I'm going to be writing records that start with a key of 1, then 2, then 3, and so forth and so on. I will then close this file and then use read/key (or read/index, which ever is the correct one) to read the line I need from this index file. I may read 100 records and then want to go back and read starting from the 10th record, and possibly skipping around the file. I want to do this in DCL. Any help would be appreciated.
~Jon.
Author
RE: How can I create and write to an indexed file and then read from it in DCL?
The way I do it is to start with an FDL file that has multiple and different key types.
$ analyze/rms_file/fdl sys$system:sysuaf.dat
$ search sysuaf.fdl /out=test.fdl /match=nor IDENT,SYSUAF,OWNER,PROTECTION
$ delete sysuaf.fdl;
$! OK, now we have TEST.FDL that we can play with and not clobber SYSUAF.DAT
Modify TEST.FDL to say:
SIZE 1028
NAME "LINE"
SEG0_POSITION 0
SEG0_LENGTH 4
TYPE bin4
delete everything from "KEY 1" on down and save the file
$ create/fdl=test.fdl test.isam
$ key[0,32] = 0
$ text=f$fao("!512*-"
$ open/read/write/share file test.isam
$ read/key=&key/index=0 file record
%RMS-E-RNF, record not found
$ write/symbol file key,text1,text1
$ read/key=&key/index=0 file record
$ write sys$output f$length(record)
%DCL-W-BUFOVF, command buffer overflow - shorten expression or command line
$! DCL symbol record can't be longer than 1004 bytes with OpenVMS Alpha 8.4-2h2
$! Use a bonified programming language for longer than 1004 byte records
If SIZE was 1004 in TEST.FDL
I didn't modify it. I just wrote shorter records
$ text=f$fao("!510*+"
$ read/index=0/key=&key file record
$ write/update/symbol key,text,text
$ read/index=0/key=&key/nolock file record
$ show sym record
RECORD = "....+++++++++++++++" etc,..
Author
RE: How can I create and write to an indexed file and then read from it in DCL?
malmberg August 04 2022 No more VAX hobbyist licenses.
Community licenses for Alpha/IA64/X86_64 VMS Software Inc.
Commercial VMS software licenses for VAX available from HPE.
ozboomer July 20 2022 Just re-visiting.. No more hobbyist licenses? Is that from vmssoftware.com, no 'community' licenses?
valdirfranco July 01 2022 No more hobbyist license...sad
mister_wavey February 12 2022 I recall that the disks failed on the public access VMS systems that included Fafner
parwezw January 03 2022 Anyone know what happened to FAFNER.DYNDS.ORG?
I had a hobbyist account here but can longer access the site.
gtackett October 27 2021 Make that DECdfs _2.1A_ for Vax
gtackett October 27 2021 I'm looking for DECdfs V2.4A kit for VAX.
Asking here just in case anyone is still listening.
MarkRLV September 17 2021 At one time, didn't this web site have a job board? I would love to use my legacy skills one last time in my career.
malmberg January 18 2021 New Hobbyist PAKs for VAX/VMS are no longer available according to reports. Only commercial licenses are reported to be for sale from HPE
dfilip January 16 2021 Can someone please point me to hobbyist license pak? I'm looking for VAX/VMS 7.1, DECnet Phase IV, and UCX/TCPIP ... have the 7.1 media, need the license paks ... thanks!