support for cobol occurs with length field
Read Cobol data files in Java
Status: Beta
Brought to you by:
bruce_a_martin
hello,
if a host exports data with a cobol copybook, not all columns are filled and the counter is set. Each record can have its own length. The maximum occuring columns is well defined with occurs nn.
JRecord only will read those data as a stream and fills all columns of a record with this data ignoring the length field.
So the next record will be appended when the first one doesn't fill out the complete structure.
Regards and thanx so far
Frank
Anonymous
Adding support for Occurs Depending needs to be added to JRecord/cb2xml.
Not sure when I will be able to do it though
However provided
1) The variable length Array is a the end of the Record
2) You can make some changes on the Mainframe
You will not need this enhancement.
On the mainframe, It stores the length of each record in the file. This length is then dropped when transmitted to the PC/Unix system. I put some notes on transporting & reading VB files here http://jrecord.sourceforge.net/MainframeVBnotes.html
hopefully it is of some use
Bruce
If you need any help with Mainframe side, let me know.
Bruce
Occurs depending is supported now
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
How to find occurs using JRecord API
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
I have copy book with below details. I need to find the occurs length using JRecord..
DR-NAME-ADDR(1) OCCUR 4 TIMES.
Please Help us to resolve this issue.
I will look in to it, but why do you need to find it with JRecord ???, you can see it in the copybook
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Is there any way to access the full field path in the copy book.
Copy book
Here Using Jrecord can I able to get the field like this, WS-ADD.WS-B.WS-C
I have a requirement to get the complete path of the field.
Last edit: Bruce Martin 2016-05-13
Yes you can get it from the FieldDetail (provided you are comming directly from the Cobol).
There is a getGroup() of the FieldDetail class (but not the IFieldDetail interface, all IFieldDetails will be
the FieldDetail class).
Basically either of the following should work (I have not test either though, there could be some errors)
e.g.
alternatively you can do