You've been embedding SQL in RPG programs, but did you know that you can use RPG in SQL?
You are well aware that you may use embedded SQL in RPG programs, but did you know that you can use RPG in SQL? Just as RPG allows you to define your own built-in functions (BIFs) by writing subprocedures, SQL allows you to define your own functions. But even more powerful is the fact that an SQL function can actually call an RPG program or subprocedure. If the program or subprocedure returns a single value, it may be used as a scalar function that provides a value for a column; it may also be used to calculate a value in a column.
You can connect and edit, but now it’s time to manage your source. This tutorial shows you how.
Welcome to the fourth in our series of ongoing WDSC tutorials.
In previous tutorials, I showed you how to configure your workbench and connect to your host and, most recently, how to open a source member for editing. Programming is more than just editing source, though. In this fourth tutorial, I'll show you how to manage your environment, including creating a library and copying a source file, all from within WDSC. I'll even show off the versatility of WDSC by giving you a couple of alternate ways to do the same things.