Possible to use SQL without having Query? - IBM AS400
This is a discussion on Possible to use SQL without having Query? - IBM AS400 ; Hi,
Just a quick question, if I were to buy an AS/400 without Query/400
installed, would that prohibit me from embedding static or dynamic SQL
in my my C code? Basically what I'm asking is does Query/400 provide
only a ...
-
Possible to use SQL without having Query?
Hi,
Just a quick question, if I were to buy an AS/400 without Query/400
installed, would that prohibit me from embedding static or dynamic SQL
in my my C code? Basically what I'm asking is does Query/400 provide
only a nice green screen UI for SQL, or does it provide the very idea
of SQL on OS/400?
Cheers
Garry
-
Re: Possible to use SQL without having Query?
The database, which includes SQL, is an integrated part of the
operating system.
57xx-QU1 - "Query for iSeries" [AKA Query/400] does not provide any
SQL capability; although it does provide a report writer for local
SELECT requests in STRSQL. STRSQL and HLL pre-compilers are available
with the 57xx-ST1 - "DB2 Query Manager and SQL Development Kit". To
embed SQL in C source, the ST1 product is required for compiles; but the
product could reside on any system, it need not exist where the programs
will be run.
Aside from the product 57xx-ST1, effectively all of the SQL is part
of the i5/OS; all of the run-time anyway, which is why /only/ the OS is
required where the programs run ["only": obviously referenced stored
procedures, functions, etc. must exist]. The same is true for AS/400
with OS/400. Note however that RUNSQLSTM on those prior generations of
the System i family, was part of the ST1 product, whereas on the newer
System i that feature is part of i5/OS.
Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer
thegman wrote:
> Just a quick question, if I were to buy an AS/400 without Query/400
> installed, would that prohibit me from embedding static or dynamic SQL
> in my my C code? Basically what I'm asking is does Query/400 provide
> only a nice green screen UI for SQL, or does it provide the very idea
> of SQL on OS/400?
-
Re: Possible to use SQL without having Query?
Thanks Chuck,
This is pretty much what I thought, I guess it means to write
software, I'm going to need ILE C, and the SQL tools. Thanks a lot.
Garry
On Nov 12, 10:07 pm, CRPence wrote:
> The database, which includes SQL, is an integrated part of the
> operating system.
>
> 57xx-QU1 - "Query for iSeries" [AKA Query/400] does not provide any
> SQL capability; although it does provide a report writer for local
> SELECT requests in STRSQL. STRSQL and HLL pre-compilers are available
> with the 57xx-ST1 - "DB2 Query Manager and SQL Development Kit". To
> embed SQL in C source, the ST1 product is required for compiles; but the
> product could reside on any system, it need not exist where the programs
> will be run.
>
> Aside from the product 57xx-ST1, effectively all of the SQL is part
> of the i5/OS; all of the run-time anyway, which is why /only/ the OS is
> required where the programs run ["only": obviously referenced stored
> procedures, functions, etc. must exist]. The same is true for AS/400
> with OS/400. Note however that RUNSQLSTM on those prior generations of
> the System i family, was part of the ST1 product, whereas on the newer
> System i that feature is part of i5/OS.
>
> Regards, Chuck
> --
> All comments provided "as is" with no warranties of any kind
> whatsoever and may not represent positions, strategies, nor views of my
> employer
>
> thegman wrote:
> > Just a quick question, if I were to buy an AS/400 without Query/400
> > installed, would that prohibit me from embedding static or dynamic SQL
> > in my my C code? Basically what I'm asking is does Query/400 provide
> > only a nice green screen UI for SQL, or does it provide the very idea
> > of SQL on OS/400?
-
Re: Possible to use SQL without having Query?
thegman wrote:
> Hi,
> Just a quick question, if I were to buy an AS/400 without Query/400
> installed, would that prohibit me from embedding static or dynamic SQL
> in my my C code? Basically what I'm asking is does Query/400 provide
> only a nice green screen UI for SQL, or does it provide the very idea
> of SQL on OS/400?
>
The CLI interface could be used for dynamic SQL, and is included in
i5/OS. No other/extra products (eg ST1) are needed to precompile or run
programs that use CLI.
http://publib.boulder.ibm.com/infoce...adpkickoff.htm
--
Karl Hanson
-
Re: Possible to use SQL without having Query?
On Nov 13, 1:38 pm, Karl Hanson wrote:
> thegman wrote:
> > Hi,
> > Just a quick question, if I were to buy an AS/400 without Query/400
> > installed, would that prohibit me from embedding static or dynamic SQL
> > in my my C code? Basically what I'm asking is does Query/400 provide
> > only a nice green screen UI for SQL, or does it provide the very idea
> > of SQL on OS/400?
>
> The CLI interface could be used for dynamic SQL, and is included in
> i5/OS. No other/extra products (eg ST1) are needed to precompile or run
> programs that use CLI.
>
> http://publib.boulder.ibm.com/infoce...ndex.jsp?topic...
>
> --
> Karl Hanson
So that could be used in ILE programs, and previous to V5R4? I'm
looking to get a second-user machine, and I think V5R1 or V5R2 is the
best I can hope for.
Garry
-
Re: Possible to use SQL without having Query?
Yes, CLI would be used in non-SQL HLL ILE [service] programs.
I interpreted the original question to be only embedded SQL per
reference to static. So it may be worth mentioning that all REXX,
QMQRY, and any /program/ [compiled to the oldest release where it will
run] that prepares and executes statements [e.g. the RunSQL feature in
iNav, and other DRDA, ODBC, or JDBC accesses] can also perform dynamic
SQL without any requirement for the system where it runs to have any
products installed beyond the OS.
Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer
thegman wrote:
> On Nov 13, 1:38 pm, Karl Hanson wrote:
>> The CLI interface could be used for dynamic SQL, and is included in
>> i5/OS. No other/extra products (eg ST1) are needed to precompile or run
>> programs that use CLI.
>>
>> http://publib.boulder.ibm.com/infoce...adpkickoff.htm
>
> So that could be used in ILE programs, and previous to V5R4? I'm
> looking to get a second-user machine, and I think V5R1 or V5R2 is the
> best I can hope for.
-
Re: Possible to use SQL without having Query?
thegman wrote:
> On Nov 13, 1:38 pm, Karl Hanson wrote:
>> thegman wrote:
>>> Hi,
>>> Just a quick question, if I were to buy an AS/400 without Query/400
>>> installed, would that prohibit me from embedding static or dynamic SQL
>>> in my my C code? Basically what I'm asking is does Query/400 provide
>>> only a nice green screen UI for SQL, or does it provide the very idea
>>> of SQL on OS/400?
>> The CLI interface could be used for dynamic SQL, and is included in
>> i5/OS. No other/extra products (eg ST1) are needed to precompile or run
>> programs that use CLI.
>>
>> http://publib.boulder.ibm.com/infoce...ndex.jsp?topic...
>>
>
> So that could be used in ILE programs, and previous to V5R4? I'm
> looking to get a second-user machine, and I think V5R1 or V5R2 is the
> best I can hope for.
>
> Garry
>
Yes - CLI has been available for many releases. Here are a few more
links that may be useful:
FAQ:
http://www.ibm.com/servers/eserver/i...db2/clifaq.htm
Online V5R2 documentation:
http://publib.boulder.ibm.com/iserie...mstclilist.htm
http://publib.boulder.ibm.com/iserie...rzadpmst02.htm
http://publib.boulder.ibm.com/iserie...i/rzadpmst.pdf
--
Karl Hanson
-
Re: Possible to use SQL without having Query?
il 12/11/2007 23.07, Scrive CRPence 40725440:
> The database, which includes SQL, is an integrated part of the
> operating system.
>
> 57xx-QU1 - "Query for iSeries" [AKA Query/400] does not provide any
> SQL capability; although it does provide a report writer for local
> SELECT requests in STRSQL. STRSQL and HLL pre-compilers are available
> with the 57xx-ST1 - "DB2 Query Manager and SQL Development Kit". To
> embed SQL in C source, the ST1 product is required for compiles; but the
> product could reside on any system, it need not exist where the programs
> will be run.
>
> Aside from the product 57xx-ST1, effectively all of the SQL is part of
> the i5/OS; all of the run-time anyway, which is why /only/ the OS is
> required where the programs run ["only": obviously referenced stored
> procedures, functions, etc. must exist]. The same is true for AS/400
> with OS/400. Note however that RUNSQLSTM on those prior generations of
> the System i family, was part of the ST1 product, whereas on the newer
> System i that feature is part of i5/OS.
>
> Regards, Chuck
Further more you can execute sql statements via qshell, e.g. from qsh:
db2 'select * frommyschema.mytable'> mytable.txt
outputs the select statement into mytable.txt stream file
--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñe joAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'
-
Re: Possible to use SQL without having Query?
On Nov 14, 10:11 am, "Dr.UgoGagliardelli"
wrote:
> il 12/11/2007 23.07, Scrive CRPence 40725440:
>
> > The database, which includes SQL, is an integrated part of the
> > operating system.
>
> > 57xx-QU1 - "Query for iSeries" [AKA Query/400] does not provide any
> > SQL capability; although it does provide a report writer for local
> > SELECT requests in STRSQL. STRSQL and HLL pre-compilers are available
> > with the 57xx-ST1 - "DB2 Query Manager and SQL Development Kit". To
> > embed SQL in C source, the ST1 product is required for compiles; but the
> > product could reside on any system, it need not exist where the programs
> > will be run.
>
> > Aside from the product 57xx-ST1, effectively all of the SQL is part of
> > the i5/OS; all of the run-time anyway, which is why /only/ the OS is
> > required where the programs run ["only": obviously referenced stored
> > procedures, functions, etc. must exist]. The same is true for AS/400
> > with OS/400. Note however that RUNSQLSTM on those prior generations of
> > the System i family, was part of the ST1 product, whereas on the newer
> > System i that feature is part of i5/OS.
>
> > Regards, Chuck
>
> Further more you can execute sql statements via qshell, e.g. from qsh:
> db2 'select * frommyschema.mytable'> mytable.txt
>
> outputs the select statement into mytable.txt stream file
>
> --
> Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñe joAlcoolInside
> Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
> Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
> schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'
Thanks to everyone that replied, it sounds like I can get full SQL
functionality in my C programs, and I only need ILE C, which is great.
I guess the pre-compiling of SQL would give a bit of a speed boost,
but I'm not really all that bothered about that. CLI looks to be
exactly what I'm after, and the QSH tip is great for just trying out
some SQL, probably don't need Query/400 at all.
Cheers
Garry
-
Re: Possible to use SQL without having Query?
Just to reiterate, Query/400 would not assist well for SQL statement
[testing or prototyping] anyhow, as it is not a pure SQL-based feature.
The QU1 product is merely a report writer providing read-only access
via an effective SELECT [i.e. no ability to code an SQL SELECT, nor any
other SQL statement]. Any of the _other_ methods previously noted as
enabling access to the SQL in DB2 for i5/OS should be used to "try out
some SQL".
Note that the DB2 [command line] in QSH is not an actual /product/
provided on i5/OS, so it may have limitations in what it is able to
provide. As I understand it, a limited number of features were enabled,
only as necessary, to allow some install scripts [which reference those
DB2 functions] to run.
thegman wrote:
> <> the QSH tip is great for just trying out
> some SQL, probably don't need Query/400 at all.