PDISK on Novell Networks
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 11 APR 1989 | 1.1X | NOVICE | CAPTURE, PRINTING, NETWORK, SPOOL |
With the command PDISK, Advanced Revelation allows the developer to specify that all printer output be redirected to a disk file. The syntax is:
PDISK dos.file.name
If the dos.file.name contains the appropriate path information, the output can be directed to a specific subdirectory or drive.
On Novell networks, however, the output will be truncated when directed to a file on a network drive. When the file is finally viewed or printed, the last page or so will be missing. There are two possible solutions.
The first is to use PDISK to direct output to a local drive. Output directed to a local drive is not truncated.
If the output must go to a network drive, the developer should use the Novell SPOOL or CAPTURE commands instead of PDISK. (Which command is used will depend on which version of NetWare is being run.) Both commands are used to tell the network which print device to use. By using the CREATE switch, both commands allow a filename to be specified as the output device. Figure 1 illustrates this technique.
The /COPIES=0 switch is used to prevent output from going to the printer. The /CREATE G:\AREV\-SALES.RPT switch causes the output to go to a file call ed SALES.RPT in the subdirectory AREV on drive G:.
The file created by SPOOL/CAPTURE must be closed either with another SPOOL/CAPTURE or with an ENDSPOOL or an ENDCAPTURE command.
Since SPOOL and CAPTURE are NetWare commands, they must be executed from the DOS level. Users can execute the Revelation PC command PC to run these NetWare commands from within the Advanced Revelation environment. As an example, examine the commands in Figure 2.
By including the optional keyword EXIT the developer can force the system to skip the Press any key to return to Revelation message. Figure 3 illustrates this technique.
A typical TCL sequence appears in Figure 4.
To execute the same sequence from within an R/BASIC program, the EXECUTE command can be used. Figure 5 is an example of such a sequence.
Figure 1
SPOOL /COPIES=0 /CREATE G:\AREV\SALES.RPT CAPTURE /COPIES=0 /CREATE G:\AREV\SALES.RPT
Figure 2
PC SPOOL /COPIES=0 /CREATE G:\AREV\SALES.RPT PC CAPTURE /COPIES=0 /CREATE G:\AREV\SALES.RPT
Figure 3
PC EXIT SPOOL /COPIES=0 /CREATE G:\AREV\SALES.RPT PC EXIT CAPTURE /COPIES=0 /CREATE G:\AREV\SALES.RPT
Figure 4
PC EXIT CAPTURE /COPIES=0 /CREATE G:\AREV\SALES.RPT LIST SALES BY SALES.REP SALES.REP TOTAL INVOICE.AMT (P) PC EXIT ENDCAPTURE
Figure 5
EXECUTE "PC EXIT SPOOL /COPIES=0 /CREATE G:\AREV\SALES.RPT" EXECUTE "LIST SALES BY SALES.REP SALES.REP TOTAL INVOICE.AMT (P)" EXECUTE "PC EXIT ENDSPOOL"