|
>I'm using the varying field to build my HTML output. >Should I be starting the data in byte 3 of that >field or move the varying field to a fixed >length field after the data is built? Sorry to have added to the confusion. Let me try again. 'Regular' alpha fields are fixed in size. MOVEL 'X' alpha 5 results in 'X ' There are always 5 characters in the field. When you want to concatenate two of these, you probably don't care about the spaces on the end, so you %trim() them before concatenation. Varying fields are NOT fixed in size. EVAL alpha = 'X' results in a field that is one character long. eval alpha = 'X ' results in a field that is 5 characters long. Normally, you don't initialise VARYING fields with the added blanks, so you have no need to %trim() them before concatenation. last 50 varying inz('Rogers') first 50 varying inz('Buck') name 50 varying inz('') last is initialised to a 6 character field, first to a 4 character field and name to a zero length field. eval name = first + ' ' + last results in last becoming a 11 character field. read database eval varyFirst = %trim(fixedFirst) If we read this record from the database (Buck Rogers), the database name FixedFirst might have 30 characters, mostly blanks. The %trim() discards those spaces and loads up varyFirst with only the 4 'real' characters in the field. I hope that helps. I think further discussion should move to the RPG list, because this doesn't sound too web-ish. --buck
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.