This from a program of mine. C2 is a datastructure:
D C2_t DS qualified template
D RPROD like(FRT_t.RPROD)
D RTWHS like(FRT_t.RTWHS)
D ROPNO like(FRT_t.ROPNO)
D FLDNAM 10
D WAS 50
D NOW 50
D USR 10
D PGM 10
D C2 DS likeds(C2_t) INZ
exec sql insert into QTEMP/SS6185AUD
values(:C2);
From: JRusling@xxxxxxxxxxx
To: "RPG programming on the IBM i \(AS/400 and iSeries\)"
<rpg400-l@xxxxxxxxxxxx>
Date: 09/30/2015 11:28 AM
Subject: Syntax for Insert into using an rpg data structure, 1 row
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
I have a data structure populated in an rpg program, and i'd like to
insert (using sql) a row into a work file, using the data structure data.
The work file definition and the rpg data structure match.
Anyone have the syntax for this?
os 7.2, free form rpg.
As well, can anyone steer me to a good iseries sql book?
One with more of a cookbook approach as in
How do i do this?
How do i do that?
Even better if theres lots of embedded sql examples.
Thanks,
John
John Rusling
Senior Developer/Analyst
Quadion LLC
Minnesota Rubber & Plastics
<br />
The information in this email is confidential and may be legally
privileged.
It is intended solely for the addressee. Access to this email by anyone
else is
unauthorized. If you are not the intended recipient, any disclosure,
copying,
distribution or any action taken or omitted to be taken in reliance on it,
is
prohibited and may be unlawful.
--
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:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.