I have a copybook with multiple level 01 elements, and am trying to generate an XML doc from this using Cobol2Xml.newCobol2Xml. The setSplitCopybook function throws a "not yet implemented" exception, so I was wondering what sort of effort do you feel would be involved in doing this? I'd be happy to give it a shot myself if you can provide me with some high-level pointers.
Msgname 0001 P1110080021This is a description of the error
I had a quick look at this in a debugger, and the cause is obviously the pos field in FieldDetail starts at 0 when we come around to processing the DATA-OUTPUT data.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delay responding, I started to yesterday but got distracted before
I finished. I am getting snowed under with requests at the moment.
With regards to supporting multiple records, there are 2 changes required:
1) Splitting the copybook up into seperate records
2) Working out which record you have
With regards 1) you should be able to manage this for Split=01 and Split=Highest-Repeating,
As you want split=01, I will provide more information about this (tomorrow ???). Split=Redefine will be more difficult and I suggest leaving it for the moment
With regards 2) it looks like the Position in the file determines the record type
(i.e. the first record is the Header-Record. This is probably best done by me
Bruce
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At the moment, each different record appears a level 2 in the hierarchy. But does have parent Record field. This is not currently used in JRecord (in the RecordEditor it is) this would allow
files like
PO-Header-Record
Product-Record
Store-Record
Stroe-Record
i.e
Po
+--- Product
+--- Store
+--- Store
+--- Product
to be represented properly in Xml
Last edit: Bruce Martin 2015-10-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Bruce,
I have a copybook with multiple level 01 elements, and am trying to generate an XML doc from this using Cobol2Xml.newCobol2Xml. The setSplitCopybook function throws a "not yet implemented" exception, so I was wondering what sort of effort do you feel would be involved in doing this? I'd be happy to give it a shot myself if you can provide me with some high-level pointers.
E.g.
I had a quick look at this in a debugger, and the cause is obviously the pos field in FieldDetail starts at 0 when we come around to processing the DATA-OUTPUT data.
Thanks.
Sorry for the delay responding, I started to yesterday but got distracted before
I finished. I am getting snowed under with requests at the moment.
With regards to supporting multiple records, there are 2 changes required:
1) Splitting the copybook up into seperate records
2) Working out which record you have
With regards 1) you should be able to manage this for Split=01 and Split=Highest-Repeating,
As you want split=01, I will provide more information about this (tomorrow ???).
Split=Redefine will be more difficult and I suggest leaving it for the moment
With regards 2) it looks like the Position in the file determines the record type
(i.e. the first record is the Header-Record. This is probably best done by me
Bruce
Currentl
Basically the Copybook/Item are used to create the Xml structure and
the LayoutDetail is used to retrieve values via JRecord.
If you you Split=01, you will get:
in class Cobol2GroupXml, method cobol2xml , the following code needs to change
Last edit: Bruce Martin 2015-10-01
I have done most of it now; just testing + Change to support arrays in Xml2Data program to go
I have released a new version of JRecord:
where the cobol <==> xml programs support multi-rcord files. You must use
the program interface (to set Record-Selection-Criteria):
At the moment, each different record appears a level 2 in the hierarchy. But does have parent Record field. This is not currently used in JRecord (in the RecordEditor it is) this would allow
files like
to be represented properly in Xml
Last edit: Bruce Martin 2015-10-06
Bruce,
Awesome, thanks for this.