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



On 5/18/2016 4:40 PM, Rob Berendt wrote:
Multiformat files on the S/34 we're internally defined. Your RPG broke
them down. For example you might have

H01 - ORDER# - CUSTOMER# - SHIPTO - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
H01 - ORDER# - CUSTOMER# - SHIPTO - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
H01 - ORDER# - CUSTOMER# - SHIPTO - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
H01 - ORDER# - CUSTOMER# - SHIPTO - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
D01 - ITEM# - ITEMQTY - PRICE - EXTENDED - etc
...

This was actually quite common back in the day.
And with RLA you just knew that the first four D01's were associated with
the first H01,
The next two D01's were associated with the second H01,
and so on.
So if you're going to do this with SQL you have to be aware of this. There
will be no trailing H01.

Chuck mentioned it, and it might do to mention it again with this very
nice example before us. I can (and do) write every one of my stored
procedures using RPGLE. I can read a stack of records, put them into an
array and return that array as a result set back to SQL.

The point being that if you already have an RPG program that processes
these files, you can put this logic into a stored procedure which ought
to be callable by an external app. via an ODBC connexion. No SQL is
needed in the RPG even though it is an SQL 'client' which is consuming
the results.

Our .NET team use these things all the time.


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.