Operating System - OpenVMS
1751765 Members
4807 Online
108781 Solutions
New Discussion юеВ

Can we convert RMS indexed files to flat files?

 
sureshso
Occasional Contributor

Can we convert RMS indexed files to flat files?

We have requirement to convert RMS indexed files to normal files. we are planning to convert them using COBOL programs. is it possible to convert them using any COM utilitises (COMMAND PROCEDURE) or FDL?

4 REPLIES 4
Steven Schweda
Honored Contributor

Re: Can we convert RMS indexed files to flat files?

> We have requirement to convert RMS indexed files to normal
> files. [...]

   Define "normal".  What's not "normal" about an indexed file?
Portable?

> [...] is it possible to convert them using any COM
> utilitises (COMMAND PROCEDURE) or FDL?

      help convert [ file [ /fdl ] ]

Hein van den Heuvel
Honored Contributor

Re: Can we convert RMS indexed files to flat files?

Just about any record-orient program will 'convert' indexed files to flat files

1)  type/out=flat.dat indexed.dat

2) search/out=flat.dat indexed.dat "" [/form=xxx]

3) SORT...

The easiest/cleanest is

4)  CONVERT/STAT/FDL=NL:  indexed.dat flat.dat

You may still need a (Cobol or otherwise) program to convert  non-character fields like OpenVMS binary DATEs, Packed-Decimal numbers, Integer numbers, and so on.

You may want to use a professional tool like CONNX or Attunity CONNECT if you have many files, many fields to 'flatten'

Hein

(Attunity.com)

sureshso
Occasional Contributor

Re: Can we convert RMS indexed files to flat files?

Thanks Hein. we have RMS indexed files with COMP-2 (D-floating) and signed longwords in unreadable format data. we are trying achieve thru COBOL programs. we had issues in converting COMP-2 data to readable data and we have multiple keys (example: we have 3 keys and again each key has multiple columns). in COBOl program file declaration and FD defination, open and read i am facing issues.

Hein van den Heuvel
Honored Contributor

Re: Can we convert RMS indexed files to flat files?

There is no standard tool or utility provided with OpenVMS to interpret data in files by datatype.

You'll need to use a programming language or a commercial tool with record-layout and/or data dictionary support

If you have Cobol, just use it. Read 'native' source file; MOVE fields to DISPLAY type target file; using conversion options as needed; write target file.

End user tools like Datatrieve, Powerhouse, ., and such, with CDD support as needed and give you direct access.

Infrastructure tools like CONNX, CONNECT (from Attunity.com, where I work) and many others can give you ODBC  and JDBC access to directly pull the data.

I'm sure there are good Freeware tools as well.  DIX comes to mind.

SMOP!

 

Hein