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



They don't have to be defined at their maximum length you define the
allocated length and the maximum length for example:
----------------- The following copied from OS/400 DDS Reference v4r4
-----------     

Use this field-level keyword to define this field as a variable-length
field. Variable-length fields are useful for improving storage when the data
for the field typically fits within a certain length, but can occasionally
be longer. Specify the maximum length of the field in positions 30 to 34.
You can specify the allocated length (or typical length) in the parameter.

FIELD1       100A         VARLEN(30)

The allocated-length parameter is optional. Use it to specify the number of
bytes allocated for the field in the fixed portion of the file. If you do
not specify the allocated-length parameter, the data for this field is
stored in the variable length portion of the file.
 
Valid values for the allocated-length parameter are 1 to the maximum length
of the field specified in positions 30 to 34.

The VARLEN keyword is valid only on character fields.
 
When you specify the VARLEN keyword, the maximum length you can specify in
positions 30 to 34 is 32 740 (32 739 if the field allows the null value).
----------------------------------------------------------------------------
--------------------

Tom Westdorp
AS/400 Senior Programmer/Analyst
IBM Certified Specialist - RPG IV Programmer
IBM Certified Specialist - RPG IV Developer
Internal Telephone #  04-6859
Voice:  (702) 221-6859
Fax:    (702) 221-6881
tom.westdorp@stationcasinos.com <mailto:tom.westdorp@stationcasinos.com>


-----Original Message-----
From: Joe Giusto [mailto:JGiusto@patuxent.com]
Sent: Monday, July 17, 2000 10:59 AM
To: 'midrange-l@midrange.com'
Subject: Why use variable length fields?


I have seen some posts about variable length fields.  If they have to be
defined at their maximum length anyway, what is the advantage to using them.
Dose it really save space on the system?


Joe Giusto II
Patuxent Publishing Company
10750 Little Patuxent Parkway
Columbia, MD 21044
mailto:JGiusto@patuxent.com <mailto:jgiusto@patuxent.com> 
http://www.lifegoeson.com <http://lifegoeson.com> 


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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-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.