Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL RPG vs. Read/Chain RPG

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I don't mean to start a holy war, but lately I have REALLY liked programing in SQL verses the reads and chains of RPG lately. I don't do strickly SQL, but the main processing is SQL. Why? I can join and sort all of my data first before I start processing.

One of my programs I am joining 5 files together before processing, then it is simply fetch and print. With optimizing the statement per my faq317-3546 I get really fast speeds from this. Yes, you can't do SQL in free format, but I still like it.

I was thinking though. Does anyone here know the SQL API's? If we could code subprocedures around those API's people should then be able to use SQL functions in free format. Any thoughts or suggestions?

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
after compiling your rpg program with embedded sql, try checking the spooled file for the compilation. instead of seeing your sql statements, you could see there the API's used by your SQL statements togeteher with its corresponding parameters. I've tried using these routines in my pgm instead of the SQL statements, and it worked.
 
Cool... I never thought of that. I will try it. I would like to make it generic enough that I can include it into the iseries toolkit on sourchforge.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top