|
I don't quite understand your question. Are you saying: If #TEXT is 55 characters and parm1(p) is 10, and is not blank, then you want to do something like: #text = %trim(#text) + ', ' + %trim(parm1(p)); /* with some additional logic for when #text approaches 55 characters, etc */ By the way, you may want to consider dropping the Do loop and using a FOR loop. for p = 1 to 100; parm1(p).... EndFor; Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin fkany@xxxxxxxxxxxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 05/15/2003 09:47 AM Please respond to RPG programming on the AS400 / iSeries To: RPG400-L@xxxxxxxxxxxx cc: Fax to: Subject: /FREE calculations help I have a parameter field being passed into an RPGLE program: ================================== D Parm1 S 10A DIM(100) ================================== If any element of the array is populated, I would like to fill as much of each subfile field(55 characters long) on the screen as possible. How would you handle this processing. We're running V5R1. I'm trying to use /FREE format to code this. I got about this far and ran out of ideas: ================================== // Populate Text Fields P = 0; DOU P = 100; P = P + 1; IF Parm1(P) <> *BLANKS; #TEXT = Parm1(P) + ', '; ENDIF; ENDDO; =================================== _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.