Linda, Here's something I had published in Midrange Computing back in Sep 1999. If you have any questions, please let me know. Center Text Pronto! Looking for a quick way to center text in RPG IV? Try the technique I put together in Figure 2! It’s fast, simple, and, best of all, doesn’t take a lot of lines of code! — Michael C. Schlemme MSchlemme@Banta.com[*][*] Field to contain centered data (pick one definition)[*] D target_field S LIKE(source_field) C *LIKE DEFINE target_field source_field[*][*] Center field[*] C EVAL %SUBST(target_field: C %INTH((%SIZE(source_field)C %LEN(%TRIM(source_field))) / 2 + 1): C %LEN(%TRIM(source_field))) = C %TRIM(source_field)

Reply With Quote