Convert LANSA RDML/RDMLX into text files
Posted: Fri Sep 19, 2025 5:44 pm
Hello,
We have requirement to export LANSA RDML/RDMLX code into text form, in aim to use it as input for code analyse using AI engine.
For first look, it should be quite simple, using LANSA APIs (in form of Repository Related BIFs). I supposed, I will use for working with processes/functions GET_PROCESS_LIST, GET_FUNCTIONS_LIST, GET_FUNCTION RDML etc.
I designed VL LANSA form, where can be entered some input filtering and logic, based on the BIF sets. For each process would be created directory with the same name and functions codes placed into it. The long lines, using more records would be joined into one string, that any command would be on single line only. The final codes would be converted into text files using TRANSFORM_LIST BIF.
Unfortunately, I have found, some of the BIFs did not work. LANSA support confirmed, that START_PROCESS_EDIT (which is mandatory prerequisite for GET_FUNCTION_RDML) is NOT supported since LANSA v14 EPC141070 ! I asked to remove it from documentation (it was also in V16 doc), but it does not solve my primary requirement.
LANSA strictly do not recommend to directly access their own repository files, but it is probably only option, how to get the required result. Unfortunately, the LX_F29 structure and content is much more complicated than original DC@F29 / DC@F30 structure on IBM i. For the RDML code I can see now the only option check-in all codes into IBM i and read them there using SELECT_SQL.
RDMLX codes might be probably read directly from LX_FRD, because its structure is simpler.
Have anyone better idea?
We have requirement to export LANSA RDML/RDMLX code into text form, in aim to use it as input for code analyse using AI engine.
For first look, it should be quite simple, using LANSA APIs (in form of Repository Related BIFs). I supposed, I will use for working with processes/functions GET_PROCESS_LIST, GET_FUNCTIONS_LIST, GET_FUNCTION RDML etc.
I designed VL LANSA form, where can be entered some input filtering and logic, based on the BIF sets. For each process would be created directory with the same name and functions codes placed into it. The long lines, using more records would be joined into one string, that any command would be on single line only. The final codes would be converted into text files using TRANSFORM_LIST BIF.
Unfortunately, I have found, some of the BIFs did not work. LANSA support confirmed, that START_PROCESS_EDIT (which is mandatory prerequisite for GET_FUNCTION_RDML) is NOT supported since LANSA v14 EPC141070 ! I asked to remove it from documentation (it was also in V16 doc), but it does not solve my primary requirement.
LANSA strictly do not recommend to directly access their own repository files, but it is probably only option, how to get the required result. Unfortunately, the LX_F29 structure and content is much more complicated than original DC@F29 / DC@F30 structure on IBM i. For the RDML code I can see now the only option check-in all codes into IBM i and read them there using SELECT_SQL.
RDMLX codes might be probably read directly from LX_FRD, because its structure is simpler.
Have anyone better idea?