There are two ways to embed an SQL/Pro query in your CL. One way is to create a saved query in SQL/Pro and use the STRQMQRY command in your CL to run it. STRQMQRY is an IBM command and will run on all machines.
The other method of embedding in CL uses the SQL/Pro command RUNPDSQL. Using this command you can build your query dynamically or hard code the query statement in your CL. You will need SQL/Pro installed on any machine that uses this method.