We plan to rewrite old RPG III programs of one large application. The data is declared in the programs -- no external declaration. What are the best methods and tools to do achieve this?
Depends... This depends so much on what you have access to, your levels of expertise, what you can afford if you want to buy in tools.
I know that there are some quite good source conversion utilities FREE -- one I use myself is based on a converter written by Craig Rutledge, which may be available in Search400.com or on a related site.
But the first task should be to externalize the data. If all your files are 'flat' (no fields defined in DDS), then you may have a problem -- but you can get round that by using 'dummy' DDS just to define external fields over the flat records – the example below has fields defined in 'dummy' file AS_REC01 :
D formatAS E DS ExtName(AS_REC01)
When you read your flat file, read in into the data structure formatAS and all the 'external' fields will be filled.
If your files have 'proper' DDS, then not so bad! Just set "E" for Externally-Described in your current F-specs and remove/tidy up the internally-defined field names and I-specs before running any converters.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
Dig Deeper on RPG iSeries programming
Related Q&A from John Blenkinsop
When an error occurs on an IBM command, the diagnostic messages are sent first, then an escape message, which you can monitor. On AS/400 you see the ... Continue Reading
Learn how to 'append data to the file' with the FTP DIR command, and eliminate the hassle of having to end the FTP session and restart to view ... Continue Reading
RPGIV will 'think of' incoming integer fields as binary, and then will redefine them in the program structures as PACKED. So, when you chain a record... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.