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



A flat file is a file where the fields are not defined in the file itself.  
They are a fixed record length.

Some flat files I've seen have header and detail records.  So there are 
actually 2 different record formats in the file.  Some flat files have one 
record format, and some flat files are character text.

Now, it depends on what you need to do with the flat file.  The common way to 
deal with them is to open then program defined and include I specs for the 
fields.  If there are 2 record formats than you specify both.  The old way of 
determining what record format to use would be to compare character positions 
in the file somewhere and turn on indicators to indicate what record format to 
use.  The better way, IMO, is to pragmatically in the C specs look at a field 
and determine what format to use.

Another alternative is to create DDS for the file so you can just open it like 
a DB2 file.  Create the PF source and compile.  Then Copy from the flat file 
into your new file with FMTOPT(*NOCHK).  This works if there is only one record 
format, and if you can do this, the better off you are.  I've even done this 
before when there are 2 record formats in the flat file, by copying selected 
records dependant on data in the file, which you can do with the CPYF command.

A S36 flat file generally had 2 fields defined, K00001 and F00001 the first one 
being the Key, the second one being everything that wasn't the key.  I've seen 
K00002, K00003 also when it was a split key.  Again, I would create the DDS and 
copy into it.

If you have S/36 programs opening a file they do not look at the field names.  
Which means you can go ahead and create DDS for the file, copy the data into it 
and rename it back to the original name and the S/36 programs don't know or 
care.  Then you can have the best of both worlds.

I don't use ICF so really don't know what it is.

Regards,

Jim Langston

-----Original Message-----
From: MURALI DHAR [mailto:nmuralidhar@rediffmail.com]

Iam new to the stuff of flat files ad ICF files...can you please
answer me where can i get complete information(definition and
details etc) abt this....
Best Regards,
Murali


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.