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



Paul, if WRKDBF displayed those characters, then either there is a bug in
WRKDBF, or there is more to your program than meets the eye. You didn't
tell us the name of the variable or how it relates to your example code; I
think those are important to any further discussion. Now I suspect that
you're moving this 9000 (or 9002) character DS to your varying length field,
and in fact writing garbage out to the DS.

Here's one thing you can do (assuming the name of the varying-length column
in question is MYCOL and the name of the file is MYTABLE) :

From a command line:

STRSQL
SELECT MIN(LENGTH(MYCOL)), MAX(LEN(MYCOL)) FROM MYTABLE ;

If this returns 9000 twice then you're probably writing the data incorrectly
in the program ... as I said, you're probably trying too hard. Within your
program, all you probably need is MYCOL = %TrimR(some_value)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
In some cultures, what I do would be considered normal.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of PAPWORTH Paul
Sent: Tuesday, February 01, 2011 3:11 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Re: VARLEN question

Thanks to all who replied.



Dennis

I will modify the data length to 9000.

I used wrkdbf to display the record



Charles

Why are you using a DS overlay to handle variable length external

fields instead of using RPGIV's native support of them?



Can I simply do a varfield = fixed_length_field ; ?

Why do I in examples on the net the overlay I used ?





Paul



--
This is the RPG programming on the IBM i / System i (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.