×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Thank You Hans for your explanation of why variable length fields sometime
work and other times don't.  I missed the part about fix calcs not setting
the size of varying length fields.  I do understand your reasoning for doing
so.  If I had a chance to vote on how to implement variable length fields, I
would have voted for fixed calc specs setting the length of the variable
length result fields.  I know it is to late to change it and don't expect
you to.  I will keep the behavior in mind and use them correctly in the
future.

I did know about the %xlate and tried it but SEU and the compiler did not
like it.  I am at 4.4.  

Again thanks for your response.


Christopher K. Bipes    mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst  mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.        http://www.cross-check.com
6119 State Farm Drive   Phone: 707 586-0551 x 1102
Rohnert Park CA  94928  Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.
Karen Herbelin - Readers Digest 3/2000

-----Original Message-----
From: boldt@ca.ibm.com [mailto:boldt@ca.ibm.com]
Sent: Monday, January 08, 2001 5:30 AM
To: rpg400-l@midrange.com
Subject: Re: XLATE



Simon already gave a good answer to the question.  I'd just
like to add that the behavior is a basic principle behind
using varying length strings in the old fixed-form calc
specs.

In a fixed-form calc, a varying length field works exactly
the same as a fixed length field with the same current
length.  That is, if the current length of a varying length
field is 17, it is treated as a fixed length A(17) field,
regardless of how long the field is actually declared.  It
was designed this way to handle the semantics of the fixed-
form character operations.  For example, many of the fixed-
form calcs, such as MOVE, don't change the entire result
field.  Some modify only the right-most characters, others
only the left-most characters.  Since EVAL changes the
entire result, it can assign a length properly.

(BTW, I always like to advertize V5R1 RPG IV features, and
here's a good opportunity to mention the new %XLATE built-in
function.)

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com

+---
| 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
+---
+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.