on 05-27-2008 9:43 AM
dear as/400 guru,
i wonder how to execute sql statement in green screen ?
my statement would be something as below
select mandt from sapr3.usr02 where bname='kent';
basically i want to check my id "kent" is available in which clients in an instance. and i was advised to run above sql statement.
comment and advice will be highly appreciated.
thanks
regards,
kent
as/400 newbie
Hi Kent,
You can find IBM's doc. for the QShell SQL Utility at http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp?topic=/rzahz/rzahzdb2utility.h...
The format is a bit different in that utility then in STRSQL or SQLUTIL but I think the problem with your statement is that the library name is incomplete; it should read:
db2 "select mandt from r3siddata.usr02 where bname='kent';"
where sid is the system id of your SAP system.
Regards,
Sally Power
Dev. Support for SAP in IBM i
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent,
if you are looking for something, that reminds the old SQLs and uses a "/" for the delimiter, get the free STR(CON)SQL tool :
http://www.easymarketplace.de/strsql-sqlutil.php
If you do not receive a mail within 15 minutes, please drop me a mail, I will then reply with the user & pwd ...
Regards
Volker Gueldenpfennig, consolut international ag
http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de
Kent,
You can use Mocha to connect to AS/400 and login as <SID>ADM
Once you are in the green screen at the commeand level type: strsql
It will open an SQL Utility for you
Then you can run: select mandt, bname from usr02 where bname='<USER ID>'
Thank You
Reg,
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent.
If you are on the green screen try command STRSQL. If that is not available you can try SQLUTIL. If that is not available too you can use the following:
- Start the Shell QSH
You can enter SQL-Statements after the prompt:
$
db2 "<sql-statement>"
Best regards,
Jan Stallkamp
PS:
Please don't call people 'gurus' in your postings. Some don't like it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jan,
thanks for your PS advice.
when i execute the commands u provided, it prompted below
Command SQLUTIL in library *LIBL not found.
Command STRSQL in library *LIBL not found.
for
qsh
> db2 "select mandt from sapr3.usr02 where bname='kent';"
after enter nothing happen. i wonder if the sql statement is correct.
regards,
kent
HI,
are you talking about which green screen?
you can execute query in i series navigator.
regards,
kaushal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.