Oracle Reports and Windows/NT Server 3.51 Command Scheduler

From: Joseph Viau <JoeViau_at_ids.net>
Date: 1997/07/29
Message-ID: <33DE91EE.4B4F_at_ids.net>#1/1


Hi, I have a question.

We are using Developer/2000 Reports Release 2.5.4.0.8 to write some reports, and we are running them on a Windows/NT Server 3.51 environment, with Service Pack 5 installed.

We set the report--a .BAT file that does SQL*Loader and SQL*Plus as part of its processing--up as an icon, and when clicked from the desktop, it works fine. When we try to invoke the same batch job with NT's Command Scheduler, the SQL*Loader and SQL*Plus parts of it work fine, but Oracle Reports complains with a REP-0713: 'Invalid printer name 'lj4-local,LPT1:' specified by parameter DESNAME'. I have checked the name through Print Manager/Properties, and know that this is the right name to use.

I have placed SET statements inside the batch file to best emulate the environment that is there when I double-click on the batch process icon. I did a SET statement to see what the environment variables were, printed them, and inserted them into the BAT file.

Here is the command file (some names have been changed to protect the innocent). Be concerned only with the "NOLOAD" label--the problem occurs at the R25RUN execution:

NB.BAT
path=c:\winnt35\system32;c:\winnt35;c:\orant\bin;c:\pwrchute;   c:\orawin\bin;
set HOMEDRIVE=C:
set temp=c:\temp
set tmp=c:\temp
set USERDOMAIN=MYDOMAIN
set USERNAME=Administrator
cd \applic\prod\batch
IF NOT EXIST c:\applic\prod\data\incoming\nb2kn.dat GOTO NOLOAD
:NEWBORN

SQLLDR73 parfile=c:\applic\prod\sqlload\parfile\newborn.par ERASE c:\applic\prod\data\incoming\nb2kn.old RENAME c:\applic\prod\data\incoming\nb2kn.dat nb2kn.old
:NOLOAD

PLUS33 -s batch01/<password>_at_prod
_at_C:\applic\prod\batch\runfiles\run_nb.sql cd \applic\prod\reports
cls
set <----- Allows me to check out environment variables pause
R25RUN CMDFILE=C:\Applic\PROD\BATCH\NB.CMD

NB.CMD:
MODULE=prtotals.rep USERID=batch01/<password>_at_prod FILE_PARM='NB' DESTYPE=Printer DESNAME=lj4-local,LPT1: PRINTJOB=no PARAMFORM=no LOGFILE=NB.LOG ERRFILE=NB.ERR
DESFORMAT=C:\ORAWIN\REPORT25\PRINTERS\HPL.PRT BATCH=no

The NB.CMD file is actually one very long line, but is wrapped for convenience and readability. BATCH=yes results in this file not being able to find the HPL.PRT driver necessary to produce the report; the printer is a LaserJet 5Si.

I have tried every conceivable combination for the DESNAME parameter--name within quotes, the printer name in quotes but not the LPT1: part, etc.--but it seems like something is "unhooked" when I use the Command Scheduler rather than double-clicking the icon. I even tried to use the shorter share name, 'lj4-loca' to no avail.

It would be REEEEAAL nice to be able to print the report when the batch process is complete. This is truly an annoyance.

Does anyone have a clue, or can someone give me a dollar so I can buy one?

Thanks in advance for any and all time spent.

-- 
 ---------------------------------------
| JoeViau_at_ids.net | Beware of Data Base |
|                 | Administrators with |
|                 | screwdrivers.       |
 ---------------------------------------
Received on Tue Jul 29 1997 - 00:00:00 CEST

Original text of this message