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



Hi Buck,

I use a function like these on the host which return a delimited list of
columns for a table -

https://drive.google.com/open?id=0B86kLoHq8E_PcHJ3YUJCRVR6dk0

To make it fast and easy to use, I call it from a Microsoft Access custom
UI screen that prompts for a System Name, Schema Name, Table Name, with a
check box to turn on/off copying the result fetched from the host UDTF into
the clipboard. The copy to clipboard check box is turned on by default.
Once on the clipboard, I paste it into whatever editor I'm using at the
time. I'm not impressed with Access as a database, but it works very well
for rapidly creating tool user interfaces to access the IBM i host.

The functions in the attachment have an enhancement to allow the user to
customize the delimiter and apply formatting to the results returned.
Spaces plus a line feed and/or carriage return characters can be passed in
the delimiter, in addition to a comma for example, to provide vertical
stacking and indenting of the returned list of columns. If you wanted the
results to be pasted into a D-spec data structure with vertical stacking in
RDi, for the delimiter parameter, you could omit the comma, include x'25'
for a line feed, and provide the appropriate number of spaces to provide
the desired indenting.

For this community, an improvement would be to use the same or enhanced
functions on the host, with an RDi plugin, activated by a User Key Action,
to prompt for the System Name, Schema Name, Table Name, and delimiter
(comma default). The delimited list of columns would then be fetched and
inserted at the cursor location. If I was experienced at navigating and
understanding all the Java packages and classes used by RDi, I'd make such
a plugin, but I'm not. I don't know where to find comprehensive
documentation on the packages and classes used by RDi. Such a plugin would
be a very welcome addition to RDi or iSphere imo :) Others experienced
with that could crank out such a plugin much faster than me, hint hint :)

By making it efficient for developers to use the long column names, it
helps eliminate the argument that it is inefficient to key them.

Our shop uses lead developers (not management) to enforce use of long
columns for new development, but we don't require them for minor changes to
old programs. There was some early resistance, but the developers jumped
on board pretty fast.

Mike

date: Sun, 28 Feb 2016 17:32:59 -0500
from: Buck Calabro <kc2hiz@xxxxxxxxx>
subject: Re: SQL Naming Conventions

On 27 February 2016 at 13:43, Mike Jones <mike.jones.sysdev@xxxxxxxxx>
wrote:
IMO, for new development, use of the long names should be enforced by
standards / code review.

If 'standards / code review' means that the standards were designed
and agreed by the developers, I totally agree. I have never - and I
mean never - seen 'standards forced down from on high to succeed.
What happens is the developers end up making the ugliest possible code
while strictly following the rule of the law.

Developers should have efficient tools to fetch a
the list of columns from a table, so they can copy/paste them instead of
keying them.

This is a great idea; what do you use?
--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.