I have a COBOL program which generates a sequential file with this structure:
FD ALUMNOS-FILE.
01 ALUMNOS-DATA.
88 EOF VALUE HIGH-VALUES.
05 STUDENTID PIC 9(7).
05 STUDENTNAME PIC X(10).
05 FILLER PIC X(8).
05 COURSECODE PIC X(4).
05 FOO PIC S9(7)V USAGE COMP-3.
If I open the file in Notepad++, I see strange unicode symbols which are difficult to read caused by the COMP-3
variable. Something similar to the image below (the image is from another file):
Is there any way without using COBOL to rewrite this sequential file to be readable? Maybe using a script language like VBS? Any tip or advice will be appreciated, and if you need more info let me know and I'll edit the post.
I would suggest having a look at the Last Cobol Questions
But the RecordEditor will let you view / edit Cobol Files using a Cobol Copybook. In the RecordEditor you can export the file as Csv, Xml if you want.
As mentioned in the Last Cobol Questions there are several solution for Reading Cobol files in Java and probably some in other languages.
To import the Cobol Copybook into the RecordEditor, Select: Record Layout >>> Import Cobol Copybook
The File-Structure controls how the file is read. Use a File-Structure of Fixed length Binary if all the records are of the same length (no carraige return).
Other Structures supported include
Note: From Record Editor 0.94.4, with a File-Structure of Fixed Length Binary you can edit Fixed Length Text files in a basic Text Editor if you want.
Note: I am the author of RecordEditor
For simple Cobol files these conversion utilities (based on JRecord) could be used:
The RecordEditor has a Generate option for generating Java / JRecord code. See [RecordEditor Code Generation notes][8]