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

Fellow Minnesotan here - assuming that the company name means you haven't moved to Arizona yet!

Have you looked at the INSERT statement in the SQL Reference? You didn't say what you've tried and what has not worked, nor where you've looked. Sorry to sound pedantic - that kind of information is always helpful here.

Your data structure is going to be called a host structure in the documentation. You specify your DS name with a colon before it in the VALUES() bit of the INSERT statement.

As to books - there is an oldie but goodie - SQL/400 Developer's Guide - by Mike Cravitz and Paul Conte. Still valid.

There are likely things on developerworks - you'll need to dig a bit - http://www.ibm.com/developerworks - and look for the IBM i stuff there - there's a DB2 section that has the latest enhancements and white papers and stuff.

The SQL Reference is a must study. It has lots of short unit examples, so not exactly a how-to document.

You can always look for general SQL stuff on the net - just be careful, as other flavors of DB2 (Windows, Unix, Linux and mainframe) have some differences from ours. And SQL Server and Oracle and MySQL, etc., have there own additions to the standards.

Still, the basic techniques are pretty universal.

You can do well eventually to look at Joe Celko's stuff, like SQL for Smarties - Google his name. It's not aimed at DB2 for IBM i, but still very good stuff.

I just looked at a favorite site for tutorials - http//www.w3schools.com - they have a tutorial on SQL and present it as a universal language for database, so it might be fine for our flavor, which is very much to the standards.

HTH
Vern

On 9/29/2015 2:21 PM, JRusling@xxxxxxxxxxx wrote:
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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.