Openvms: Extracting RMS Indexed file t to Windows as a sequential flat file

192 views Asked by At

I haven't used openvms for 20+ years. It was my 1st OS. I've been asked if it possible to copy the data from RMS files from openvms server to windows as a text file - so that it's readable.

No-one has experience or knowledge of the record structures etc.

The files are xyz.DAT and are relative files. I'm hoping the dat files are fixed length.

My 1st attempt would be to try and use Datatrieve (DTR) but get an error that the image isn't loaded.

Thought it might be as easy using CONVERT/FDL = nnnn.FDL - by changing the Relative to Sequential. The file seems still to be unreadable.

Is there an easy way to stream an RMS index file to a flat ASCII file?

I use to use COBOL and C to access the data in the past but had lots of libraries to help....

I've notice some solution may use odbc to connect but not sure what I can or cannot install on the server.

I can FTP using Filezilla to the server....

Another plan writing C application to read a file and output out as string.....or DCL too.....doesn't have to be quick...

Any ideas

Has mentioned before

1

There are 1 answers

0
Hein On

The simple solution MIGHT be to to just use: $ TYPE/OUT=test.TXT test.DAT. This will handle Relatie and Indexed files alike. It is much the same as $ CONVERT / FDL=NL: test.DAT test.TXT Both will just read records from the source and transfer the bytes, byte for byte, to the records in a sequential file. FTP in ASCII mode will transfer that nicely to windows.

You can also use an 'inline' FDL file to generate a 'unix' LF file like: $ conv /fdl="record; format stream_lf" test.DAT test.TXT Or CR-LF file using: $ conv /fdl="record; format stream" test.DAT test.TXT

Both can be transferring in Binary or Ascii with FTP.

MOSTLY - because this really only works well for TEXT ONLY source .DAT file. There should be no CR, LF, FF or NUL characters in the source or things will break. As 'habo' points out, use DUMP /RECORD=COUNT=3 to see how 'readable' the source data is.

If you spot 'binary' data using DUMP then you will need to find a record defintion somewhere which maps byte to Integers or Floating points or Dates as needed. These defintions can be COBOL LIB files, or BASIC MAPS and are often stores IN the CDD (Common Data Dictionary) or indeed in DATATRIEVE .DIC DICTIONARIES

To use such definition you likely need a program to just read following the 'map' and write/print as text. Normally that's not too hard - notably not when you can find an example program on the server to tweak. If it is just one or two 'suspect' byte ranges, then you can create a DCL loop to read and write and use F$EXTRACT to select the chunks you like.

If you want further help, kindly describe in words what kind of data is expected and perhaps provide the output from DUMP for 3 or 5 rows.

Good luck! Hein.