I'm trying to run some SQL commands from within a CLP using RUNSQL REQUEST('.....'), but am running into a problem that this method seems to allow a maximum of 550 characters in a REQUEST call. Does anyone have any suggestions on other ways I might be able to do this where the length of the query won't matter?
Announcement
Collapse
No announcement yet.
RUNSQL in CLP REQUEST too long
Collapse
X
-
Re: RUNSQL in CLP REQUEST too long
You could try using RUNSQLSTM instead to run your statements from a source file.
By the way, maybe you know this but the RUNSQL command that has keywork REQUEST is actually not an IBM command. It came out a long time ago to fill that need and has worked well for people. However, be aware that IBM has now come out with its own RUNSQL command that will conflict with your RUNSQL command as soon as you get to a certain PTF level in i6.1 or i7.1. You can read about this issue here: http://www.itjungle.com/fhg/fhg053012-story01.html
-
Re: RUNSQL in CLP REQUEST too long
And by the way, IBM's RUNSQL command allows SQL statements up to 5000 characters. You can read about it here: http://publib.boulder.ibm.com/infoce...bafyrunsql.htm
Comment
-
Re: RUNSQL in CLP REQUEST too long
Thanks for the info, I was not aware of those things. I'm basing this off some older code I found at the company I work at. But since I already got it to work by calling it through an RPG program, I'll probably just leave it at that. This was just a one off thing to help out with running a bunch of SQL for an install instead of having someone with command line access do it. But I will definitely keep that in mind in the future.
Comment
-
Re: RUNSQL in CLP REQUEST too long
Originally posted by DeadManWalks View PostI'm am confused. You have a SQLRPGLE and you call a CL to issue a RUNSQL? Why? Me thinks that SQLRPGLE can run SQL. No?I'm not anti-social, I just don't like people -Tommy Holden
Comment
-
Re: RUNSQL in CLP REQUEST too long
Happy Friday and always remember:
"CL is a language for small children & farm animals"
Even with subroutines!All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: RUNSQL in CLP REQUEST too long
Get better LivestockAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: RUNSQL in CLP REQUEST too long
Originally posted by jamief View PostHappy Friday and always remember:
"CL is a language for small children & farm animals"
Even with subroutines!
That's why we still don't have native GUI on this platform; IBM blew the development budget when they added subroutine capabilities to CL.Michael Catalani
IS Director, eCommerce & Web Development
Acceptance Insurance Corporation
www.AcceptanceInsurance.com
www.ProvatoSys.com
Comment
Comment