Question

  Asked: Apr 28 2008   7:11 AM GMT
  Asked by: VENKYAS400


SQL In CL/400


CL/400, AS/400 and SQL, CL

Could it possibleto write SQL in CL/400 Programing?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Hi,

It is possible to run SQL commands from CL, you can use the RUNSQLSTM command to do this. You can't use embedded SQL (like in RPG or COBOL).

Regards,

Martin Gilbert.
---------
There is a product called SEQUEL from ASC. It has been a number of years since I used it but it had a CL command that would allow you to execute a query (SELECT... FROM ...) right from the command line or CL program.

Also, there is the query tool from IBM, QMQRY, that can execute queries from a CL with the command STRQMQRY. You use the command STRQM to defined/modify the queries. If you have the authority, you can do CREATE/INSERT/DELETE statements as well. (and even execute the statement remotely)

Each of these tools get you closer to the function available in RPG or COBOL, but do fall short of being as flexible as any high-level language.

Hope this helps,
Patrick
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register