Create a IBM i Java Toolkit RecordFormat from an IBM i File

133 views Asked by At

Can a jt400 RecordFormat object be created just by pointing to a System i db file with a Path?

I can create the RecordFormat and add the Field definitions but I'd like to just say "create a RecordFormat just like that File in that Library"

I did not see anything like that when looking at the RecordFormat and Record classes.

1

There are 1 answers

0
David G On BEST ANSWER

Look at the AS400FileRecordDescription class, specifically the retrieveRecordFormat method.

        AS400FileRecordDescription recordDescription = new AS400FileRecordDescription(
                as400, path);

        RecordFormat[] formats = recordDescription.retrieveRecordFormat();