× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi guys,

only EVAL or %LEN() change the length of variable length fields. MOVE or
MOVEL does not!

Birgitta

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Bob Cozzi
Gesendet: Mittwoch, 20. Oktober 2004 03:36
An: 'RPG programming on the AS400 / iSeries'
Betreff: RE: Any gotchas using VARLEN fields?


Eval always changes/sets the length of the target.
MOVEL may change the length. I believe it makes things longer but not
shorter, but I'd have to look it up.
-Bob

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of M. Lazarus
Sent: Tuesday, October 19, 2004 7:57 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Any gotchas using VARLEN fields?

Bob,

  Will a MOVEL or EVAL overwrite the length bytes?

  -mark

At 10/19/04 07:50 PM, you wrote:
>The only down-side is that the data in the extended area is not recoverable
>when the record is deleted. Data for the field is moved into the extended
>area when the "average length" is exceeded. That is the value you put on
the
>VARLEN(xx) keyword.
>Other than that... no issues that I've seen.
>-Bob
>
>
>-----Original Message-----
>From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
>On Behalf Of mlazarus@xxxxxxxx
>Sent: Tuesday, October 19, 2004 11:15 AM
>To: rpg400-l@xxxxxxxxxxxx
>Subject: Any gotchas using VARLEN fields?
>
>  Is anyone using VARLEN fields in DDS?  We are thinking of implemeting it
>in a few files that have some large, seldom used, text fields.
>
>1)  Do the leading length bytes always have to be taken into consideration
>or will an EVAL or MOVEx know where to put the data (similar to the VARYING
>keyword)?
>
>2)  Does the target length have to be set manually when updating the field
>or will RPG set it properly?
>
>3)  If the H spec and compile do not specify CVTOPT(*VARCHAR), will the
>program bomb on a read, even if the VARLEN field is not referenced in the
>pgm?
>
>  A search seems to turn up little useful information (from a big picture
>standpoint.)  Does anyone have a writeup, article, link, manual etc. they
>can send?
>
>  Thanks.
>
>  -mark

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



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

Replies:

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

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.