For My English Writing Practice(I know,Very poor)..
Technique Solution Overview
First of all, We should retrive the table struct. But how can we achieve it? Since the Life/Asia table struct is build by display screen file by SMART commad: CB SXXX XDS. So we can retrive all screen(or table) fields by AS400 Command DSPFFD FILE(SXXX ) OUTPUT(*FILE) FILEOPT(*FIRST *ADD).
After we get the table fields, you can make following consequence steps now.
(1)Resort them .(Fields in table struct copybook are sorted in ascending order)
(2)Create java pojo by table fields with FreeMarker . We can read logical file fldd to determinate the field type and length. Pojo name is TXXXXRecjava.
(3)Create a RFML file to map the table fields with FreeMarker. RFML file name = TXXXXREC.rfml
(4)Create a RFML Parase program, which can conve