SQL In CL/400

75 pts.
Tags:
AS/400 and SQL
CL
CL/400
Could it possibleto write SQL in CL/400 Programing?
ASKED: April 28, 2008  7:11 AM
UPDATED: April 28, 2008  1:25 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following