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



The rename worked. Thank you.

IBM also got back to me and said that simply specifying the field in the LF
with the same name, a length example 100A and NO VARLEN, this makes the
field a field length field. Essentially, in the LF the field then becomes a
fixed length field whilst remaining a VARCHAR field in the physical file.

Thanks all.

On Wed, Jan 20, 2021 at 1:21 PM Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

Pretty sure that doing this would result in a file that is just read
only...

And if not then the VARCHAR field would end up with trailing spaces...

Charles

On Wed, Jan 20, 2021 at 10:02 AM Reeve <rfritchman@xxxxxxxxx> wrote:

Sure.

In a logical with a different format name, define a fixed-length field
like
this:
A FHXF30 30 RENAME(FHXF)
A K FHXF30

This is a handy technique when you want to build a multi-format logical
over key fields (columns) of different lengths; this approach enables
powerful lookup and search applications. In SQL, you'd use the UNION ALL
clause and SQL happily resolves column size differences.

On Wed, Jan 20, 2021 at 8:27 AM <dfreinkel@xxxxxxxxxxxxxxxxx> wrote:

I have a OPM RPG program that I added a new file to. All the fields in
the
added file are variable length fields.



I need to chain to the file and update a flag in that file.



I cannot compile the program because OPM RPG does not support variable
length fields.



I compiled using CVTOPT(*VARCHAR) but that does not convert the key
fields.



Is there a way to redefine a variable length field as a char field in a
logical file?



Thanks



Darryl Freinkel

A4G

Telephone: 770.321.8562 Mobile: 678.355.8562



--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




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.