IBM i Global

 View Only

 call a program using ACS and SQL

Miguel Peralta's profile image
Miguel Peralta posted Mon March 02, 2026 08:46 PM

I want to run an RPG or CL program from a PC. Can I use the SQL scripting interface provided by ACS? If so, could you give me an example or a manual to review? What do you recommend? Thanks in advance.

Daniel Gross's profile image
Daniel Gross IBM Champion

Hi Miquel,


yes - you can use "Run SQL Scripts" to call programs. You simply prefix a line with "CL:" and you can execute any CL command you like (as long as it's not "interactive").
Example:
cl:call yourlib/yourpgm ('YourParm');
And you can embed "cl:" lines between SQL statements in the SQL script. This works also with the RUNSQLSTM command on IBM i. 
HTH
Daniel
Islam Aljiraawi's profile image
Islam Aljiraawi

Hello
In addition to Daniel answer 

You can also do the below 
You can use SSH , Do SSH to the server (using IBM PASE for I in background)  then use this command SYSTEM "CALL LIB/PGM"
This will be helpful in case you are in using using .sh script or bat files in windows 


Regards