Rocket U2 | UniVerse & UniData

 View Only

 How to modify the banner page to include the report name

Jon Kristofferson's profile image
Jon Kristofferson posted 05-21-2021 17:24
All,

We have a large number of reports printed each day. Users will contact our admin staff to find out why a print job did not print. We get some reports that have a banner page with no other output or no records selected. We would like to identify what report was run and generated no or vague output. Is there some way to modify the banner/separator page to include the report name? Is there a way to force Retrieve to print the headings when no records are selected? I think one way would be to pass the USEROPTS from the SETPTR command to a script grab that and try to keep a list of print jobs and the USEROPTS file in a file somewhere, but it seems really convoluted.
Manu Fernandes's profile image
PARTNER Manu Fernandes
hi Jon,

First at first, are you running under unix or windows ? 
- under windows, we use SETPTR BANNER option to set the name of the job, these name if the job name you see under windows spooler - you can use RETAIN to not delete the jobs after printed. We overload the SETPTR verb to add banner, if not set by the caller, we use from system(9001) call stack.
- under linux, we use a script which catch the uvspooler job, his params and the useropt to store all spooled jobs into a 'log of jobs' - metadata of the spooljob - job size, page count, user, time stamp, ... content of the job 
 #get the args ; the shift kill the first arg from the list, the all are read from $1, as 'first arg' 
   uv_uid=$1      ; echo "  \$1 = uv_uid      : $1" >> $logfile ; shift  ;# userid = uv @LOGNAME 
   uv_jobnr=$1    ; echo "  \$2 = uv_jobnr    : $1" >> $logfile ; shift  ;# job nr , same as displayed on SETPTR 
   uv_jobsize=$1  ; echo "  \$3 = uv_jobsize  : $1" >> $logfile ; shift  ;# job size in byte
   uv_banner=$1   ; echo "  \$4 = uv_banner   : $1" >> $logfile ; shift  ;# banner set by SETPTR BANNER
   uv_form=$1     ; echo "  \$5 = uv_form     : $1" >> $logfile ; shift  ;# form name requested
   uv_printer=$1  ; echo "  \$6 = uv_printer  : $1" >> $logfile ; shift  ;# printer name requested
   uv_7=$1        ; echo "  \$7 = uv_7        : $1" >> $logfile ; shift  ;# line lenght from SETPTR
   uv_8=$1        ; echo "  \$8 = uv_8        : $1" >> $logfile ; shift  ;# page lenght from SETPTR
   uv_9=$1        ; echo "  \$9 = uv_8        : $1" >> $logfile ; shift  ;# eject flag from SETPTR 1/0
   uv_10=$1       ; echo "  \$10 = uv_10      : $1" >> $logfile ; shift  ;# banner flag print it 1/0
   uv_useropts=$* ; echo "  \$11 = uv_useropts : $*" >> $logfile ; shift ;# USEROPTS options - one string​


hi hope this help 
manu