We can use RunQry command. But i want to call a query file from a Control Language Program.
Doesn’t the runqry command have the query file and library as the first parameter? Alternatively if you wan to query a file without creating a query then you can use runqry *n flielib/file rcdslt(*yes)
Alternativelty if yuo want to satrt getting really sophisticated then have a look at Query Manager as that will allow you to dynamically build a query programmatically.