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


  • Subject: Re: Flat File Help?
  • From: "Peter Dow" <pcdow@xxxxxxxxx>
  • Date: Wed, 2 Feb 2000 22:52:12 -0800

You can

1) Create a physical file in the correct format for the flat file then use
CPYF FMTOPT(*NOCHK) to copy data from the flat file to the physical file; or

2) Create a physical file in the correct format for the flat file and use it
as an external description for a data structure to which you move the flat
file record (from a program-described file input spec); or

3) Just use the flat file as a program-described file; or

4) Substring whatever fields you need from the single field of the flat
file.

A lot depends on the format of the flat file. If it contains fixed position
fields and a single record format, then options 1 or 2 can be used. If it's
delimited data, you might want to use CPYFRMIMPF (copy from import file) to
a physical file first. Option 1 is a good method if you want to use the data
from queries or SQL as well as from an RPG program. Option 2 at least gets
the field definitions out of the program, and avoids having to copy the file
first, but doesn't make the data available to query, SQL, etc. Option 3 is
ok if only one program is going to use the flat file. Option 4 is ok only if
you're looking at one or two fields in the flat file record.

HTH
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: a b <eagle_291@yahoo.com>
To: <RPG400-L@midrange.com>
Sent: Wednesday, February 02, 2000 1:21 PM
Subject: Flat File Help?


> Could anyone tell me where I might find some
> information or an example of a program that reads a
> flat file? Any help would greatly be appreciated.
>
> Thanks
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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-Ups:
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.