|
Jay, once upon a time I created a program with dynamic embedded SQL that
read data into an sqlda. I had to provide in the sqlda space for each data
element, and tell the sqlda where it was. It worked, but was somewhat
awkward. Since the SQL descriptors were introduced, I have stopped using
the sqlda because they are far simpler.
On Oct 14, 2017 1:43 PM, "Jay Vaughn" <jeffersonvaughn@xxxxxxxxx> wrote:
Lynn. Sounds like you know your stuff.keys.
Could you please send some code directly to me to handle pulling the
fetched row data inside an embedded rpg pgm into host variable storage.
Much like my original inquiry suggests.
On Oct 14, 2017 12:07 AM, Lynne Noll <lvwnoll@xxxxxxxxxxx> wrote:
assume you are hoping to automate generating the UPDATE and INSERT
Since going from RLA to SELECT * FROM ONETABLE is pretty useless, I
statements, which are closer to record formats. Normally, I generate the
work with application (they are all very much alike) and custom code the
update panels from a template to get a more finished look and behavior.
name, an array of name=value in text, with something similar for the
If I had callers passing me stuff to update, I'd have them pass a file
If speed is not important, I could just compose the statement and EXECUTEpick
IMMEDIATE, without memory allocation, but if I was going to use a
descriptor area for the update, I'd still pass the update values in an
array, and stick them into the allocated memory. Data structures are so
1990's. You put pointers to the memory for each field in the descriptor
area.
UDTFs and CTE's) and make a green screen subfile work with list. Don't
For me, I take a SQL SELECT of any construction (with joins, UDFs and
on me for going to green screen; I'm an old lady. I handle row selectionthe
via marker strings in the SQL that I replace with values that the user
enters. Column headers are the correlation name on the select. (select
mmcm# as customer, for example, shows Customer as the column header.)
The application definition selects certain columns by name so it can pass
them to the option processing program in an array, one entry for each
column.
PREPARE, allocating appropriate memory, and then assigning pointers to
The result set is handled by getting the column descriptions via
memory to the descriptor; a service program does all that, as well asthis
formatting the various field types for the screen. But I don't write any
new code (other than the SQL) just to throw up a new work with list.
field types and retrieve the values by column sequence or name.
I can provide code offline to allocate appropriate memory for different
Andelin <nandelin@xxxxxxxxx>
________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> on behalf of Nathan
Sent: Friday, October 13, 2017 10:25 PMhttps://www.itjungle.com/2016/07/25/tfh072516-story02/>
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: where is SQLDATA?
Jay,
Here is a link to an article about Townsend Security licensing an ROA
handler that maps RPG RLA to SQL.
https://www.itjungle.com/2016/07/25/tfh072516-story02/
Townsend Ponders Future Of DB2 Modernization Tech - IT Jungle<
www.itjungle.comtechnology it created to solve a thorny encryption issue in DB2 for i?
What will Townsend Security do with the potentially groundbreaking
While the Olympia ...
I recall discussing this a little with Vern Hamberg a while back on
you'relist. Your ROA plans may be reinventing the wheel, so to speak, if
towriting an ROA handler in order to facilitate FIELDPROC encoding andas
decoding, per our discussion on LinkedIn.
I seem to recall Vern saying something about mapping RLA to SQL via ROA
opening a can of worms, or getting tangled up in a mess, or somethinglike
that.
One alternative that I've considered was using ROA to map RLA to the C
functions exported from the QC2IO service program, rather than trying
tomap RLA to SQL. The handler could automate the FIELDPROC encoding for
positioning and reading by key, etc.
On Fri, Oct 13, 2017 at 1:31 PM, Jay Vaughn <jeffersonvaughn@xxxxxxxxx
wrote:
I'm developing a handler pgm to replicate RLA to SQL - i'm using the
namesValues method...
so my dynamic capabilities paired with the I/O ds's that rpg passes
theseeing.
handler pgm have allowed me to build the sql statement you are
generatedbanging
I NOW, within that pgm (that is clueless to what file or field I'm
on), need to assign values from the row that select statement
(RPG400-L)stillinto the data structures to pass back to my rpg handler pgm.
Hopefully you have a better picture of canvas now...but the question
reverts back to my last post and question.--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list(RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxxarchive.midrange.com/rpg400-l>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
RPG400-L mailing list archive (midrange.com)<https://
archive.midrange.comquestions.
midrange.com RPG400-L mailing list archive
Please contact support@xxxxxxxxxxxx for any subscription related
link: http://amzn.to/2dEadiD
Help support midrange.com by shopping at amazon.com with our affiliate
Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books,DVDs & more<http://amzn.to/2dEadiD>
amzn.tomusic, DVDs, videos, electronics, computers, software, apparel &
Online shopping from the earth's biggest selection of books, magazines,
accessories, shoes, jewelry, tools & hardware, housewares, furniture,
sporting goods, beauty & personal care, broadband & dsl, gourmet food &
just about anything else.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list--
To post a message email: RPG400-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
link: http://amzn.to/2dEadiD
Help support midrange.com by shopping at amazon.com with our affiliate
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.