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.
This was first published in November 2004