Bruce,
Not sure if this is an option but is it possible to use something like JRecord to convert PDS that are stored as Assembler DSECTs vs Cobol Copybooks?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also Bruce does this give the entire length of the line including the RDW or does it ignore the RDW piece?
Integer copyRecLength = copyRecord.getData().length;
Bruce,
Not sure if this is an option but is it possible to use something like JRecord to convert PDS that are stored as Assembler DSECTs vs Cobol Copybooks?
There is nothing builtin for handling DSECT's. Options
Xml
copybook / description.parser
. So in theory a DSECT parser is possibleThe Scripting option might be the easiest.
You can define records in java like:
You can define a Record in xml. You could try converting your DSECT to Xml using Rexx / Python etc:
This was very insightful. I think what we have to do now is attempt to convert these Variable Block DSECTs into cobol copyrecords. An example of one:
Bruce let me know your thoughts. I guess my question would be what would be used to determine record type like in cobol?
Also Bruce does this give the entire length of the line including the RDW or does it ignore the RDW piece?
Integer copyRecLength = copyRecord.getData().length;
byte[] net.sf.JRecord.Details.AbstractLine.getData().length
get The dat in the line as an Array of Bytes
Returns:
Returns the record.
With JRecord you do not specify a Record-Length Field. When definiing the RecordLayout you set the FileStructure / FileOrganisation IO_VB.
int copyRecLength = copyRecord.getData().length;
will give the length with-out the record-length field.