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



Create a new physical file with all the fields in the original file, the record 
length
should be the same.  Then copy your file in the new file, and if you want you 
can rename
both files, so the old progrmas use the new file.

To copy you must use CPYF with the *NOCHEK and *NOMAP options.
___________________________________________________________________________________________

AAnuszewski@hammer.net wrote:

> If a physical file has been defined as being comprised of 3 fields:
>
> a character field of length 1
> a character field of length 10 that designates the key
> and a character field of length 117 that designates the rest of the data
>
> Is it possible for me to generate a different record format for this file and
> actually have it work as a keyed file?
>
> The issue is that the 10 character key is actually TWO fields - an 8 character
> field and a 2 byte numeric.  I do even care WHAT is stored in the 2 character
> numeric field.  I just need to ensure that there is not another record 
>matching
> the first 8 characters.
>
> What I need to do is define the record format to look like
>
> a character field of length 1
> a character field of length 8 - designated as key
> a numeric field 2 bytes long - don't care if this is designated key or not
> various length character, numeric, and packed decimal fields to comprise the
> remaining 117 bytes
>
> I can make this work with a sequential file and read the data.  However, I can
> NOT get my program to recognize the key unless I keep it at 10 characters 
>long,
> which is impossible.
>
> Amy
>




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.