I got it to work. Basically, the copy book I was given for the data was wrong. Also, looks like in case of multiple 01 level records (each 01 of different length), the application takes the length of the longest record and applies that when reading the input file. Thanks for all your help Bruce! Your app is very helpful!
Thanks Bruce. So, every time it iterates through the "while" loop and does reader.read(), does it read each record from the input file? How does it know how many bytes to read for each record? From the copybook in .newIOBuilder(copybookName)?
Thanks Bruce. So, every time it iterates through the "while" loop and does reader.read(), does it read each record from the input file? How does it know how many bytes to read? From the copybook in .nerIOBuilder(copybookName)?
Hi Bruce, at this point I just need to know how to iterate through each of the records in the file. Like I said, I am able to read the first record. It is the subsequent records that I am having trouble with. Should I used the Field Iterator or line.getFieldValue("Field-Name")? I am currently using the line.getFieldValue("Field-Name"). Thanks for your help!
The corp environment does not allow external software to be installed on the corp machines...
Fo the record selection, I am doing if (line.getFieldValue("Basic-struc-field2") ..asInt() == 1 ) { } I know I can also use a case switch stmt. The issue I am facing is, I am able to successfully read the first record, but not able to read the subsequent records as I am getting the following error when again doing line.getFieldValue("Basic-struc-field2). net.sf.JRecord.RecordException. Basic-struc-field2: Invalid Zoned Decimal: I am not using the FieldIterator to read the field values. Instead I...
So, the file I am reading is a fixed length file (i had wrongly mentioned earlier that it is VB). I have multiple 01 level records with the first one being basic structure (say first 100 bytes) and the subsequent 01 levels are to be applied based on the record-type field that is in the basic structure. Kind of like below. 01 BASIC-STRUC pic x(100). 05 BASIC-STRUC-FIELD1 pic x(10). 05 RECORD-TYPE. pic s9(01) 88 REC-TYPE1 value +1. 88 REC-TYPE2. value +2. 05 Filler pic x(89). 01 REC-TYPE1. 05 FILLER...