for creating the file
Output: ------------------------------------------------------- Warning there was no "cb2xml.properties" file, using the default Cobol columns of 6 to 72 -------------------------------------------------------
*** using start column = 6, end column = 72
Schemainfos:
schema.getFileStructure 1
schema.getFontName cp1141
schema.isBinary false
then i fill 61 lines and write them :
// this codepice is triggerd 61 times
if (record.getFieldCount()==row2.alles.getColumnCount() -1) {
// row2.alles is a dynamic structure with an additional linenumber in pos 0
for (int idx = 1, count = row2.alles.getColumnCount(); idx < count; ++idx) {
line.getFieldValue(record.getField(idx-1)).set(row2.alles.getColumnValue(idx));
}
System.out.println("|"+line.getFullLine()+"|");
writer.write(line);
} else {
throw new Exception("Spaltendefinition zwischen Tabelle und Copybook unterschiedlich");// diffrence in definitions detected
}
The system out println of getFullLine gives me 100% what i expect !
After closing the file
// end of the component, outside/closing the loop
writer.close();
i load the file with Recordeditor and the same Copybook, i find between the records: 0d25
What am i doing wrong ?
Regards
Dirk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again, sorry for posting in the wrong section, anyway, the library version i use is:
JRecord_Version_0.81.4
which includes:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_79-b15 (Oracle Corporation)
Main-Class: net.sf.cb2xml.Cb2Xml
Implementation-Version: 0.95.8
Built-Date: 2016-11-05 16:43:51
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good point, I will update JavaDoc to reference JRecordInterface1.
In the JRecord source directory there is JRecord_IO_Builder_Examples which holds examples of using JRecord.
Also in the RecordEditor, the Generate >>> Java JRecord Code for Cobol option will generate basic example JRecord code from a Cobol copybook (and optionally data file). See file:///F:/Work/JRecord/Versions/Version_0.81/Docs/RecordEditorGenerate.htm#HDRJRECGEN for details.
If you are editing a CSV file in the RecordEditor, you can use the Generate option to generate JRecord code to read / write the CSV file. I plan to add these options to ReCsvEditor as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Bruce,
first at all: thank you for the great work you are doing here!
I try to write a file with the following code(dont wonder about the fully qualified names, its nessecary in talend):
for creating the file
Output:
-------------------------------------------------------
Warning there was no "cb2xml.properties" file,
using the default Cobol columns of 6 to 72
-------------------------------------------------------
*** using start column = 6, end column = 72
Schemainfos:
schema.getFileStructure 1
schema.getFontName cp1141
schema.isBinary false
then i fill 61 lines and write them :
The system out println of getFullLine gives me 100% what i expect !
After closing the file
i load the file with Recordeditor and the same Copybook, i find between the records: 0d25
What am i doing wrong ?
Regards
Dirk
Hi again, sorry for posting in the wrong section, anyway, the library version i use is:
JRecord_Version_0.81.4
which includes:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_79-b15 (Oracle Corporation)
Main-Class: net.sf.cb2xml.Cb2Xml
Implementation-Version: 0.95.8
Built-Date: 2016-11-05 16:43:51
I found the error: i used a line writer:
should have done this:
a little confusing the start with only javadoc in hand, but really great work from your side :)
Last edit: Bruce Martin 2016-11-17
Good point, I will update JavaDoc to reference JRecordInterface1.
In the JRecord source directory there is JRecord_IO_Builder_Examples which holds examples of using JRecord.
Also in the RecordEditor, the Generate >>> Java JRecord Code for Cobol option will
generate
basicexample
JRecord code from a Cobol copybook (and optionally data file). See file:///F:/Work/JRecord/Versions/Version_0.81/Docs/RecordEditorGenerate.htm#HDRJRECGEN for details.If you are editing a CSV file in the RecordEditor, you can use the Generate option to generate JRecord code to read / write the CSV file. I plan to add these options to ReCsvEditor as well.