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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why should you use SQL on the iSeries? 2

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
the only two acknowledgments I needed to start using a overwhelming amount of SQL over other means are
1) efficiency
2) stadardization

In my particular line of work as a consultant I am thrown (literally) into numerous different situations with different systems in place. After becoming familiar with SQL that made those situations become much less stressful. That doesn't really stop there though if your not a consultant. in you're everyday job SQL can be used to do so much more then people assume it can do or what it is used for. you can write entire applications (virtually) in SQL with little to null intervention from other languages.

If I had to convey one language to a beginner or someone new to IT it would be SQL. It is and almost always has been the backbone language of how utilizing what is available to you to ge tthe job done better and quicker.

___________________________________________________________________
onpnt2.gif

The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
 
BTW: Excellent tip iSeriesCodePoet

___________________________________________________________________
onpnt2.gif

The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
 
I have been using it in my more complicated programs where a join would be nessisary. I'll tell you what, it sure helps in increasing the speed in which you program. I can't vouch if the program speed is faster, but development time sure is.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Thanks for vaulable tip. I want to learn SQL and don't have time to go thru the site yet. So I just take the short cut here.
I want to code SQL in RPG. How do I let RPG recognize that these codes are SQL.

Hope someone can help me.
Thanks in advance.
 
Hi,

After I insert this line
C/Exec SQL

into my program and hit enter, I got highlighted on this statement and an error msg 'Compliler directive not recognized; directive ignored.'

C is on position 6
/ is on position 7

What else do I need? I can use STRSQL at the command line.

 
Thanks iSeriesCodePoet. It works now.
 
Excellent site that Koldark, iSeriesCodePoet. I would like to see it in your blog.
 
ISeriesCodePoet, in response to your original question....

I use SQL on the AS400 in three ways:-

1) Great for quick mass database fixes or test data
modifications.

2) Very handy for fast report generation that requires
parameters. When I joined my current company they
had loads of queries that were mannually submitted
each week by an operator changing a date range.
I quickly converted them to QMQRY objects
using RTVQMQRY so they could be passed parameters
automatically based on run date.

Not as efficient as writing a program but quick to
code.

3) SQL on one machine is pretty similar to SQL on another
machine. I work a bit with SQL server and VB now
so its nice to have a common thread between the three.


Dazed and confused
 
Yes, and I think with free-format and SQL another programmer that knows those "other" languages, would be able to quickly decipher what is going on and fix or modify a program. Since they know SQL does this, and they wouldn't know exactly what "chain" is.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
SQL is grrOO in popularity. Much so that my company was asked to train a highly respected banking company's programmers in this. Once you've begun, you'll never want to stop. You guys have any tips I can include in my course?
 
There is a few good ones in other threads in this forum. Take a look. I know there is one about commitment that is good.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Hey Skittle, I've just replied to your other post and suggested using SQL - I'm glad to see you already have some knowledge here. I didn't know you were already into QM queries when I did the post.

The only problem I have is when I go to a customer site where they don't have SQL. Interactive SQL (STRSQL command) is great for all of the things you said but if they don't have it you can get round it using this technique


I still don't know who owns the web site, only that it originally came from Midrange Computing.

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
There are other SQL packages out there that would work as well. I can't remeber any of them, but I know they are out there.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Sorry Skittle, I'm getting a bit confused about who posted what - I noticed your name in a something posted by someone else.

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
Hello Skittle,

I read your post and have a question:

I too, am with a company that has loads of queries that are mannually submitted.
What can you tell me about converting to QMQRY objects? I do not know how do do this. Any info would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top