-2

I have an ab initio file with .dat extension i can open this file on unix using the command m_dump DML_of_file file name

The file comes in the format of record 1 ,record 2 etc etc

i want to read this file in java is their a way to read this file from java

Ansh
  • 1
  • 1
  • possible duplicate of http://stackoverflow.com/questions/34258810/how-do-i-read-in-a-line-from-a-dat-file-in-java-that-then-needs-to-be-separated – bigbounty May 08 '17 at 11:04

2 Answers2

1

This would depend entirely on the record format (DML) of the file in question, which I would assume has been defined in your Ab Initio application. I've done a similar thing in Python rather than Java and it's a matter of understanding the Ab Initio types and translating them to types in your target language.

Andy White
  • 408
  • 4
  • 6
1

.DAT is just an extension. Within the file, the structure can be anything(ASCII or EBCIIDIC or any native form) typically defined within the file DML. And the way you have described the structure, it looks like comma separated ASCII. There are numerous ways to read the file in java. Follow the below link:

How to read comma separated values from text file in JAVA?

sam.ban
  • 238
  • 3
  • 13