Programming / SQL


Practical SQL: Calling RPG from SQL, Part II PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 04 May 2011 01:00

This second article on combining the strengths of RPG and SQL shows how to turn a stored procedure into a user-defined function (UDF).

joe_plutaWritten by Joe Pluta

In my previous article, I showed you how to create a stored procedure that will invoke an RPG program (or COBOL or CL or any other program, ILE or non-ILE). I also showed you how to test it and even explained the primary shortcoming of stored procedures: they can't be used in SELECT statements. I explained that in order to use external business logic inside of a SELECT statement, you need to use the other SQL extension technique, the user-defined function (UDF). This article shows how to create a UDF that uses your stored procedure.

Add a comment
Last Updated on Wednesday, 04 May 2011 01:00
Read more...
 
User Rating: / 8
PoorBest 
Practical SQL: Calling RPG from SQL, Part I PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 06 April 2011 01:00

This first article on combining the strengths of RPG and SQL focuses on defining and testing stored procedures.

joe_plutaWritten by Joe Pluta

SQL and RPG are powerful and complementary tools. SQL does things well that are difficult or nearly impossible in RPG and vice versa. The trick is to develop programming strategies that take advantage of both. IBM recognized this and created the potent embedded RPG tooling, which allows you to easily take advantage of SQL from within RPG programs. This article is going to focus on the related technique of calling RPG from within SQL.

Add a comment
Last Updated on Wednesday, 06 April 2011 01:00
Read more...
 
User Rating: / 7
PoorBest 
Use SQuirreL SQL During RPG Development with Embedded SQL PDF Print E-mail
Programming - SQL
Written by Thomas Snyder   
Wednesday, 16 March 2011 01:00

Any OS, any programming language, any database—SQuirreL is a perfect fit for almost any situation involving SQL!

tom_snyderWritten by Tom Snyder

In a previous article, I showed you how to install the SQuirreL SQL client to run interactive SQL on your IBM i. With all the new stuff to learn about and all the options that are out there, sometimes a little introduction to the basics will be all it takes to get rolling. In this article, I'll cover some of my favorite features that come with it.

Add a comment
Last Updated on Wednesday, 16 March 2011 01:00
Read more...
 
User Rating: / 1
PoorBest 
An Open-Source DB2 SQL Graphical Tool That You Can Use for All Your Databases PDF Print E-mail
Programming - SQL
Written by Thomas Snyder   
Wednesday, 16 February 2011 01:00

Install SQuirreL SQL client to run interactive SQL on your IBM i.

tom_snyderWritten by Tom Snyder

As you start using embedded SQL more frequently within your RPG code, you'll soon find that your SQL statements are becoming larger and larger and the interactive SQL tool on the green-screen starts becoming quite cumbersome. In this article, I will introduce Squirrel SQL, which is an open-source SQL client that gives you not only a better interface to your DB2 database, but also access to numerous other databases.

Add a comment
Last Updated on Wednesday, 16 February 2011 09:50
Read more...
 
User Rating: / 10
PoorBest 
Practical SQL: SQLCOD and SQLSTT PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 03 November 2010 01:00

This article compares SQLCOD and SQLSTT and shows you how to avoid one of the primary gotchas you face when using SQLSTT.

joe_plutaWritten by Joe Pluta

Embedded SQL programming is one of the most productive additions ever made to the IBM i development environment. But it's rarely used to run the traditional example statements you see in the SQL programming books: statements that increase the price of every item by 15 percent. Instead, the most often used construct in the embedded SQL toolkit is the cursor, which essentially provides a dynamically built logical file to your RPG program. And like any logical file, an essential part of using the file is knowing when you've hit the end. RPG provides two variables: SQLCOD and SQLSTT. SQLSTT is the more standard technique, but its improved accuracy does not come without some cost. Fortunately, that cost is pretty low, and I'll even pick up the tab!

Add a comment
Last Updated on Wednesday, 03 November 2010 01:00
Read more...
 
User Rating: / 6
PoorBest 
Why Use Embedded SQL Within RPG? PDF Print E-mail
Programming - SQL
Written by Thomas Snyder   
Wednesday, 20 October 2010 01:00

Let's evaluate the reasons you might want to take this approach.

tom_snyderWritten by Tom Snyder

You've heard about embedded SQL and maybe you've tried embedded SQL, but you may be asking yourself, "Why would I use embedded SQL?" That's the course that I have taken. Of course, when a new capability comes out, I am usually eager to start digging into it and figuring out how it works. And I have done that with SQL, but I couldn't easily find a reason to justify its use until recently.

Add a comment
Last Updated on Tuesday, 19 October 2010 11:34
Read more...
 
User Rating: / 10
PoorBest 
Create, Format, and Export SQL Dates and Times Using DB2 PDF Print E-mail
Programming - SQL
Written by Thomas Snyder   
Wednesday, 16 June 2010 01:00

After reading this article, you'll never worry about date formats again.

tom_snyderWritten by Tom Snyder

My recent articles on exporting data have generated a number of questions on formatting dates with SQL. So let's explore SQL dates by looking at how to create date fields in physical files, insert dates into physical files, and export the dates in different formats.

Add a comment
Last Updated on Tuesday, 15 June 2010 10:13
Read more...
 
User Rating: / 8
PoorBest 
Now Introducing XML in SQL on DB2 for IBM i! PDF Print E-mail
Programming - SQL
Written by Jonathan Triebenbach   
Wednesday, 14 April 2010 00:00

With 7.1, you can create XML columns, insert XML values, publish XML values, and so much more.

jon_triebenbachWritten by Jon Triebenbach

XML has become the standard for document and data interchange on the Internet and is a key technology in the support for service-oriented architecture (SOA). This open standard allows the interchange of data between closed-architecture and open-architecture data management systems. Its use in SQL has been standardized by the SQL/XML standards and has become an ISO and ANSI standard. IBM has added many features for using XML within SQL in the 7.1 release for IBM i.

Add a comment
Last Updated on Monday, 12 April 2010 16:50
Read more...
 
User Rating: / 1
PoorBest 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 6 of 15

WEBCAST

MC Webcast CenterFEATURED WEBCAST

See What i Can Do With Modern RPG Development

Your applications deserve more than just a new look! Change the perception of the IBM i as “old” with modern development tips from IBM and Profound Logic Software.
Watch as Barbara Morris, Brian May and Alex Roytman dive beneath the GUI surface to show the benefits of:

 

  • Working with free-format RPG in IBM i TR7
  • Breaking free from “The Cycle” of traditional RPG development
  • Going beyond the 10 character limit in display and database files
  • And more!

You'll also see a live demonstration of these techniques as the presenters create a modern web application before your eyes! 

 

Watch the Webinar Now!

 

TRIAL SOFTWARE

MS Office Connector for Query/400

NGS' Qport Office enables Windows users to run IBM Query/400 queries to: 

 - Create and update Excel spreadsheets and Access databases

 - Create Word documents

 - Send to Windows screen and PC printers

No query conversion is required. Works with i5/OS V5R1 & above. Installs in minutes!

If you don’t have a budget to replace IBM Query/400, but want your users to have one click enhanced output of their queries.… Request the online license agreement and product download instructions today!

Offer good through December 31, 2013.

   MC-STORE.COM