Please enable JavaScript to view this site.

A-Shell Consolidated Reference

command = sbx:GDIPRT {,<option1>, <option2>, <option3>...}

(Unix/Linux only.) GDIPRT.SBX is a print filter subroutine intended only for use in a COMMAND statement within a printer ini file, which performs the function of transferring the file from the Unix/Linux server to the workstation, where it be will be resubmitted to an AshLite printer of the same name (as the printer originally requested on the server). The usual motivation would be to take advantage of Windows printing features that would otherwise be unavailable on a Unix or Linux server.

The standard version of GDIPRT requires that the workstation have a network connection to the server, using the ZTERM terminal emulator, as it uses ZTERM escape sequences to perform an FTP file transfer. You could modify the source code to work for other terminal emulators or other file transfer methods.

The procedure works as follows:

The file is submitted to the print on the server (say, to printer "prt1").
The printer ini file (e.g. ashcfg:prt1.pqi or sys:prt1.ini) invokes the GDIPRT subroutine via the COMMAND statement as shown above.
The GDIPRT subroutine first attempts to detect if the terminal emulator is ZTERM, it aborts with STATUS=-2.
It then opens the print file and scans it, looking for IMAGE and METAFILE statements. For any that are found, the corresponding files are transferred to the PC’s temp directory (see <dir> option in the following table.)
The print file itself is then transferred to the PC.
AshLite is launched on the PC, passing it the command PRINT PRT1=<print file>. Note that the printer name, in this case PRT1, will be the same as for the original print request. If the AshLite launch fails, it will return STATUS=-3.
Otherwise, we assume that the operation succeeded and return STATUS=0 (so that we do not try to print it on the server.)

The option parameters may be used to specify any of the following options (expressed as quoted, literal strings):

Value

Meaning

"VERBOSE"

Causes a dialog box to appear during the transfer operation showing details of the various steps. Useful for debugging, or just to have something to look at.

"DEBUG"

Causes AshLite to be launched with a visible window, and to not automatically exit on completion of the print command (thus making it easier to see what may have gone wrong). If VERBOSE was also specified, then the subroutine (on the server) will wait for an acknowledgment from the user before removing the display box.

"LOG"

Causes the subroutine to log details about the operation to the log file opr:gdiprt.log

"<dir>"

Any string containing a backslash or colon, e.g. c:\temp, will cause the routine to use the specified directory as the temporary working directory on the PC. Otherwise, if ZTERM build 143+ is detected, it will use the %TEMP% environment variable, else it will use c:\temp.