The CL Corner: A More Flexible Interface to the RUNSQL CL Command PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 27 February 2015 00:00

Support MC Press - Visit Our Sponsors

POPULAR FORUMS

Forums

Search Sponsor

POPULAR SEARCHES

Search

 

In this article, we'll building the SQL request dynamically.

 

In the January 2015 CL Corner, Enhancing WRKQRY Reports the Easy Way, we saw how to create an SQL view for use by WRKQRY using the Run SQL (RUNSQL) CL command. I received quite a few notes asking, among other things, for an example of how to build the RUNSQL SQL parameter using variables rather than the static approach taken in the previous article. So today we'll look at what's required to build the SQL parameter using variables/parameters. For demonstration purposes, we'll continue to use the PROJECTS file that was introduced in the previous article.

 


Bruce Vining
About the Author:

Bruce Vining is president and co-founder of Bruce Vining Services, L.L.C., a firm providing contract programming and consulting services to the System i community (www.brucevining.com). He began his career in1979 as an IBM Systems Engineer in St. Louis, Missouri, and then transferred to Rochester, Minnesota, in 1985, where he continues to reside. From 1992 until leaving IBM in 2007, Bruce was a member of the System Design Control Group responsible for OS/400 and i5/OS areas such as System APIs, Globalization, and Software Serviceability. He is also the designer of Control Language for Files (CLF).

 

A frequent speaker and writer, Bruce can be reached at bvining@brucevining.com.

 

MC Press books written by Bruce Vining available now on the MC Press Bookstore.

 

IBM System i APIs at Work IBM System i APIs at Work

Master APIs with this in-depth, example-rich exploration into these powerful tools.

List Price $89.95
Now On Sale
 
Read More >>
Last Updated on Saturday, 21 February 2015 11:25
 
User Rating: / 0
PoorBest 
   MC-STORE.COM