Host command execution

From: Simon <jb85_at_dial.pipex.com>
Date: 1996/04/26
Message-ID: <4lql4f$6qq_at_soap.news.pipex.net>#1/1


Re-post - I think my PC lost the original post!



Could anyone help me out here please?

I'm trying to write a PL/SQL package which will involve a couple of operating system commands; if I were writing this in SQL*Plus, I'd use the HOST command, but I'm not sure if the equivalent exists in PL/SQL. What I want to achieve is the following:

  1. Output a line to a file (in order to build up a print file)
  2. Send a file to a printer

As an example, what I would like to do in the case of b: is something like this:

	OPEN c_printer	/* Cursor to printer names table */
	LOOP
		FETCH c_printer into destination;
		HOST ("np -q " + destination + " filename");
		EXIT WHEN c_printer%NOTFOUND;
	END LOOP;

Would this work? If not, is there a simple way round it?

Many thanks in advance!

Details:	Designer 2000 v1.2
		HP-UX 10.01 GBR
		Oracle 7.1.4
Received on Fri Apr 26 1996 - 00:00:00 CEST

Original text of this message