By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

Online SQL query simulation DB2`

P: n/a
Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to
test some SQL to a DB2? In particular to an AS/400. I am learning and find
that the commands, fuctions etc are different than going to an Access DB on
my home PC.

Another thing I am looking for is there a way to simulate on my PC a DB2 so
I can accomplish the same thing in testing SQL. Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a

"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...
Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to
test some SQL to a DB2? In particular to an AS/400. I am learning and find that the commands, fuctions etc are different than going to an Access DB on my home PC.
If you're asking for a web site where you can submit any query you like
against the data accessible at that site, I'd be surprised if you found
anything aside from the www.sql-tutor.com site or something very similar.

I remember asking a similar question a few years back and getting a
resounding silence as an answer; apparently no one could think of anything
like what you are describing.

Finding such a site that accessed an AS/400 seems even less likely than
finding a site that could access one of the other versions of DB2. But, of
course, that is just my gut hunch: I hope I'm wrong and that some else knows
of such a site.
Another thing I am looking for is there a way to simulate on my PC a DB2 so I can accomplish the same thing in testing SQL. Thanks

You could download and install a free copy of DB2 on your PC; then you
wouldn't have to simulate anything. You'd be able to do a lot more than just
execute queries as well: you could create your own tables with any data you
liked in them, insert, update and delete rows, grant and revoke privileges,
and create supporting objects like indexes, tablespaces, bufferpools etc.
You'd also be able to create user-defined functions, stored procedures,
triggers, and all the other things that make up a DB2 system.

Learning the AS/400 is somewhat harder. Although there is a fair bit of
similarity these days between the dialects of SQL used on Windows, Linux,
and Unix platforms, mainframes, and AS/400, the AS/400 still seems to have
the most differences with the other platforms. Then again, that remark might
be out-of-date; I haven't had contact with an AS/400 in several years now.

Does your employer use an AS/400? If yes, you might be able to persuade the
DBA to set up a small "sandbox" for you to let you try things without
interfering with production work. If that isn't possible, perhaps a local
high school or college offers DB2 courses that involve AS/400s.

The other thing to consider is DB2 courses that run on the AS/400. For
example, IBM has a number of courses for DB2 on the AS/400. Naturally, that
might be a bit expensive but you seem very keen; maybe you could persuade
your employer to foot the bill?

One other possibility. At one point, IBM was experimenting with courses on
CD. I think some of those courses had some simulated SQL practice. I'm not
sure if any of those courses are still available or if they had any for the
AS/400 but you could check with the Education group at your country's IBM
office or the IBM website for your country. The CD-based courses were
substantially cheaper than the classroom courses if I recall correctly.

Rhino

Nov 12 '05 #2

P: n/a
If you are looking for a place to use an as400 for free, check out this
link. http://as400.holgerscherer.de/accounteng.html

Chris

Rhino wrote:
"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...
Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to
test some SQL to a DB2? In particular to an AS/400. I am learning and


find
that the commands, fuctions etc are different than going to an Access DB


on
my home PC.


If you're asking for a web site where you can submit any query you like
against the data accessible at that site, I'd be surprised if you found
anything aside from the www.sql-tutor.com site or something very similar.

I remember asking a similar question a few years back and getting a
resounding silence as an answer; apparently no one could think of anything
like what you are describing.

Finding such a site that accessed an AS/400 seems even less likely than
finding a site that could access one of the other versions of DB2. But, of
course, that is just my gut hunch: I hope I'm wrong and that some else knows
of such a site.

Another thing I am looking for is there a way to simulate on my PC a DB2


so
I can accomplish the same thing in testing SQL. Thanks


You could download and install a free copy of DB2 on your PC; then you
wouldn't have to simulate anything. You'd be able to do a lot more than just
execute queries as well: you could create your own tables with any data you
liked in them, insert, update and delete rows, grant and revoke privileges,
and create supporting objects like indexes, tablespaces, bufferpools etc.
You'd also be able to create user-defined functions, stored procedures,
triggers, and all the other things that make up a DB2 system.

Learning the AS/400 is somewhat harder. Although there is a fair bit of
similarity these days between the dialects of SQL used on Windows, Linux,
and Unix platforms, mainframes, and AS/400, the AS/400 still seems to have
the most differences with the other platforms. Then again, that remark might
be out-of-date; I haven't had contact with an AS/400 in several years now.

Does your employer use an AS/400? If yes, you might be able to persuade the
DBA to set up a small "sandbox" for you to let you try things without
interfering with production work. If that isn't possible, perhaps a local
high school or college offers DB2 courses that involve AS/400s.

The other thing to consider is DB2 courses that run on the AS/400. For
example, IBM has a number of courses for DB2 on the AS/400. Naturally, that
might be a bit expensive but you seem very keen; maybe you could persuade
your employer to foot the bill?

One other possibility. At one point, IBM was experimenting with courses on
CD. I think some of those courses had some simulated SQL practice. I'm not
sure if any of those courses are still available or if they had any for the
AS/400 but you could check with the Education group at your country's IBM
office or the IBM website for your country. The CD-based courses were
substantially cheaper than the classroom courses if I recall correctly.

Rhino

Nov 12 '05 #3

P: n/a
chris wrote:
If you are looking for a place to use an as400 for free, check out this
link. http://as400.holgerscherer.de/accounteng.html

Chris

Rhino wrote:
"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...
Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to
test some SQL to a DB2? In particular to an AS/400. I am learning and find
that the commands, fuctions etc are different than going to an Access DB
on my home PC.


If you're asking for a web site where you can submit any query you like
against the data accessible at that site, I'd be surprised if you found
anything aside from the www.sql-tutor.com site or something very similar.

< snip >

Another AS/400 (iSeries) timesharing site is netshare400.com, although
it appears they charge a fee (I have not used the service and have no
connection with it.) A Google Groups search on the newsgroup
comp.sys.ibm.as400.misc will probably turn up similar sites.

--
Karl Hanson
Nov 12 '05 #4

P: n/a

"Karl Hanson" <kc******@youess.ibm.com> wrote in message
news:41********@news1.prserv.net...
chris wrote:
If you are looking for a place to use an as400 for free, check out this
link. http://as400.holgerscherer.de/accounteng.html

Chris

Rhino wrote:
"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...

Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to test some SQL to a DB2? In particular to an AS/400. I am learning and find that the commands, fuctions etc are different than going to an Access DB on my home PC.
If you're asking for a web site where you can submit any query you like
against the data accessible at that site, I'd be surprised if you found
anything aside from the www.sql-tutor.com site or something very similar.

< snip >

Another AS/400 (iSeries) timesharing site is netshare400.com, although
it appears they charge a fee (I have not used the service and have no
connection with it.) A Google Groups search on the newsgroup
comp.sys.ibm.as400.misc will probably turn up similar sites.

Obviously, my information was a little out of date; there *ARE* places that
will let you "play" on an AS/400!

Rhino
Nov 12 '05 #5

P: n/a
Neat!!

I've just gone over there and signed up for an account. I've always wanted
to "play" with DB2/400!

Thanks for mentioning this!

Rhino

"chris" <da**********@hotmail.com> wrote in message
news:YM********************@wideopenwest.com...
If you are looking for a place to use an as400 for free, check out this
link. http://as400.holgerscherer.de/accounteng.html

Chris

Rhino wrote:
"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...
Is there a web page out there like this one ...
http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to
test some SQL to a DB2? In particular to an AS/400. I am learning and


find
that the commands, fuctions etc are different than going to an Access DB


on
my home PC.


If you're asking for a web site where you can submit any query you like
against the data accessible at that site, I'd be surprised if you found
anything aside from the www.sql-tutor.com site or something very similar.
I remember asking a similar question a few years back and getting a
resounding silence as an answer; apparently no one could think of anything like what you are describing.

Finding such a site that accessed an AS/400 seems even less likely than
finding a site that could access one of the other versions of DB2. But, of course, that is just my gut hunch: I hope I'm wrong and that some else knows of such a site.

Another thing I am looking for is there a way to simulate on my PC a DB2


so
I can accomplish the same thing in testing SQL. Thanks


You could download and install a free copy of DB2 on your PC; then you
wouldn't have to simulate anything. You'd be able to do a lot more than just execute queries as well: you could create your own tables with any data you liked in them, insert, update and delete rows, grant and revoke privileges, and create supporting objects like indexes, tablespaces, bufferpools etc. You'd also be able to create user-defined functions, stored procedures,
triggers, and all the other things that make up a DB2 system.

Learning the AS/400 is somewhat harder. Although there is a fair bit of
similarity these days between the dialects of SQL used on Windows, Linux, and Unix platforms, mainframes, and AS/400, the AS/400 still seems to have the most differences with the other platforms. Then again, that remark might be out-of-date; I haven't had contact with an AS/400 in several years now.
Does your employer use an AS/400? If yes, you might be able to persuade the DBA to set up a small "sandbox" for you to let you try things without
interfering with production work. If that isn't possible, perhaps a local high school or college offers DB2 courses that involve AS/400s.

The other thing to consider is DB2 courses that run on the AS/400. For
example, IBM has a number of courses for DB2 on the AS/400. Naturally, that might be a bit expensive but you seem very keen; maybe you could persuade your employer to foot the bill?

One other possibility. At one point, IBM was experimenting with courses on CD. I think some of those courses had some simulated SQL practice. I'm not sure if any of those courses are still available or if they had any for the AS/400 but you could check with the Education group at your country's IBM office or the IBM website for your country. The CD-based courses were
substantially cheaper than the classroom courses if I recall correctly.

Rhino

Nov 12 '05 #6

P: n/a
WOW, thanks for all the responses.

1) I would ask, how do I get the free copy of DB2?

2) If I sign up for the free account, I would assume I could then upload a
DB2 table to it?

3) If I want to test out some SQL to the DB2, I would then need the ODBC
driver on my PC?

4) Can this be done across the internet?

Thanks all for the assist.
"Rhino" <rh****@NOSPAM.sympatico.ca> wrote in message
news:Zv********************@news20.bellglobal.com. ..
Neat!!

I've just gone over there and signed up for an account. I've always wanted
to "play" with DB2/400!

Thanks for mentioning this!

Rhino

"chris" <da**********@hotmail.com> wrote in message
news:YM********************@wideopenwest.com...
If you are looking for a place to use an as400 for free, check out this
link. http://as400.holgerscherer.de/accounteng.html

Chris

Rhino wrote:
"VPaul" <vp*****@NOSPAMPLS.earthlink.net> wrote in message
news:fw*****************@newsread3.news.pas.earthl ink.net...

>Is there a web page out there like this one ...
>http://www.sql-tutor.com/sql_tutor/database.asp that would allow me to>test some SQL to a DB2? In particular to an AS/400. I am learning and
find

>that the commands, fuctions etc are different than going to an Access DB
on

>my home PC.
>

If you're asking for a web site where you can submit any query you like against the data accessible at that site, I'd be surprised if you found anything aside from the www.sql-tutor.com site or something very similar.
I remember asking a similar question a few years back and getting a
resounding silence as an answer; apparently no one could think of anything like what you are describing.

Finding such a site that accessed an AS/400 seems even less likely than finding a site that could access one of the other versions of DB2. But,
of
course, that is just my gut hunch: I hope I'm wrong and that some else knows of such a site.
>Another thing I am looking for is there a way to simulate on my PC a
DB2
so

>I can accomplish the same thing in testing SQL. Thanks
>

You could download and install a free copy of DB2 on your PC; then you
wouldn't have to simulate anything. You'd be able to do a lot more than
just execute queries as well: you could create your own tables with any
data
you liked in them, insert, update and delete rows, grant and revoke privileges, and create supporting objects like indexes, tablespaces, bufferpools etc. You'd also be able to create user-defined functions, stored
procedures, triggers, and all the other things that make up a DB2 system.

Learning the AS/400 is somewhat harder. Although there is a fair bit of similarity these days between the dialects of SQL used on Windows,
Linux, and Unix platforms, mainframes, and AS/400, the AS/400 still seems to have the most differences with the other platforms. Then again, that remark might be out-of-date; I haven't had contact with an AS/400 in several years now.
Does your employer use an AS/400? If yes, you might be able to persuade the
DBA to set up a small "sandbox" for you to let you try things without
interfering with production work. If that isn't possible, perhaps a local high school or college offers DB2 courses that involve AS/400s.

The other thing to consider is DB2 courses that run on the AS/400. For
example, IBM has a number of courses for DB2 on the AS/400. Naturally, that might be a bit expensive but you seem very keen; maybe you could persuade your employer to foot the bill?

One other possibility. At one point, IBM was experimenting with
courses
on CD. I think some of those courses had some simulated SQL practice. I'm not sure if any of those courses are still available or if they had any
for
the AS/400 but you could check with the Education group at your country's IBM office or the IBM website for your country. The CD-based courses were
substantially cheaper than the classroom courses if I recall

correctly.
Rhino


Nov 12 '05 #7

P: n/a
VPaul wrote:
WOW, thanks for all the responses.

1) I would ask, how do I get the free copy of DB2?
You don't need one. DB2 UDB for iSeries is built into OS/400 (now
called i5/OS). There is no separate DB2 product to install, config, etc
. There is a separate product called DB2 Query Mgr and Development
Kit, that provides things like the interactive ("green-screen") SQL
command interface (STRSQL CL command). However that is only one
interface into DB2 that is part of the OS.

2) If I sign up for the free account, I would assume I could then upload a
DB2 table to it?
Not sure what you mean exactly. One way to load data into a table on
iSeries is the Copy From Import File (CPYFRMIMPF) CL command. Provided
you have the disk space needed, you can run DDL statements like CREATE
SCHEMA, CREATE TABLE, etc.

3) If I want to test out some SQL to the DB2, I would then need the ODBC
driver on my PC?
That is one way. iSeries Navigator comes with an ODBC driver, as well
as a facility called Run SQL Scripts. Another option is called DB2
Connect, with an ODBC driver etc. There are other (non-IBM) ODBC
drivers available too. JDBC is another option. Most (if not all) of
these communicate with DB2 on iSeries servers over TCP/IP, so you would
need to check with the timesharing service to determine if they allow
such access.

4) Can this be done across the internet?
See 3 above.

Thanks all for the assist.


Here are a couple links that may be useful to get started:
publib.boulder.ibm.com/pubs/html/as400/infocenter.htm
(expand "Database" in left navigation pane)
www.ibm.com/servers/eserver/iseries/db2/
www.ibm.com/servers/eserver/iseries/navigator/

--
Karl Hanson

Nov 12 '05 #8

P: n/a
May I ask one more question?

I am using the CAST function in a sql query. It seems to run extremely slow
with proper results. Would this be normal? Also if I change the script,
some functions are not valid like CSTR etc; Is this due to my ODBC driver,
or the fact thea I am SQL to DB2 or the OS? I am not sure if the term
function is correct.
Thanks again.

Script is below,

select F4006.OAMLNM, F4006.OAADD1, F4006.OAADD2, F4006.OAADD3, F4006.OACTY1,
F4006.OAADDS, F4006.OAADDZ, F4006.OADOCO, F4006.OAANTY, F4201LA.SHASN,
F4006.OADCTO

from F4006, F4201LA

where F4006.OADOCO = CAST (SUBSTRING('540030 SO',1,6)AS INTEGER) and
F4006.OAANTY = '2' and F4201LA.SHDOCO = F4006.OADOCO and OADCTO = SUBSTRING
('540030 SO',10,2)

The String is actually a scanned input from a barcode. I know that if I
have my application do the parse it would run better. I just don't know how
to do that right now. I have troubl finding where the input variable is
stores. I have coded the string here as fixed text for this example. I do
need the numerical portion returned as a number.


"Karl Hanson" <kc******@youess.ibm.com> wrote in message
news:41********@news1.prserv.net...
VPaul wrote:
WOW, thanks for all the responses.

1) I would ask, how do I get the free copy of DB2?


You don't need one. DB2 UDB for iSeries is built into OS/400 (now
called i5/OS). There is no separate DB2 product to install, config, etc
. There is a separate product called DB2 Query Mgr and Development
Kit, that provides things like the interactive ("green-screen") SQL
command interface (STRSQL CL command). However that is only one
interface into DB2 that is part of the OS.

2) If I sign up for the free account, I would assume I could then upload a DB2 table to it?


Not sure what you mean exactly. One way to load data into a table on
iSeries is the Copy From Import File (CPYFRMIMPF) CL command. Provided
you have the disk space needed, you can run DDL statements like CREATE
SCHEMA, CREATE TABLE, etc.

3) If I want to test out some SQL to the DB2, I would then need the ODBC
driver on my PC?


That is one way. iSeries Navigator comes with an ODBC driver, as well
as a facility called Run SQL Scripts. Another option is called DB2
Connect, with an ODBC driver etc. There are other (non-IBM) ODBC
drivers available too. JDBC is another option. Most (if not all) of
these communicate with DB2 on iSeries servers over TCP/IP, so you would
need to check with the timesharing service to determine if they allow
such access.

4) Can this be done across the internet?


See 3 above.

Thanks all for the assist.


Here are a couple links that may be useful to get started:
publib.boulder.ibm.com/pubs/html/as400/infocenter.htm
(expand "Database" in left navigation pane)
www.ibm.com/servers/eserver/iseries/db2/
www.ibm.com/servers/eserver/iseries/navigator/

--
Karl Hanson

Nov 12 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.