12.2. Code Repositories Supported by PLVio
The various programs in the PLVio package that manage the source and target repositories and that read and write lines of text are independent of the particular sources and targets. When you call put_line, for instance, you do not write code that says "write this line to a file." You simply "say" with your code: "Write this line to the target." You define the target independently of the actual read and write commands. This separation of logical and physical aspects of PL/SQL code I/O makes it easy to support a wide range of repositories—and to add to that range as PL/SQL's capabilities expand.
When I first built PLVio, I was working with Release 2.1 of the PL/SQL language. I was able, therefore, to write PLVio to read to and write from database tables, but I could not read and write operating system files. That feature was not available until Release 2.3. I was still able to build the package and put it to use throughout PL/Vision. When Release 2.3 became available, I enhanced PLVio to support this new repository option and, with the simple act of a recompile only of the PLVio package body, my existing utilities could now manipulate PL/SQL source code in operating system files!
The PLVio package supports the following types of repositories:
Operating system file (server side)
Standard output (the screen, usually)
You set the source by calling PLVio.setsrc: you set the target by calling PLVio.settrg ...