| Author |
reading variable block file
|
Amar Naik
Ranch Hand
Joined: Sep 26, 2003
Posts: 43
|
|
Hi, I have a variable block file which was transmitted from mainframe side. When i browse the variable block file in mainframe i can see it as !Line 1 !Line 2 !Line 3 but once we transmit the file in Unix box, the file contents appear as !Line1!Line2!Line3 does java differentiate between variable block and fixed block files.. does java has separate API to read Variable block file
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
|
I don't have the mainframe experience to know what a "variable block file" is, but if it's a random-access file with fixed-size records, then the class java.io.RandomAccessFile is what you want. If, on the other hand, those "!" marks divide lines or records, then you're just going to have to read the raw data and break the file into records by looking for "!" characters yourself.
|
[Jess in Action][AskingGoodQuestions]
|
 |
bart zagers
Ranch Hand
Joined: Feb 05, 2003
Posts: 234
|
|
|
What does the mainframe use as line separator (carriage return, linefeed) and make sure it is the same as you expect (just linefeed I guess).
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2350
|
|
Originally posted by Amar Naik: Hi, but once we transmit the file in Unix box, the file contents appear as !Line1!Line2!Line3
Do you ftp the files from mainframe to unix? Regards, Jan
|
OCUP UML fundamental
ITIL foundation
|
 |
 |
|
|
subject: reading variable block file
|
|
|