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



I think I would use SQL in one statement:

insert into xx (
select * from final insert into yy values ....
);

this will copy the new generated row from yy and put it into xx






On Thu, May 11, 2023 at 2:58 AM Roger Harman <roger.harman@xxxxxxxxxxx>
wrote:

If you're not comfortable with Python, just use SQL in your favorite tool
(ACS, DBeaver, SQL Workbench/J) and query the SYSCOLUMNS table.
You can order by COLUMN_NAME or ORDINAL position as best suits your need.
Easy to copy/paste out of those tools or export to a text file.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Buck
Calabro
Sent: Wednesday, May 10, 2023 2:44 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: RE: RE: SQL Insert question

On 5/10/2023 4:50 PM, Greg Wilburn wrote:
I thought about using native IO in a sub-procedure just to make this
easier... but doesn't the file "stay open"? I have avoided native IO in
sub-procedures for so long that I don't' recall all the potential issues.

You can make it USROPN and open/close at will.

Buck, thanks for the suggestion. I often manipulate text strings with
Notepad++ for things like this.
I wouldn't know how to use your Python script - I'm clueless here.
Would like to learn though.

Much of the Python/PASE discussion seems to happen over on Ryver, but
I'd be happy to work on a thread either in the main Midrange list, or
the Open Source list.
--buck

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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.