× 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: Using generic program to read multiple file formats
  • From: MacWheel99@xxxxxxx
  • Date: Mon, 18 Sep 2000 17:35:00 EDT

My experience may not be in the right areas, but what I have seen is that 
even though AS/400 promotes externally described files, you CAN do internally 
described on AS/400 ... in a few cases where I have converted S/36 RPG to run 
on AS/400, it has been less trouble to leave some stuff as internally 
described than convert it all the way to AS/400 format.

However, the LENGTH of the file is not a variable that can be altered at run 
time as far as I can see.  You have to create a program with a generic 
length, then populate your file so that it fits into that generic length. 
then the program should run fine.

I am thinking that if you do RPG on 400 in which the file is defined 
internally rather than externally & the contents are 1 humongous alpha field, 
that might be a good starting point.

You might look at what utilities exist for migrating software from OS that 
did not have externally described files to those that do ... as I recall when 
we were coming from S/36 there were an abundance of tools that could access 
programs written in RPG/36 & construct external description DDS from the 
aggregate of several RPG/36 programs that contained between them all the 
fields described using internally described files.

I will try to dig up names of packages & pass them along to you.  It has been 
years since we had a need for this.

I think you need to get at similar packages that can read whatever passes for 
source code on PC so that it feeds in the specifications that the PC or MAC 
used for that file & get the AS/400 data base equivalent.

You might find helpful http://www.outlookcomputing.com

With this tool you can play jig saw puzzle with data coming from different 
file layouts  to populate final target based on business rules that you 
establish.  I like the product & have used it on major conversion projects.

>  From:    rob.dixon@erros.co.uk (Rob Dixon)

>  Al
>  
>  Many thanks to you and to the others who have replied for your
>  suggestions.
>  
>  I didn't make myself clear.  I want to read a file that did not exist
>  when the
>  generic program was compiled, by using a file override.  The files will
>  probably
>  be sequential files without a keyfield.  They may have come from PC or
>  MAC
>  database files converted to TAB or COMMA delimited (variable length
>  records) or
>  if they are not too large may have been converted via a spread sheet
>  into fixed
>  length records.  No DDS exists for them.  I wish to read them just once
>  to
>  convert them for loading into my Neural Database.  I will define the
>  fields within the Neural Database so that I don't need to do any program
>  writing or recompilation.
>  
>  I would also like to be able to read DB2/400 files in a generic program
>  by
>  reading in the field descriptions and breaking down the record using
>  these within
>  the generic program without recompilation.  I know that there are/have
>  been utilities that do this.  
>  
>  It maybe that if I did it before successfully, which may well have been
>  on a
>  System /38, that I used program defined files whereas now I have tried
>  with an
>  externally defined file.
>  


Al Macintyre  ©¿©
MIS Manager Green Screen Programmer & Computer Janitor of BPCS 405 CD Rel-02 
running on AS/400 V4R3 http://www.cen-elec.com Central Industries of 
Indiana--->Quality manufacturer of wire harnesses and electrical 
sub-assemblies

Y2K is not the end of my universe, but a re-boot of that old Chinese curse.
The road to success is always under construction.
Accept that some days you are the pigeon and some days the statue.
Murphy's Mom brought wrong baby home from hospital so it should be Kelly's 
Law.
When in doubt, read the documentation, assuming you can find it.
+---
| 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.