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



Presume that the compiler can dynamically open any stream file we have.
Presume that the compiler can use OPEN/CLOSE/READ/WRITE and even UPDATE to
change the pseudo-records size. (why not, it's my fantasy!)
Presume that the runtime has decoders for all the popular formats, and even
allows me to register a decoder for formats that aren't (yet) included with
OS/400.
Presume that the compiler can dynamically call the proper runtime decoder
and throw errors when the program's receiver variable/structure/new data
type can't match the decoded file at runtime.
Presume that everything I said about 'decoder' applies to 'encoder' as well.

What did I miss.... let me see now...  Oh.

How do we tell the runtime what kind of file we're looking at?  Do we want
OPEN to examine the first 10kb of the file and deduce it's proper decoder?
No, that won't work... too many chances for overlap.  Oh, wait; how about
using part of the file NAME to tell us what decoder, let's call it a file
EXTENSION!  We can simply DISREGARD those Unix people or (heaven forefend)
telephone switches and other devices that don't use Windows naming
conventions.  And never mind that Microsoft use the same extension to mean
different things as well as the same INCOMPATIBLE thing depending on version
of Excel you must target.

Work that one out and we have a winner.

Would I like to be able to issue a READ against any version of MS Excel and
fetch one row and decode each column or that row into a data structure?  Who
could possibly answer no to that request?

Would I like to be able to dynamically shrink and grow my HTML by simply
doing a CHAIN then an UPDATE?  Um.  Yes.

Do I want a way to automatically transform my switch records in any of
dozens of formats AUTOMATICALLY into my own database structure?  What a
dream... no more file transformation issues.  Ever.  XML?  Don't need no
fancy schmancy XML parser.  Use READ.  It'll be able to go out and fetch the
appropriate XSLT, DTD or schema and run with it.  Oh, wait - are there
stream files that span 'records' delimited by CR/LF?  Icky.  No matter;
we'll posit a DYNAMIC record delimiter so that we can tell each READ when to
stop reading.  Glad that's fixed.  Word document and embedded formatting?
Pffft.  Have an option to simply strip out the formatting leaving only the
text behind.  EDI/multi-format physical files?  Simple as can be - we'll
just add a file descriptor file to aid the decoder/encoder, just as if we
were mapping to an actual EDI program.  WRITE and you get the PO850 and all
associated elements.  Binary formatted variable data like IOCA or 5250 data
stream or switch records could be handled with a series of linked mapping
files, so that one "keyword" triggers one decoding table, whilst another
"keyword" triggers another.  Sounds like a finite state machine to me.

It's a noble goal; universal file transfer.  It'll be quite wonderful to see
iSeries and RPG as the first platform to achieve it.  Ever.

Submit those PMRs today and let your needs be known.  If we don't tell the
powers that be, the work will never get scheduled, that's certain.  Until
then, decoding transferred files remain firmly in the realm of clever
application programmers.
  --buck


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.