× 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 Mon, Feb 29, 2016 at 2:06 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
Imagine a table called CUSTOMER.
It has some columns like these:
NAME 50A
ADDRESS 50A
EMAIL 128A ALWNULL

Let's say that I want to use this table in some SQL. I need some RPG
infrastructure to make that happen. The details vary by OS release, but
something like:

dcl-ds address
name char(50)
address char(50)
email char(128)
end-ds

dcl-ds address_null
name_null int(5)
address_null int(5)
email_null int(5)
end-ds

declare names cursor for
select name, address, email
from someTable

fetch next from names into
:address :address_null

Aha. So you would basically like a script to generate some
boilerplatish code based on a chosen file (and perhaps chosen fields
within that file, if the UI can swing it). Yes, very much up Python's
alley. (And again, to be fair, many scripting languages would handle
this with similar aplomb.)

Mike's approach of having some UDTFs on the i and using MS Access as a
sort of connector+GUI is definitely a viable one. You could probably
adapt his technique to make your RPG snippets, though I suspect trying
to do ALL the string manipulation purely with SQL would be uglier and
more cumbersome than with a more general-purpose language.

If the whole "GUI" part of it is just getting a few initial
parameters, then you don't need Access (which is good, because Access
isn't free). If I understand correctly, Mike's tool just grabs all the
columns. This is probably the "80/20" solution, where you get most of
the value for not very much cost.

But if you can afford the cost, I suspect it would be cool to have,
say, a list of columns, each with a checkbox; plus a quick way to
select or deselect all (so you can pick and choose the columns you
want in your snippets, without actually typing those columns, and
without deleting the unwanted ones yourself at the end). This is
actually not TOO horrible to build. Would make a nice side project in
Python or a .NET language. ;)

Utopia would be an RDi wizard that takes a file name and deals with it.

Indeed, that would be the best for RDi users. And totally doable for
anyone familiar with making RDi plugins.

John Y.

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.