|
I just got Barbara's solution. Since when is 6 lines of code better than 3. I guess using the KISS method is out of date. I am not used to writing big programs when a small one will do. I have to learn to write better RPG. Next time I will create the Mona Lisa using 200 Calcs instead of 10. If you read this and think I am bewildered you are right. C MOVE CHAR1 LAST 1 C LAST IFEQ ' ' * If not blank, it's already right-justified. * Calculate the total length of the field and * the length of the data C 'x' CHEKRCHAR1 TOTLEN 30 C ' ' CHEKRCHAR1 DTALEN 30 * Calculate the number of blanks at the beginning C TOTLEN SUB DTALEN BLK 30 * Right-justify C ' ' CAT CHAR1:BLK CHAR1 C ENDIF Barbara Morris +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.