× 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 2/29/2016 12:17 PM, John Yeung wrote:
On Mon, Feb 29, 2016 at 11:31 AM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
On 2/29/2016 10:17 AM, Vernon Hamberg wrote:
Buck - I think he refers to the Navigator tool or maybe the one in ACS.

I've been using that for many years. I keep my SQL scripts on the IFS,
and opening a .SQL file with Windows File Explorer starts the ACS SQL
Script program. However, copying a column of column names into an RPG
program, to be used for say, a FETCH data structure, is kind of ugly.

Sorry for my ignorance, but how is it ugly?

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

I can use a home grown SQL to grab the various attributes, but green
screen is a lot of work to copy/paste into the various parts I
ultimately need. It's better in RDi, given that I can at least paste
gigantic blocks in one go. But the manipulation to convert from a bald
list of columns into RPG infrastructure is mostly manual, although I can
use RDi's keystroke recorder to do some of the work.

Better would be a Python script that reads the list of columns and
generates a file of ready-to-use RPG code. Then the only manual effort
is to open that file in RDi and copy/paste the proper bits where they
belong.

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

Compared to my sense of what /should be/ (Utopia), manually mucking the
columns into code is ugly.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.