If I was not going to use RPG I's use PHP in much the same way as you're using Python - at least that way I'm dealing with a supported product.

On 2013-12-04, at 5:26 PM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On Wed, Dec 4, 2013 at 4:23 PM, Gary Thompson <gthompson@xxxxxxxxxxx> wrote:
You got my attention also, but the link seems incomplete...
maybe you can re-post ?


The tricky character in the link is one of those slanted/curved right
single-quotes (for the apostrophe in "RPG's").

Since we're mentioning alternatives, I'll bring up again
iSeriesPython. Use SQL or RLA to access your physical file, use the
built-in CSV module to write out to IFS stream file. For my taste,
using SQL in Python is not as ugly as using it in RPG, and the CSV
module not as involved as Open Access. The whole thing would look

import csv, db2
connection = db2.connect()
c1 = connection.cursor()
c1.execute('select * from mylib.myfile')
with open('output.csv', 'wb') as f:
writer = csv.writer(f)
for row in c1.fetchall():

And you're done. Eight lines for the entire program.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Jon Paris


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