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



For performance issues, the allocated length (xxx in VARLEN(xxx)) or keyword
ALLOCATE within SQL Tables, should be defined so it can store at least 80 %
of all values directly in this field/column and only the rest will be stored
within the overflow area.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Alan Campin
Gesendet: Wednesday, 15. September 2010 03:06
An: RPG programming on the IBM i / System i
Betreff: Re: File size with varlen fields

When you defined the VARLEN you did something like this?

A R RECORD1
A FIELD1 32000A VARLEN(1024)

FIELD1 is defined as a variable-length field with a maximum length of 100
and an allocated length of 30. FIELD2 is defined as a variable-length field
with a maximum length of 200 and no allocated length.

On Tue, Sep 14, 2010 at 6:20 PM, Albert York <alfromme@xxxxxxxxx> wrote:

I did that (only I used RPG). The field size looks okay:



..+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...
.0

±CallableStatementCallback; uncategorized SQLException for SQL ¢{call
XDISVC.


08C8998898EA8A8989AC899888954A988A88998A884EDDCA889A89948994EDD44C88994ECCEE
C4


2F3133123523135455331332132E045313576999540283573573965066902830A03133074925
3B

à/xtime/output/x000045301.out HTTP/1.1 400 Bad Request Date: Fri, 06
Aug 2


046AA89869AA9AA6AFFFFFFFFF49AA004CEED6F4F4FFF4C884D89A8AA02C8A874C9864FF4CA8
4F


14173945164374317000045301B643000833711B10400021409584523D54135A0699B0060147
02

±CallableStatementCallback; uncategorized SQLException for SQL ¢{call
XDISVC.


08C8998898EA8A8989AC899888954A988A88998A884EDDCA889A89948994EDD44C88994ECCEE
C4


2F3133123523135455331332132E045313576999540283573573965066902830A03133074925
3B

On Tue, Sep 14, 2010 at 4:30 PM, James Perkins <jrperkinsjr@xxxxxxxxx>
wrote:
Make sure the data being inserted into the table is trimmed. You can run
an
SQL statement over it to trim up the long field and see if that's the
issue.

UPDATE your_table
SET long_field = TRIM(long_field)
--
James R. Perkins


On Tue, Sep 14, 2010 at 16:03, Albert York <alfromme@xxxxxxxxx> wrote:

I have a very long field (32000 bytes) that I defined in a file using
varlen. Most of the time the field will be around 1 K but sometimes it
could be 32000 bytes.

When I look at the file size it shows 1.357 GB for 44180 records. When
I look at the records the field size for that field looks correct.

Why is the file so large?

Thanks,

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


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


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