A member or members in QTXTSRC (or create a source file called QLETTERS, maybe?) is also fine, and is easy to maintain. Just override to the right member and open it in your program like a normal database file.And a normal database file is also OK, if you create a maintenance program to go with it. This has the advantage that it would just be another table for authorized users to maintain, and they do not need to know how to use SEU. Plus, you can add fields to each text line (record) to provide header records, group data, boilerplate flags and authority control -- whatever your imagination and the user's requirements will support.
O-specs would be my last choice. I assume you mean that the text is stored as constants in the program. This means that changes require programmer intervention.
Now to the printing. Your new program must do two things -- print a letter, and print a list from a database. You can create two programs, one for each task -- that's a better methodology. You can use the same printfile between the two program by overriding the file (OVRPRTF) with SHARE(*YES), then using USROPN in the two programs. Call one program from the other. The called program must close the printer file before returning, but the calling program will still have the printer file open. When the calling program ends, it must close the printer file, and then the printout becomes ready to print.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
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.