Õ¼í SP.BCKººÀSP.BCKCBACK/BLOCK=8192/TRUNC/LOG [] 63.971"everhart password"::SP.BCK/SAVE SYSTEM ¨žs+‘lšX69V _COB2:: € V6.2  Þð*[FW]FREEWARE_README.TXT;1+,d./ 4Iÿ-` 0ú123KÿPWO56€ú2 \‚™7 [DŒc˜89GHˆºJÿIScan Printers, SYSTEM MANAGEMENT, Automatically restarting stopped queues< Scan Printers periodically scans printers queues and sends @ requests to several "operators" for stalled, paused or stooped C queues. It can also restart these queues and release holding jobs.ð*[FW]SCAN_PRINTERS.COM;28+,g.</ 4e<<rÿ-` 0ú123KÿPWO=56€^׆Ö–7 „DŒc˜89GHˆºJÿ$! 'f$verify(0)'H$!**********************************************************************3$! SCAN_PRINTERS.COM V2.6@$! Procédure permettant de surveiller les queues d'impression%$! (Historique en fin de procédure)H$!**********************************************************************$!!$ on error then goto stop_process#$ on warning then goto stop_process$!G$ scan_table=f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")1$ say :== write/error=err_logfile sys$output$$ deftable :== if scan_table then -A define/system/nolog/executive/table=SCNPRT_TABLE "$ deftable SCNPRT$STATE "STARTING"$! A$ scan_reqclass = f$trnlnm("SCNPRT$REQUEST_CLASS","SCNPRT_TABLE") $ if scan_reqclass.eqs."" then -' scan_reqclass = "PRINTER"$!$ set output_rate = 00:00:30($ time = f$time() ! Getting time stampK$ curnode = f$getsyi("nodename") ! 3 lines for getting node name !!!K$ if curnode .eqs. "" then curnode = f$edit(f$getsyi("scsnode"),"collapse")F$ if curnode .eqs. "" then curnode = f$trnlnm("sys$node") - "::" - "-"J$ clusternode = f$trnlnm("sys$cluster_node") -"::" ! Getting cluster name2$ if clusternode .eqs. "" then clusternode=curnode)$ scan_version="V2.6" ! Current version\$ request/to=('scan_reqclass') "%SCNPRT-I-STARTING, Starting at ''time' on node ''curnode'"Q$ say " SCAN_PRINTERS - ''scan_version' - Starting at ''time' on node ''curnode'"C$ if f$getsyi("cluster_member").and. curnode.nes.clusternode then -M say " Member of VAXCluster ''clusternode'"$!,$! Check to see if process has enough privs.$ if scan_table 4$ then ! We need SYSNAM for modifying SCNPRT_TABLE5$ scan_privs = "SYSNAM,SYSPRV,OPER,TMPMBX,NETMBX"$ elseQ$ scan_privs = "SYSPRV,OPER,TMPMBX,NETMBX" ! No system log. name specifcation$ endif"$ if .not. f$privilege(scan_privs)2$ then ! Sorry, not enough privsR$ req_message="%SCNPRT-E-NOPRIVS, Needing following privs to run : ''scan_privs'"$ say "''req_message'"0$ request/to=('scan_reqclass') "''req_message'"$ goto stop_process$ endif$!H$! Check to see difference in version between startup and this procedureQ$ temp = f$edit(f$trnlnm("SCNPRT$VERSION","SCNPRT_TABLE"),"TRIM,COLLAPSE,UPCASE")$ if temp.nes.scan_version$ then/$ if temp.nes."" ! Is SCNPRT$VERSION define ?$ then$ req_message= -] "%SCNPRT-W-VERMIS, Startup version ''temp' and Process version ''scan_version' mismatch"$ say "''req_message'"2$ request/to=('scan_reqclass') "''req_message'"$ endif,$ deftable SCNPRT$VERSION "''scan_version'"$ endif$!$ say ""$!2$! Defining logical tests for testing opened files$ stat_open :== -^ f$trnlnm("""temp_stat""","""LNM$PROCESS""",,,,"""TABLE_NAME""").eqs."""LNM$PROCESS_TABLE"""$ mail_open :== -^ f$trnlnm("""temp_mail""","""LNM$PROCESS""",,,,"""TABLE_NAME""").eqs."""LNM$PROCESS_TABLE"""$!$$! Defining f$fao strings parametersI$ fao_start_ok = "%SCNPRT-I-STARQUE, Queue !AS (!AS) has been restarted"J$ fao_start_bad = "%SCNPRT-E-STARQUE, Queue !AS (!AS) cannot be restarted"N$ fao_hold_ok = "%SCNPRT-I-RELEASE, Entry !SL in queue !AS has been released"O$ fao_hold_bad = "%SCNPRT-E-RELEASE, Entry !SL in queue !AS cannot be released"?$ fao_log = "!/%SCNPRT-W-!AS, Queue !AS (!AS) !AS at !AS"<$ fao_req = "%SCNPRT-W-!AS, Queue !AS (!AS) found !AS"$ fao_subj = -P "ScnPrt !AS, Mail Report for !SL problem!0%C!1%C!%Es!%F on !SL found, pass !SL"$ fao_job = -e"%SCNPRT-I-STAT, !AS has !SL executing job!0%C!1%C!%Es!%F, !SL pending, !SL retained and !SL holding"B$ fao_pbstat = "!/%SCNPRT-E-!AS, error !AS statistics file !AS"E$ fao_crestat = "!/%SCNPRT-I-CRESTAT, Creating statistics file !AS"*$ fao_cpsmsg = "CPS message was :!/!AS"*$ fao_dqsmsg = "DQS message was :!/!AS"$!@$ scan_nb_pass=0 ! Initializing number of scanning passes&$ BEGIN: ! Beginning of scanning pass$!M$ deftable SCNPRT$LAST_SCAN_BEGIN "''f$time()'" ! Positionning beginning pass?$ deftable SCNPRT$STATE "SCANNING" ! logical names$ scan_nb_pass=scan_nb_pass + 12$ deftable SCNPRT$SCANNING_PASS "''scan_nb_pass'" $!7$! Defining parameters from logicals or default settingA$ scan_exclude = f$trnlnm("SCNPRT$EXCLUSION_FILE","SCNPRT_TABLE")E$ scan_statistics = f$trnlnm("SCNPRT$STATISTICS_FILE","SCNPRT_TABLE")@$ scan_wrkdir = f$trnlnm("SCNPRT$WORK_DIRECTORY","SCNPRT_TABLE")@$ scan_restart = f$trnlnm("SCNPRT$RESTART_QUEUE","SCNPRT_TABLE")K$ scan_restart = f$edit(f$extract(0,1,scan_restart),"UPCASE,TRIM,COLLAPSE")0$ if scan_restart.eqs."" then scan_restart = "N"?$ scan_release = f$trnlnm("SCNPRT$RELEASE_HOLD","SCNPRT_TABLE")K$ scan_release = f$edit(f$extract(0,1,scan_release),"UPCASE,TRIM,COLLAPSE")0$ if scan_release.eqs."" then scan_release = "N"C$ scan_nocluster = f$trnlnm("SCNPRT$IGNORE_CLUSTER","SCNPRT_TABLE")O$ scan_nocluster = f$edit(f$extract(0,1,scan_nocluster),"UPCASE,TRIM,COLLAPSE")4$ if scan_nocluster.eqs."" then scan_nocluster = "Y";$ scan_mailuser :== 'f$trnlnm("SCNPRT$MAIL","SCNPRT_TABLE")B$ scan_queuetype :== 'f$trnlnm("SCNPRT$QUEUE_TYPE","SCNPRT_TABLE")@$ scan_mailstop = f$trnlnm("SCNPRT$MAIL_ON_STOP","SCNPRT_TABLE")9$ if scan_queuetype.eqs."" then scan_queuetype="SYMBIONT"@$ scan_queuetype = f$edit(scan_queuetype,"UPCASE,TRIM,COLLAPSE")$ scan_mailstalled = -> f$integer(f$trnlnm("SCNPRT$MAIL_ON_STALLED","SCNPRT_TABLE"))G$ scan_priority = f$integer(f$trnlnm("SCNPRT$PRIORITY","SCNPRT_TABLE"))0$ base_priority = f$integer(f$getjpi("","PRIB"))B$ if scan_priority.eq.0 .or. scan_priority.gt.base_priority then -+ scan_priority = base_priorityA$ scan_reqclass = f$trnlnm("SCNPRT$REQUEST_CLASS","SCNPRT_TABLE") $ if scan_reqclass.eqs."" then -' scan_reqclass = "PRINTER"D$ scan_hib_delay = f$trnlnm("SCNPRT$HIBERNATE_DELAY","SCNPRT_TABLE")8$ if scan_hib_delay.eqs."" ! Hibernate delay processing$ then$ scan_hib_delay = "00:15:00".$ deftable SCNPRT$HIBERNATE_DELAY "00:15:00"$ else$ define/user sys$error nl:$ define/user sys$output nl:7$ temp = f$cvtime("''scan_hib_delay'","delta","time")$ status = $status$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then "$ scan_hib_delay = "00:15:00"1$ deftable SCNPRT$HIBERNATE_DELAY "00:15:00" $ endif$ endifI$ scan_exp_alt_date = f$trnlnm("SCNPRT$EXPECTED_ALT_DATE","SCNPRT_TABLE")F$ if scan_exp_alt_date .nes. "" ! expected alterz@) SP.BCKg` [FW]SCAN_PRINTERS.COM;28eÿ<nate date processing $ then$ define/user sys$error nl:$ define/user sys$output nl:8$ temp = f$cvtime("''scan_exp_alt_date'","COMPARISON")$ status = $status$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then =$ scan_exp_alt_date = f$cvtime("18:00:00","comparison")3$ deftable SCNPRT$EXPECTED_ALT_DATE "18:00:00"$ else$ scan_exp_alt_date = temp $ endifN$ scan_alt_hib_delay = f$trnlnm("SCNPRT$ALT_HIBERNATE_DELAY","SCNPRT_TABLE")H$ if scan_alt_hib_delay.eqs."" ! Alternate hibernate delay processing$ then)$ scan_alt_hib_delay = scan_hib_delay=$ deftable SCNPRT$ALT_HIBERNATE_DELAY "''scan_hib_delay'"$ else$ define/user sys$error nl: $ define/user sys$output nl:=$ temp = f$cvtime("''scan_alt_hib_delay'","delta","time")$ status = $status$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then -$ scan_alt_hib_delay = scan_hib_delay@$ deftable SCNPRT$ALT_HIBERNATE_DELAY "''scan_hib_delay'" $ endif $ endif$ endifA$ scan_spec_days = f$trnlnm("SCNPRT$SPECIAL_DAYS","SCNPRT_TABLE")@$ if scan_spec_days.nes."" ! Special days hib. delay processing$ thenS$ scan_spec_hib_delay = f$trnlnm("SCNPRT$SPECIAL_HIBERNATE_DELAY","SCNPRT_TABLE")L$ if scan_spec_hib_delay.eqs."" ! Special days hibernate delay processing$ then&$ scan_spec_hib_delay = "23:59:59"F$ deftable SCNPRT$SPECIAL_HIBERNATE_DELAY "''scan_spec_hib_delay'"$ else$ define/user sys$error nl: $ define/user sys$output nl:>$ temp = f$cvtime("''scan_spec_hib_delay'","delta","time")$ status = $status$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then *$ scan_spec_hib_delay = "23:59:59"I$ deftable SCNPRT$SPECIAL_HIBERNATE_DELAY "''scan_spec_hib_delay'" $ endif $ endif$ endif$!N$ set proc/priority = 'f$integer(scan_priority)' ! Modifying process priority=$ if scan_nocluster.eqs. "Y" ! Cluster name processing ?$ then$ cluster = curnode$ else$ cluster = clusternode$ endif?$ temp = f$getqui("CANCEL_OPERATION") ! Clear Context $ scan_pb = 0$ scan_mail_pb = 0$!3$ QUEUE_LOOP: ! Beginning of queues scanning loop$!L$ Queuename = f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*","''scan_queuetype'")J$ IF Queuename .EQS. "" then goto END ! there are no more queues to find.$!)$! Get informations on the current queue. $ Stalled = -W f$getqui("DISPLAY_QUEUE","QUEUE_STALLED","*","''scan_queuetype',FREEZE_CONTEXT") $ Stopped = -W f$getqui("DISPLAY_QUEUE","QUEUE_STOPPED","*","''scan_queuetype',FREEZE_CONTEXT") $ Paused = -V f$getqui("DISPLAY_QUEUE","QUEUE_PAUSED","*","''scan_queuetype',FREEZE_CONTEXT")$ Hold_job = -[ f$getqui("DISPLAY_QUEUE","HOLDING_JOB_COUNT","*","''scan_queuetype',FREEZE_CONTEXT")$ Queue_status = ""K$ IF Hold_job.ne.0 .and. scan_release.eqs."Y" THEN Queue_status = "holding"*$ IF Stalled THEN Queue_status = "stalled"*$ IF Stopped THEN Queue_status = "stopped")$ IF Paused THEN Queue_status = "paused"$!E$! Continue in queues scanning if status of current queue is "normal"$ If Queue_Status .eqs. "" $ then J$ if f$type('queuename'_stalled_count).nes."" then delete/symbol/nolog -H 'queuename'_stalled_count$ goto queue_loop$ endif$!G$ EXCLUSION_SEARCH: ! Search current queue in exclusion file if defined$ if scan_exclude.nes.""$ then$ define/user sys$output nl:$ define/user sys$error nl:B$ search/noexact/nooutput/nolog 'scan_exclude' "#''queuename'#"S$ if $status.eqs."%X08D78053" then goto found_pb ! Not found in exclusion fileS$ if $status.nes."%X00000001" then goto excl_err ! Exclusion file search error$ goto queue_loop$ endif$! 0$ FOUND_PB: ! Beginning of problem processing:$ if queue_status.nes."holding" then scan_pb = scan_pb+1C$ If Queue_Status .eqs. "stalled" ! Increment stalled counter for$ then ! current queue 2$ if f$type('queuename'_stalled_count).nes."" $ then A$ 'queuename'_stalled_count = 'queuename'_stalled_count + 1 $ else%$ 'queuename'_stalled_count = 1 $ endif$ elseL$ if f$type('queuename'_stalled_count).nes."" then delete/symbol/nolog -J 'queuename'_stalled_count$ endif 6$ if (.not. 'mail_open') .and. scan_mailuser.nes."" $ then$$ if queue_status.nes."stalled" $ then$ gosub open_mail $ else)$ if (scan_mailstalled.nes.0 .and.-C 'queuename'_stalled_count .ge. scan_mailstalled) then - gosub open_mail $ endif $ endif<$ scan_repuser = f$trnlnm("SCNPRT$MESSAGE","SCNPRT_TABLE") $ Node = -V f$getqui("DISPLAY_QUEUE","SCSNODE_NAME","*","''scan_queuetype',FREEZE_CONTEXT")$ Device = -U f$getqui("DISPLAY_QUEUE","DEVICE_NAME","*","''scan_queuetype',FREEZE_CONTEXT")$ Pend_job = -Y f$getqui("DISPLAY_QUEUE","PENDING_JOB_COUNT","*","''scan_queuetype',FREEZE_CONTEXT")$ Exec_job = -[ f$getqui("DISPLAY_QUEUE","EXECUTING_JOB_COUNT","*","''scan_queuetype',FREEZE_CONTEXT")$ Reta_job = -Z f$getqui("DISPLAY_QUEUE","RETAINED_JOB_COUNT","*","''scan_queuetype',FREEZE_CONTEXT")$ Node_string = ""J$ IF node .NES. "" THEN Node_string = f$fao("on !AS::!AS", node, device)P$ if f$locate("@",node_string) .lt. f$length(node_string) then gosub trans_aro5$ say f$fao(fao_log,f$edit(Queue_status,"UPCASE"),-4 Queuename,Node_string,-E Queue_status,f$extract(0,16,f$cvtime()))T$ if exec_job.ne.0 .or. pend_job.ne.0 .or. reta_job.ne.0 .or. hold_job.ne.0 then -H say f$fao(fao_job,queuename,exec_job,pend_job,reta_job,hold_job)?$ req_message = f$fao(fao_req,f$edit(Queue_status,"UPCASE"),-: Queuename,Node_string,-0 Queue_status)1$ request/to=('scan_reqclass') "''req_message'"$ if scan_repuser.nes."" then -B reply/bell/nonotif/user=('scan_repuser') "''req_message'"+$ if scan_mailuser.nes."" .and. 'mail_open'$ then $$ if queue_status.nes."stalled" $ then$ gosub write_mail $ else)$ if (scan_mailstalled.nes.0 .and.-D 'queuename'_stalled_count .ge. scan_mailstalled) then -  gosub write_mail $ endif$ endif$!&$! Restart queue if stopped and neededG$ if (queue_status.eqs."paused" .or. queue_status.eqs."stopped").and. - scan_restart.eqs."Y" $ then$ on error then continue$ on warning then continue $ define/user sys$error nl: $ define/user sys$output nl:$ start/queue 'queuename'$ status = $status%$ on error then goto stop_process'$ on warning then goto stop_process$ if status $ then $ fao_start = fao_start_ok $ else!$ fao_start = fao_start_bad $ endif:$ req_message = f$fao(fao_start,Queuename,Node_string)$ say "''req_message'"3$ request/to=('scan_reqclass') "''req_message'"#$ if scan_repuser.nes."" then -? reply/bell/nonotif/user=('scan_repuser') "''req_message'"6$ if scan_mailuser.nes."" .and. 'mail_open' then -< write temp_mail f$fao(fao_start,Queuename,Node_string)$ endif$!$$! Release holding jobs if activatedE$ if hold_job.ne.0 .and. scan_releà¾Â= SP.BCKg` [FW]SCAN_PRINTERS.COM;28eÿ<’‡ase.eqs."Y" then gosub release_hold$!L$ if scan_statistics.nes."" ! Go ahead in statistics collecting if activated$ then%$ deftable SCNPRT$STATE "STATISTICS"$ gosub stat_file#$ deftable SCNPRT$STATE "SCANNING"$ endif$!6$ GOTO QUEUE_LOOP ! Continue in queues scanning loop$!K$! All queues have been scanned, close statistics file, sending mail before $! waiting $ END: ! End of scanning pass'$ if 'stat_open' then close temp_stat($ if 'mail_open' then gosub send_mail $!/$ deftable SCNPRT$LAST_SCAN_END "''f$time()'")$ if scan_exp_alt_date.eqs."" .or. - 9 scan_exp_alt_date .ges. f$cvtime("","comparison") $ then)$ deftable SCNPRT$STATE "HIBERNATE"$ wait 'scan_hib_delay'.$ else ! Wait alternate delay if it's time'$ deftable SCNPRT$STATE "HIB_ALT"!$ wait 'scan_alt_hib_delay'R$ if scan_spec_days.nes."" then gosub special_days ! Special days processing $ endif$ goto begin$!;$ WRITE_MAIL: ! Writing record pb in mail file subroutineD$ if queue_status.nes."holding" then scan_mail_pb = scan_mail_pb+1A$ write temp_mail f$fao(fao_log,f$edit(Queue_status,"UPCASE"),-1 Queuename,Node_string,-B Queue_status,f$extract(0,16,f$cvtime()))B$ scan_cps_message=f$trnlnm("CPS$''queuename'_''queue_status'",-2 "LNM$SYSTEM_TABLE")$ if scan_cps_message.nes."" $ then $ scan_cps_message= -B f$extract(1,f$length(scan_cps_message)-2,scan_cps_message): write temp_mail f$fao(fao_cpsmsg,scan_cps_message)$ endif 9$ scan_dqs_message=f$trnlnm("DQS$STATUS_''queuename'",-2 "LNM$SYSTEM_TABLE")$ if scan_dqs_message.nes."" $ then $ scan_dqs_message= -B f$extract(1,f$length(scan_dqs_message)-2,scan_dqs_message): write temp_mail f$fao(fao_dqsmsg,scan_dqs_message)$ endif A$ if exec_job.ne.0 .or. pend_job.ne.0 .or. reta_job.ne.0 .or. -$ hold_job.ne.0 then -P write temp_mail f$fao(fao_job,queuename,exec_job,pend_job,reta_job,hold_job)6$ if f$type('queuename'_stalled_count).nes."" then -8 delete/symbol/nolog 'queuename'_stalled_count $ return$!3$ RELEASE_HOLD: ! Release holding jobs subroutine*P$ scan_enumb = f$getqui("display_job","entry_number",,"holding_jobs,all_jobs")$$ if scan_enumb.eqs."" then return$ scan_pb = scan_pb + 1"$ on error then continue$ on warning then continue$ define/user sys$error nl: $ define/user sys$output nl:"$ set entry/release 'scan_enumb'$ status = $status#$ on error then goto stop_process %$ on warning then goto stop_processr $ if statusQ$ then$ fao_hold = fao_hold_oke$ else$ fao_hold = fao_hold_bad $ endifP4$ req_message=f$fao(fao_hold,scan_enumb,queuename)$ say "''req_message'"1$ request/to=('scan_reqclass') "''req_message'"i!$ if scan_repuser.nes."" then -f= reply/bell/nonotif/user=('scan_repuser') "''req_message'"l.$ if scan_mailuser.nes."" .and. 'mail_open' $ then s;$ write temp_mail f$fao(fao_hold,scan_enumb,queuename)o&$ scan_mail_pb = scan_mail_pb + 1 $ endife$ goto release_holdo$ return$! $ TRANS_ARO:$ TRANS_ARO_LOOP:e$ aro=f$locate("@",node_string)a!$ if aro.lt.f$length(node_string) $ then ',$ node_string[aro*8,8]=%XE0 ! à character$ goto trans_aro_loop$ endifi$ return$!.$ OPEN_MAIL: ! Opening mail file subroutine'$ if scan_mailuser.eqs."" then return !$ scan_pid = f$getjpi("","pid")m@$ scan_mail_file:=="''f$parse("SCNPRT_MAIL_"+scan_pid+".DAT",-1 scan_wrkdir,"SYS$SCRATCH")'" 4$ if scan_mail_file.eqs."" then goto mail_open_err;$ open/write/err=mail_open_err temp_mail 'scan_mail_file'p $ return$!.$ SEND_MAIL: ! Sending mail file subroutine'$ if 'mail_open' then close temp_mails$ if scan_mailuser.nes."" $ then&$ on error then goto send_mail_err($ on warning then goto send_mail_err%$ deftable SCNPRT$STATE "MAILING"_ $ mail-  /subject=-M "''f$fao(fao_subj,scan_version,scan_mail_pb,scan_pb,scan_nb_pass)'" -  /Personal=- ? "Scan Printers Process ''scan_version' on ''curnode'" -P 'scan_mail_file' - 'scan_mailuser' $ endife#$ on error then goto stop_processs%$ on warning then goto stop_processt/$ if f$search(scan_mail_file) .nes."" then - S4 delete/nolog/noconfirm 'scan_mail_file' $ return$!4$ SPECIAL_DAYS: ! Special days processing routine$ SPECIAL_DAYS_BEGIN:aK$ scan_weekday=f$edit(f$extract(0,3,f$cvtime("TODAY",,"WEEKDAY")),"UPCASE") B$ if f$locate(scan_weekday,f$edit(scan_spec_days,"UPCASE")) .ne. - f$length(scan_spec_days)$ then+$ deftable SCNPRT$STATE "HIB_SPECIAL")$ wait 'scan_spec_hib_delay' $ goto special_days_begint$ endif"$ return$!8$ WRITE_STAT_FILE: ! Writing record in stat. file sub.,$ on error then goto err_write_stat_file.$ on warning then goto err_write_stat_file$ if 'stat_open'$ thentG$ fao_stat_str="!AS/!AS/!AS/!AS/!AS/!AS/!SL/!SL/!SL/!SL/!AS/!AS/!AS"_$ job_name=""$ file_spec=""!$ user_name="" $ processor=-P f$getqui("display_queue","processor","*","''scan_queuetype',freeze_context")$ form_name=-P f$getqui("display_queue","form_name","*","''scan_queuetype',freeze_context")$ lib_spec=-n\ f$getqui("display_queue","library_specification","*","''scan_queuetype',freeze_context")C$ write/error=err_write_stat_file temp_stat f$fao(fao_stat_str,-e? f$extract(0,16,f$cvtime()),cluster,queuename,node,device,-lH f$edit(queue_status,"UPCASE"),exec_job,pend_job,reta_job,hold_job,-" processor,form_name,lib_spec)$ if exec_job.ne.0c $ then$ job_name=- A f$getqui("display_job","job_name",,"all_jobs,executing_jobs")"$ user_name=-P f$getqui("display_job","username",,"freeze_context,all_jobs,executing_jobs")$ scan_enumb=-bT f$getqui("display_job","entry_number",,"freeze_context,all_jobs,executing_jobs")$ file_spec=-[ f$getqui("display_file","file_specification",,"freeze_context,all_jobs,executing_jobs")P=$ fao_stat_str="!AS/!AS/!AS/!AS/!AS/!AS/!AS/!AS/!SL/!AS"sE$ write/error=err_write_stat_file temp_stat f$fao(fao_stat_str,-,A f$extract(0,16,f$cvtime()),cluster,queuename,node,device,-I6 "STAT",job_name,user_name,scan_enumb,file_spec) $ endif$ endif$ goto end_write_stat_filet6$ ERR_WRITE_STAT_FILE: ! Error writing in stat. fileI$ req_message = f$fao(fao_pbstat,"WRITERR","writing in",scan_statistics)a$ say "''req_message'"n0$ request/to=('scan_reqclass') "''req_message'"3$ if scan_mailuser.nes."" .and. 'mail_open' then -i# write temp_mail "''req_message'",$ scan_statistics=""s$ close temp_stat$ end_write_stat_file:$ return$!-$ STAT_FILE: ! Stat. processing subroutineA$ on error then continuef$ on warning then continueu$ if 'stat_open'C$ then $ gosub write_stat_file"$ else :$ scan_statistics=f$parse(scan_statistics,scan_wrkdir,-E "SYS$SCRATCH:SCAN_PRINTERS.STAT",,"SYNTAX_ONLY")".$ if f$search("''scan_statistics'").eqs."" $ thenS $ define/user sys$output nl: $ define/user sys$error nl:$$ create/nolog 'scan_statistics'$ status = $status$ if .not. status $ thenM$ req_message = f$fao(fao_pbstat,"CREATERR","creating",scan_statistics)i$ say "''req_message'"5$ requesàXs…- SP.BCKg` [FW]SCAN_PRINTERS.COM;28eÿ<D‹,t/to=('scan_reqclass') "''req_message'"n8$ if scan_mailuser.nes."" .and. 'mail_open' then -( write temp_mail "''req_message'"$ scan_statistics="" $ else8$ req_message = f$fao(fao_crestat,scan_statistics)$ say "''req_message'"5$ request/to=('scan_reqclass') "''req_message'"8$ if scan_mailuser.nes."" .and. 'mail_open' then -( write temp_mail "''req_message'"$ gosub open_stat_file $ endifc $ elsey$ gosub open_stat_file $ endif$ endif"$ on error then goto stop_process$$ on warning then goto stop_process$ return$!3$ OPEN_STAT_FILE: ! Opening stat. file subroutine#$ on error then goto stat_open_erru%$ on warning then goto stat_open_errrJ$ open/append/share=write/error=stat_open_err temp_stat 'scan_statistics'$ gosub write_stat_file$ goto end_open_stat-$ STAT_OPEN_ERR: ! Error opening stat. file$E$ req_message= f$fao(fao_pbstat,"OPENERR","opening",scan_statistics)a$ say "''req_message'"t0$ request/to=('scan_reqclass') "''req_message'"3$ if scan_mailuser.nes."" .and. 'mail_open' then -e# write temp_mail "''req_message'""$ scan_statistics=""s$ end_open_stat:$ return$!-$ ERR_LOGFILE: ! Error writing in log file.#$ deftable SCNPRT$STATE "STOPPING"_!$ request/to=('scan_reqclass') -,0 "%SCNPRT-F-OPENERR Error writing in Log file"$ goto stop_process$!/$ EXCL_ERR: ! Error accessing exclusion file#$ deftable SCNPRT$STATE "STOPPING"NG$ say "%SCNPRT-F-OPENERR Error opening exclusion file ''Scan_exclude'""!$ request/to=('scan_reqclass') -sC "%SCNPRT-F-OPENERR Error opening exclusion file ''Scan_exclude'"t$ goto stop_process$!,$ MAIL_OPEN_ERR: ! Error opening mail file#$ deftable SCNPRT$STATE "STOPPING"eD$ say "%SCNPRT-F-OPENERR Error opening mail file on ''Scan_wrkdir'"!$ request/to=('scan_reqclass') -t@ "%SCNPRT-F-OPENERR Error opening mail file on ''Scan_wrkdir'"$ goto stop_process$!,$ SEND_MAIL_ERR: ! Error sending mail file#$ deftable SCNPRT$STATE "STOPPING"PF$ say "%SCNPRT-F-SENDERR Error sending mail file to ''Scan_mailuser'"!$ request/to=('scan_reqclass') -(= "%SCNPRT-F-SENDERR Error sending mail to ''Scan_mailuser'".$ goto stop_process$!&$ STOP_PROCESS: ! Exiting procedure$ on error then continue$ on warning then continue $ say -"I "%SCNPRT-F-STOPERR Process stopped on error, please consult Log file"s"$ request/to=('scan_reqclass') -J "%SCNPRT-F-STOPERR Process stopped on error , please consult Log file"#$ deftable SCNPRT$STATE "STOPPED"e$ if scan_mailstop.nes."" $ then y $ say -J "%SCNPRT-I-SENDMAIL Sending error mail message to ''scan_mailstop'"%$ request/to=('scan_reqclass') -pJ "%SCNPRT-I-SENDMAIL Sending error mail message to ''scan_mailstop'" $ mail- /subject=-:: "SCAN PRINTERS STOPPED ON ERROR ON ''clusternode'"- /Personal=-> "Scan Printers Process ''scan_version' on ''curnode'" - nl: - 'scan_mailstop' $ endif /$ deftable SCNPRT$LAST_SCAN_END "''f$time()'"s$ exit$!H$!**********************************************************************D$! Creation : A. FONTANEL V1.0 - Matra Espace$!M$! Modifications : H. MERCUSOT - 06/91 V2.0 - Cap Sesa ExploitationeD$! * Renommage de SURV_IMPRIMANTES en SCAN_PRINTERS.H$! * Ré-écriture complete de la procédure pour lancement($! en process détaché.2$! * Utilisation de noms logiques./$! * Envoi de Request et REPLY.,$! FM$! Modifications : H. MERCUSOT - 06/91 V2.1 - Cap Sesa ExploitationDG$! * Adjonction du module statistique et du nom logique(,$! SCNPRT$STATISTICS_FILE.;$! * Test des privilèges donnés au process.SM$! * Test de la disparité entre la version de SCNPRT_STUP.COMu+$! et de cette procédure._$!M$! : H. MERCUSOT - 07/91 V2.2 - Cap Sesa ExploitationtK$! * Possibilité d'avoir un delai d'hibernation secondaire tJ$! SCNPRT$ALT_HIBERNATE_DELAY à partir d'une date donnée2$! par SCNPRT$EXPECTED_ALT_DATE.M$! * Déplacement de certains modules pour optimiser les temps-+$! de l'interpréteur DCL. G$! * Modifications de Control_Strings de f$fao pour desS+$! problèmes de pluriels.oD$! * Déplacement de la translation des noms logiquesM$! SCNPRT$MAIL et SCNPRT$MAIL_ON_STALLED en début de passe.tO$! * Modification de la signification de SCNPRT$MAIL_ON_STALLEDoJ$! si indéfini ou = 0 -> Pas de mail pour queue stalled,J$! sinon mail si la queue est stalled après le nombre deN$! passes dont la valeur est égale à SCNPRT$MAIL_ON_STALLED.I$! * Creation d'un label write_mail: pour l'écriture dansa3$! le fichier temporaire de mail.!L$! * Mise à jour du nom logique SCNPRT$SCANNING_PASS qui estH$! égal au nombre de passes effectuées par le process.$!M$! : H. MERCUSOT - 08/91 V2.3 - Cap Sesa ExploitationfK$! * Possiblité de faire un SET ENTRY/RELEASE pour les jobs M$! trouvés en holding. Choix par SCNPRT$RELEASE_HOLD (Y/N). P$! Un pseudo-etat HOLDING est créé pour une queue trouvée avec&$! des jobs holding.E$! * Modification du test des privilèges nécessaires.aF$! * Décomposition de l'enregistrement des stat. en 2 K$! enregistrements. Le premier concerne la queue, le 2eme N$! n'existe que si le nombre de jobs executing est different$! de 0.N$! * Adjonction de SCNPRT$QUEUE_TYPE qui permet de définir surK$! quel type de queue on veut travailler. Attention aucun :$! test de validité. (Défaut "SYMBIONT")J$! * Adjonction d'un en début de la Control_string deK$! F$FAO pour creation et erreur pour le fichier de stat.X9$! * Suppression du symbole scan_logfile.IN$! * Modification de l'incrémentation des compteurs scan_pb etP$! scan_mail_pb pour considérer qu'un job hold est une erreur.$!M$! : H. MERCUSOT - 10/91 V2.4 - Cap Sesa Exploitation$?$! * Possibilité d'attendre SCNPRT$SPECIAL_HIBERNATE_DELAY M$! après attente de SCNPRT$ALT_HIBERNATE_DELAY si on est unx;$! jour defini dans SCNPRT$SPECIAL_DAYS. nK$! * Modification des symboles de test des fichiers ouvertsuK$! pour limiter les tables recherchées au niveau process.,P$! * Modification du test des privilèges nécessaires en fonction4$! de l'existence de SCNPRT_TABLE.N$! * Adjonction dans le message du mail du message d'erreur de%$! CPS s'il existe.i$!M$! : H. MERCUSOT - 02/92 V2.5 - Cap Sesa ExploitationnP$! * Modification message de demarrage envoyé en request a cause%$! faute de frappe.mM$! * Modification du module STOP_PROCESS pour envoi d'un mailt<$! à SCNPRT$MAIL_ON_STOP eà|/W SP.BCKg` [FW]SCAN_PRINTERS.COM;28eÿ<Ù;t mise à jour de)$! SCNPRT$LAST_SCAN_END K$! * Adjonction de la valeur MAILING pour SCNPRT$STATE lors :$! de l'envoi d'un mail en fin de passe.J$! * Changement du 2eme champ ds fichiers stat., celui-ci N$! contient le nom du cluster au lieu du nom de n÷ud si l'onJ$! est en cluster avec un alias au niveau DECNet et que 2$! SCNPRT$IGNORE_CLUSTER est NO.$!M$! : H. MERCUSOT - 07/92 V2.6 - Cap Sesa Exploitation N$! * Remplacement de @ par à dans la variable Node_string pour3$! probleme REPLY et REQUEST pour queues MSA.'N$! * Adjonction dans le message du mail du message d'erreur de$! DQS s'il existe._H$!**********************************************************************ð*[FW]SCNPRT026.RELEASE_NOTES;4+,j./ 4P,ÿ-` 0ú123KÿPWO56€DûÞŒc˜7 ,‰ßŒc˜89GHˆºJÿ SCAN PRINTERS V2.6 --------------------C SCAN PRINTERS est un utilitaire développé pour permettre d'alléger@ la charge de surveillance des queues d'impression sur OpenVMS à partir de la version 5.2@ Cet outil a été conçu de manière à être rapidement opérationnelC sur le site où on l'installe, et est donc facilement paramétrable  et facile à mettre en ÷uvre. I - PRINCIPE de FONCTIONNEMENTA Lancé en principe en process détaché au démarrage du système son4 principe de fonctionnement de base est le suivant :? - Scrutation toutes les 15 minutes des queues d'impression non génériques.A - Envoi d'un message à l'operateur PRINTER pour toute imprimanteB trouvée dans l'état "stalled", "paused", "stopped" ou ayant des jobs holding.@ Toutes ces anomalies sont répertoriéees dans un fichier journal SYS$MANAGER:SCAN_PRINTERS.LOGD Il n'a besoin d'être activé que sur un seul membre d'un VAXCluster.7 1992 - H. MERCUSOT - Cap Sesa Exploitation   II - PARAMETRAGEG Le principe du paramétrage de la procédure est basée sur l'utilisationC de noms logiques définis dans une table partagée au niveau systèmeE SCNPRT_TABLE. Si cette table n'existe pas, le logiciel prend toutes  les valeurs par défaut.& Ces noms logiques sont les suivants :P SCNPRT$HIBERNATE_DELAY Durée d'attente entre chaque scrutation des queues+ d'impression. Défaut : 00:15:00M SCNPRT$EXPECTED_ALT_DATE Date ou Heure à partir de laquelle ce n'est pasI SCNPRT$HIBERNATE_DELAY qui est utilisé mais$ SCNPRT$ALT_HIBERNATE_DELAY.1 Défaut : 18:00:00; SCNPRT$ALT_HIBERNATE_DELAY Durée d'attente une fois que H SCNPRT$EXPECTED_ALT_DATE est atteint. Une 0 fois cette durée utilisée, on réutiliseF SCNPRT$HIBERNATE_DELAY jusqu'à atteindreI une nouvelle fois SCNPRT$EXPECTED_ALT_DATE. Défaut : 14:00:00H SCNPRT$SPECIAL_HIBERNATE_DELAY Durée d'attente une fois que l'on sortJ d'une attente de SCNPRT$ALT_HIBERNATE_DELAY K et que l'on est un jour dont le nom se trouveO dans la liste SCNPRT$SPECIAL_DAYS. Une fois cetteN durée utilisée, on teste à nouveau le jour pour A voir s'il est encore dans la liste K SCNPRT$SPECIAL_DAYS s'il l'est on attend une L nouvelle fois SCNPRT$SPECIAL_HIBERNATE_DELAY, E sinon on repart en phase de scrutation.I Si SCNPRT$SPECIAL_DAYS n'est pas défini ce 6 nom logique ne sert pas. Défaut : 23:59:59 J SCNPRT$SPECIAL_DAYS Liste de noms de jours pour lesquels on veutL attendre SCNPRT$SPECIAL_HIBERNATE_DELAY. CetteK liste est composée de noms en anglais séparésH par une virgule et doit être entourée de "B SCNPRT$REQUEST_CLASS Classe OPCOM pour envoi des REQUEST. Défaut : PRINTERJ SCNPRT$MESSAGE Usernames auxquels seront envoyés des REPLY.L La liste des usernames doit être entourée de " Défaut : aucunI SCNPRT$MAIL Usernames auxquels seront envoyés des MAIL I (1 par passe) sur les problèmes rencontrés O lors d'une passe de scrutation. Cette liste doit J être entourée de " et composée de usernames 3 accessibles par MAIL. Défaut : aucunN SCNPRT$MAIL_ON_STOP Usernames auxquels seront envoyés des MAIL si leN process SCAN PRINTERS vient à s'arrêter suite à ) une erreur.M Cette liste doit être entourée de " et composée@ de usernames accessibles par MAIL. Défaut : aucun L SCNPRT$MAIL_ON_STALLED Ce nom logique donne le nombre de fois où une N imprimante doit être trouvée "stalled" avant de 6 faire l'objet d'un MAIL. Défaut : 0 (Aucun MAIL): SCNPRT$PRIORITY Priorité du process détaché. Défaut : 2K SCNPRT$RESTART_QUEUE Tentative de redémarrage des queues "stopped"I ou "paused" par un START/QUEUE. (YES ou NO) Défaut : NOM SCNPRT$RELEASE_HOLD SET ENTRY/RELEASE des jobs holding d'une queue.) (YES ou NO) Défaut : NON SCNPRT$WORK_DIRECTORY Directory temporaire. Pour les fichiers de MAIL. Défaut : SYS$SCRATCHI SCNPRT$STATISTICS_FILE Nom d'un fichier où seront enregistrées desP statistiques sur les queues trouvées en anomalies. Défaut : aucunK SCNPRT$EXCLUSION_FILE Nom d'un fichier où sont stockés les noms desJ queues que SCAN PRINTERS ne doit pas prendreD en compte s'il les trouve en anomalie.C (Les noms doivent être entourés de #) Défaut : aucunL SCNPRT$IGNORE_CLUSTER Détermine si dans le fichier statistique, seraL enregistré le nom du n÷ud ou le nom du cluster6 ou tourne SCAN PRINTERS., Défaut : YES< La modification de la valeur d'un de ces noms logiques est N automatiquement prise en compte à la prochaine passe de SCAN PRINTERS.D Les autres noms logiques visibles dans la table SCNPRT_TABLE sontG mis à jour par le process détaché et uniquнÓF SP.BCKj` [FW]SCNPRT026.RELEASE_NOTES;4Pÿ×1 ement si cette table  existe.2 SCNPRT$VERSION Version du logiciel.A SCNPRT$LAST_SCAN_BEGIN Date de début de la dernière passe.M SCNPRT$LAST_SCAN_END Date de fin de la dernière passe ou d'arrêt par- SCNPRT_SHUT.COM/ SCNPRT$STATE Etat du process :J SCANNING : Scrutation des queues en cours.M STATISTICS : En cours d'écriture sur le fichier; de statistiques.L MAILING : Envoi d'un mail en fin de passe à6 SCNPRT$MAIL7 HIBERNATE : En attente, G durée SCNPRT$HIBERNATE_DELAY6 HIB_ALT : En attente,K durée SCNPRT$ALT_HIBERNATE_DELAY6 HIB_SPECIAL: En attente,O durée SCNPRT$SPECIAL_HIBERNATE_DELAYM STOPPING : En cours d'arrêt aprés une erreur.C STOPPED : Arrêté aprés une erreur.H STOPPED BY : Arrêté par un utilisateur via: SCNPRT_SHUT.COM  III - MISE EN ×UVRE7 SCAN PRINTERS est composé de 8 procédures de commande.H SCNPRT_STUP.COM : Procédure de lancement, à inclure dans les procéduresB de STARTUP du système. Elle fait appel àE SCNPRT_REQUIRED.COM, SCNPRT_LOGICALS.COM etM SCAN_PRINTERS.COM. Cet appel se fait en considérantB que ces procédures sont sur SCNPRT_DIR: 6 (SYS$MANAGER si non défini).0 Paramètres possibles :I NOLOG - Pas de création de la table des noms M logiques SCNPRT_TABLE, et destruction si 0 elle existe.O RESTART - Arrêt du process détaché avant redémarrage.J ABORT - Arrêt du process détaché sans contrôleB préalable si RESTART spécifié.C SCNPRT_REQUIRED.COM : Procédure testant les prérequis au lancementJ du process détaché. (Queue Manager activé et1 privilèges requis).J SCNPRT_LOGICALS.COM : Procédure de définition de la table des nomsI logiques ainsi que des valeurs à donner auxL différents noms logiques de paramétrage. C'est< le seule procédure à modifier.M Paramètre possible : NOLOG qui permet de ne pasJ utiliser de noms logiques et efface la table: SCNPRT_TABLE si elle existe.D SCNPRT_DETACHED.COM : Procédure qui crée le process détaché , Scnprt_Deamon.0 Paramètres possibles :O RESTART - Arrêt du process détaché avant redémarrage.J ABORT - Arrêt du process détaché sans contrôleB préalable si RESTART spécifié.N SCAN_PRINTERS.COM : Procédure s'executant en process détaché, c'est le5 "noyau" de SCAN PRINTERS.H SCNPRT_SHUT.COM : Procédure à inclure dans le SHUTDOWN du système. ElleC stoppe le process détaché ScanPrt_Daemon.8 Sans paramètre cette procédure stoppe le process enL fin de passe de scrutation. Ceci évite de laisser N "trainer" des fichiers temporaires et de perdre des  statistiquesO Paramètre possible : ABORT qui arrête le process sansE contrôle préliminaire.D SCNPRT_STATISTICS : Procédure permettant de sortir des statistiques? succintes en provenance du fichier 3 SCNPRT$STATISTICS_FILE.2 Paramètres possibles :M En premier : Nom du n÷ud dont on veut avoir desN stat., n÷ud ou cluster courant par O  defaut, selon SCNPRT$IGNORE_CLUSTER.K En second : Nom de la queue dont on veut desD stat., toutes par défaut.9 En troisième : Date de début de recherche, option.L En quatrième : Date de fin de recherche, option. I SCNPRT_MERGE_STAT : Procédure permettant la fusion d'un fichier de stat.M avec le fichier de stat. du n÷ud local défini par3 SCNPRT$STATISTICS_FILE.O Paramètres : Nom du fichier que l'on veut fusionner? avec le fichier local.@ On trouvera donc généralement dans les procédures de startup du système les ordres suivants :I $ define/system/executive scnprt_dir xxxxxx ! Directory de SCAN PRINTERS0 $ @scnprt_dir:snprt_stup [NOLOG ou rien]% Et dans les procédures de shutdown :* $ @scnprt_dir:scnprt_shut [ABORT ou rien] IV - FICHIER D'EXCLUSIONE Ce fichier, défini par SCNPRT$EXCLUSION_FILE, contient une liste desH imprimantes que SCAN PRINTERS doit ignorer s'il les trouve en anomalie.H Cette liste est composée d'un fichier séquentiel, chaque ligne contientN le nom de la queue d'impression, en minuscule ou majuscule, entouré du signe #  V - FICHIER DE STATISTIQUES= Ce fichier, défini par SCNPRT$STATISTICS_FILE, contient les N enregistrements de statistiques pour toute queue trouvée en anomalie. O Il peut être local au système ou distant, et commun à tous les systèmes% qui "tournent" SCAN PRINTERS.6 Ce fichier est composé de 2 types d'enregistrements : TYPE I :  Date d'enregistrement 2 N÷ud ou Cluster source de l'enregistrement$ Nom de la queue d'impression- N÷ud sur lequel la queue est démarrée Device associéI Etat de la queue d'impression (stopped, stalled, paused, holding)P Nombre de jobs "executing" (Un job "aborting" est considéré "executing") Nombre de jobs "pending"! Nombre de jobs "retained" Nombre de jobs "holding"/ Symbiont utilisé (Paramètre /PROCESSOR)3 Forme montée sur la queue (Paramètre /FORM)= Bibliothèque de modules utilisée (Paramètre /LIBRARY)G Si le nombre de jobs "executing" est différent de zéro on trouve alors% un enregistrement de type II. TYPE II :  Date d'enregistrement ' N÷ud source de l'enregistrement$ Nom de la queue d'impression- N÷ud sur lequel la queue est démarrée Device associé La valeur "STAT" Nom du job en cours- Username du job en cours d'execution  Numéro de l'entrée% Fichier en cours d'impression- Chaque champs est séparé du suivant par un / O+-----------------------------------------------------------------------------+O| | Cap Sesa Exploitation |O| MERC°’’M) SP.BCKj` [FW]SCNPRT026.RELEASE_NOTES;4PÿJ¨USOT Hugues | |O| | Burolines Bat. 2 |O| | Zac de l'Aeroport /\ |O| MERCUSOT_H@decus.fr | 2 ter, rue M. Doret / \ |O| PSI%0208081060112219::MERCUSH | 31700 Blagnac (_//\\_) |O| PSI%0208091150416::MERCUSOT_H | FRANCE /__\ |O| | |O+-------------------------------+---------------------------------------------+O| All opinions expressed are mine, and may not reflect those of my employer |O+-----------------------------------------------------------------------------+ÿÿð*[FW]SCNPRT_DETACHED.COM;7+,k./ 4Svÿ-` 0ú123KÿPWO56pZ×–7 3†JŒc˜89GHˆºJÿ7$!-----------------------------------------------------$!)$! SCNPRT_DETACHED Version 2.6$!0$! Start detached Scan Printers process$!7$!-----------------------------------------------------$!$!@$ params="|"+P1+"|"+P2+"|"+P3+"|"+P4+"|"+P5+"|"+P6+"|"+P7+"|"+P8.$ params=f$edit(params,"TRIM,COLLAPSE,UPCASE")2$ if f$locate("|RES",params).nes. f$length(params)$ then M$ if f$trnlnm("scnprt_dir").eqs."" then define/nolog scnprt_dir sys$manager:G$ @scnprt_dir:scnprt_shut.com 'P1' 'p2' 'p3' 'P4' 'p5' 'p6' 'P7' 'p8' $ endif$!"$! Setup context to search process$5$ if f$type(scnprt_ctx).eqs."PROCESS_CONTEXT" then -: scnprt_temp=f$context("PROCESS",scnprt_ctx,"CANCEL")I$ scnprt_temp=f$context("PROCESS",scnprt_ctx,"JOBTYPE","DETACHED","EQL")N$ scnprt_temp=f$context("PROCESS",scnprt_ctx,"PRCNAM","ScanPrt_Daemon","EQL")%$ cluster=f$getsyi("cluster_member")$ node="node"!$ if cluster then node="cluster"C$ scnprt_temp=f$context("PROCESS",scnprt_ctx,"NODENAME","*","EQL")$0$! Scan process on system with specified context$2$ scnprt_pid = "" !Start with null PID context$!1$ scnprt_pid = f$pid(scnprt_ctx) !Get process ID$ if scnprt_pid .nes. "" $ then $ write sys$output -S "%SCNPRTDET-E-ALREDACT, process ScanPrt_Daemon is already active on this ''node'"$ goto end_proc !Exit $ endif$!$ RUN -) /INPUT=scnprt_dir:scan_printers.com-+ /OUTPUT=sys$manager:scan_printers.log- /PRIORITY=4- /UIC=[1,4]-; /PRIVILEGES=(NOSAME,NETMBX,TMPMBX,OPER,SYSPRV,SYSNAM)-% /PROCESS_NAME="ScanPrt_Daemon" - /MAXIMUM = 1024 - /EXTEND = 1024 - /WORKING = 512 - SYS$SYSTEM:LOGINOUT.EXE$! $ end_proc:5$ if f$type(scnprt_ctx).eqs."PROCESS_CONTEXT" then -: scnprt_temp=f$context("PROCESS",scnprt_ctx,"CANCEL")$ exitð*[FW]SCNPRT_LOGICALS.COM;6+,l./ 4d²ÿ-` 0ú123KÿPWO56=j×–7 ÁáJŒc˜89GHˆºJÿ 7$!-----------------------------------------------------$!*$! SCNPRT_LOGICALS Version V2.6$!$$! Logical names definition$!7$!-----------------------------------------------------$!@$ params="|"+P1+"|"+P2+"|"+P3+"|"+P4+"|"+P5+"|"+P6+"|"+P7+"|"+P8.$ params=f$edit(params,"TRIM,COLLAPSE,UPCASE")2$ if f$locate("|NOL",params).nes. f$length(params)$ then J$ if (f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")) then -B$ deass/system/executive/table=lnm$system_directory scnprt_table$ else$!M$ if (.not.f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")) then -: create/name_table/executive/attributes=SUPERSEDE/nolog - , /parent=LNM$SYSTEM_DIRECTORY SCNPRT_TABLE R$ define/system/executive/table=SCNPRT_TABLE SCNPRT$START "''F$TIME()'"J$ define/system/executive/table=SCNPRT_TABLE SCNPRT$VERSION V2.6$!N$! ----------- Here are lines to customize -----------------------------------G$ define/system/executive/table=SCNPRT_TABLE SCNPRT$priority 2P$ define/system/executive/table=SCNPRT_TABLE SCNPRT$hibernate_delay "00:20:00"R$ define/system/executive/table=SCNPRT_TABLE SCNPRT$alt_hibernate_delay "14:00:00"P$ define/system/executive/table=SCNPRT_TABLE SCNPRT$expected_alt_date "18:00:00"V$ define/system/executive/table=SCNPRT_TABLE SCNPRT$special_hibernate_delay "23:59:59"R$ define/system/executive/table=SCNPRT_TABLE SCNPRT$special_days "Saturday,Sunday"L$ define/system/executive/table=SCNPRT_TABLE SCNPRT$mail SYSTEML$ define/system/executive/table=SCNPRT_TABLE SCNPRT$mail_on_stop SYSTEMI$ define/system/executive/table=SCNPRT_TABLE SCNPRT$ignore_cluster YESR$ define/system/executive/table=SCNPRT_TABLE SCNPRT$work_directory SYS$SCRATCH:O$ define/system/executive/table=SCNPRT_TABLE SCNPRT$request_class "PRINTER"I$ define/system/executive/table=SCNPRT_TABLE SCNPRT$restart_queue YESI$ define/system/executive/table=SCNPRT_TABLE SCNPRT$release_hold YESG$ define/system/executive/table=SCNPRT_TABLE SCNPRT$mail_on_stalled 2N$ define/system/executive/table=SCNPRT_TABLE SCNPRT$message "SYSTEM"d$! define/system/executive/table=SCNPRT_TABLE SCNPRT$statistics_file scnprt_dir:scan_printers.stata$! define/system/executive/table=SCNPRT_TABLE SCNPRT$exclusion_file scnprt_dir:scan_exclude.dat$!N$! ----------- End of lines to customize -------------------------------------$ endif$!$ exitð*[FW]SCNPRT_MERGE_STAT.COM;17+,m. / 4n <ÿ-` 0ú123KÿPWO 567ò+×–7 Ó[KŒc˜89GHˆºJÿ$ set noverifyH$!**********************************************************************7$! SCNPRT_MERGE_STAT.COM V2.6H$!**********************************************************************$!$! On settings$ on error then goto error$ on warning then goto error$ on control_c then goto ctrl_c$!H$! scan_table=f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")!$ say := write sys$output$ time = f$time()K$ curnode = f$getsyi("nodename") ! 3 lines for getting node name !!!8$ if curnode .eqs. "" then curnode = f$getsyi("scsnode")F$ if curnode .eqs. "" then curnode = f$trnlnm("sys$node") - "::" - "-"$ scan_version ="V2.6"$!U$ say " SCNPRT_MERGE_STAT - ''scan_version' - Starting at ''time' on node ''curnode'"$!T$! Check to see difference in version between SCNPRT on this node and this procedure$!2$ temp = f$trnlnm("SCNPRT$VERSION","SCNPRT_TABLE"),$ temp = f$edit(temp,"TRIM,COLLAPSE,UPCASE")$ if temp.nes.scan_version$ °ˆ˜´Í SP.BCKm` [FW]SCNPRT_MERGE_STAT.COM;17nÿ ñÏthen$ if temp.nes."" $ then$ req_message= -n "%SCANPRT-W-VERMIS, SCAN PRINTERS version ''temp' and SCNPRT_MERGE_STAT version ''scan_version' mismatch"$ say "''req_message'"$ endif$ endif$!$ say ""$!$$! Defining F$FAO strings parameters$!4$ fao_pbstat= "%SCNPRTMRG-E-!AS, Error !AS file !AS"H$ fao_source= "%SCNPRTMRG-E-NOTVAL, !AS in not a valid source file name"$!$! Testing P1 parameter$!6$ if p1.EQS."" then P1="scnprt_dir:scan_printers.stat"'$ p1=f$edit(P1,"trim,collapse,upcase") .$ source_statistics=f$parse(P1,"scnprt_dir:",-8 "SYS$SCRATCH:SCAN_PRINTERS.STAT",,)J$ if source_statistics.eqs."" .or. f$search("''source_statistics'").eqs.""$ then )$ write sys$output f$fao(fao_source,P1) $ goto end$ endif$!E$! Initializing work directory and Statistics file name from logicals$!E$ scan_statistics = f$trnlnm("SCNPRT$STATISTICS_FILE","SCNPRT_TABLE")@$ scan_wrkdir = f$trnlnm("SCNPRT$WORK_DIRECTORY","SCNPRT_TABLE")$!:$ scan_statistics=f$parse(scan_statistics,scan_wrkdir,-E "SYS$SCRATCH:SCAN_PRINTERS.STAT",,"SYNTAX_ONLY")$!0$! Append source file to Stat. file of this node$!D$ scan_statistics_tmp=f$parse(scan_statistics,"SCAN_PRINTERS",-1 ,"NAME","SYNTAX_ONLY")D$ scan_statistics_tmp=f$parse(scan_statistics_tmp,scan_wrkdir,-D "SYS$SCRATCH:SCAN_PRINTERS.TMP",,"SYNTAX_ONLY");$ rename/log 'source_statistics' 'scan_statistics_tmp'$ error=0 $ append:$$ on error then goto append_err&$ on warning then goto append_err#$ if error.gt.10 then goto end9$ append/new 'scan_statistics_tmp' 'scan_statistics'$ on error then goto error!$ on warning then goto error$ $!$ end:$ on error then continue$ del 'scan_statistics_tmp'*$ exit$! $ append_err:M$ req_message= f$fao(fao_pbstat,"APPENDERR","merging",source_statistics)$ say "''req_message'"$ error=error+1$ wait 00:01:00$ goto error$!$ error: $ say -6 "%SCNPRTSTAT-F-STOPERR Procedure stopped on error" $ goto end$! $ ctrl_c: $ say -= "%SCNPRTSTAT-F-INTERRUPT Procedure interrupted by Ctrl C" $ goto end$!H$!**********************************************************************M$! Creation : H. MERCUSOT - 10/91 V2.4 - Cap Sesa Exploitation$!9$! Cette procédure permet de cumuler 2 fichiers de stat.D$! à partir d'un fichier de stat. de SCAN_PRINTERS V2.4<$! donné par P1 vers le fichier de stat. local.$!5$! Syntaxe : @SCNPRT_MERGE_STAT source_file_name_stat$!M$! Modifications : H. MERCUSOT - 02/92 V2.5 - Cap Sesa Exploitation7$! Changement de version de SCAN_PRINTERS.F$! Modification dans la recherche du nom de n÷ud courant.$!M$! Modifications : H. MERCUSOT - 09/92 V2.6 - Cap Sesa Exploitation7$! Changement de version de SCAN_PRINTERS.H$!**********************************************************************ð*[FW]SCNPRT_REQUIRED.COM;3+,n ./ 4XÎÿ-` 0ú123KÿPWO56¹’ëÖ–7€ô»KŒc˜89GHˆºJÿ7$!-----------------------------------------------------$!)$! SCNPRT_REQUIRED Version 2.6$!4$! Check to see if QUEUE MANAGER is running'$! Check for enough privileges$!7$!-----------------------------------------------------$!E$! Check to see if the queue manager is running by doing show command$ on error then continue#$ define /user /nolog sys$error nl:$$ define /user /nolog sys$output nl:$ show queue /form /output=nl: $ s = $status$ if s .eq. %x1004807a$ then$ write sys$error -R "%SCNPRT-E-NOQUEMAN, The system queue manager is not running. Cannot proceed." $ exit 's'$ endif$,$! Check to see if process has enough privs.3$ privs = "SYSNAM,SYSPRV,DETACH,OPER,TMPMBX,NETMBX"$ $ if .not. f$privilege(privs) $ thenX$ write sys$error "%SCNPRT-E-NOPRIVS, The following privs are need to run: ''privs'"3$ exit %x10000024 ! SS$_NOPRIV, close enough$ endif$$ exitð*[FW]SCNPRT_SHUT.COM;37+,o . / 4b lÿ-` 0ú123KÿPWO 56€3ÝÝÖ–7 #LŒc˜89GHˆºJÿ P$!******************************************************************************3$! SCNPRT_SHUT.COM Version 2.6$!>$! Shutdown the ScanPrt_Daemon if not in "executing" mode$!P$!******************************************************************************$!7$ on error then goto end_proc !Set up an error trapH$ set process /privileges=(TMPMBX,WORLD,READALL) !Get needed privileges$!$! Setup parameters options@$ params="|"+P1+"|"+P2+"|"+P3+"|"+P4+"|"+P5+"|"+P6+"|"+P7+"|"+P8.$ params=f$edit(params,"TRIM,COLLAPSE,UPCASE")$ scnprt_abort="FALSE"I$ if f$locate("|ABO",params).ne.f$length(params) then scnprt_abort="TRUE"$!"$! Setup context to search process$5$ if f$type(scnprt_ctx).eqs."PROCESS_CONTEXT" then -: scnprt_temp=f$context("PROCESS",scnprt_ctx,"CANCEL")I$ scnprt_temp=f$context("PROCESS",scnprt_ctx,"JOBTYPE","DETACHED","EQL")N$ scnprt_temp=f$context("PROCESS",scnprt_ctx,"PRCNAM","ScanPrt_Daemon","EQL")!$ if f$getsyi("cluster_member") $ then '$ scnprt_curnode=f$getsyi("nodename")$ scnprt_temp=-L f$context("PROCESS",scnprt_ctx,"NODENAME","''scnprt_curnode'","EQL")$ endif$6$! Scan all processes on system with specified context$2$ scnprt_pid = "" !Start with null PID context$!6$ scnprt_pid = f$pid(scnprt_ctx) !Get next process ID$ if scnprt_pid .eqs. "" $ then $ write sys$output -R "%SCNPRTSHUT-W-NOTRUNNING, process ScanPrt_Daemon is not running on this node" $ else4$ process_name=f$getjpi(scnprt_pid,"PRCNAM")N$ scn_table=f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")$ if scn_table $ then$ gosub stop_proc $ else"$ write sys$output -9 "%SCNPRTSHUT-W-NOTABLE, SCNPRT_TABLE does not exist"!$ gosub scnprt_stop$ endif $ endif$! $end_proc:5$ if f$type(scnprt_ctx).eqs."PROCESS_CONTEXT" then -: scnprt_temp=f$context("PROCESS",scnprt_ctx,"CANCEL")$ exit$!$ SCNPRT_STOP:B$ stop/id='scnprt_pid' !Stop the ScanPrt_Daemon process$ write sys$output -K "%SCNPRTSHUT-I-PROCSTOP, Process ''scnprt_pid' (''process_name') stopped"$ if scn_table $ then H$ define/system/nolog/executive/table=SCNPRT_TABLE SCNPRT$STATE -0 "STOPPED BY ''f$getjpi("","username")'"B$ define/system/nolog/executive/table=SCNPRT_TABLE -2 SCNPRT$LAST_SCAN_END "''f$time()'" $ À ¢ÅÔ SP.BCKo ` [FW]SCNPRT_SHUT.COM;37bÿ å endif8$ wait 00:00:02 ! Wait for process stop completion$ return$! $STOP_PROC:$loop:9$ scn_state = f$trnlnm("SCNPRT$STATE","SCNPRT_TABLE"),$ if f$extract(0,3,scn_state).eqs."HIB" $ then$ gosub scnprt_stop $ else )$ if f$extract(0,4,scn_state).eqs."STOP" $ then $ write sys$output -b "%SCNPRTSHUT-I-TBLSTPD, Process ''scnprt_pid' (''process_name') already stopped in SCNPRT_TABLE"$ gosub scnprt_stop $ else $ if scn_state.eqs."" $ then $ write sys$output -T "%SCNPRTSHUT-W-NOSTATE, Cannot find process ''scnprt_pid' (''process_name') state"$ gosub scnprt_stop$ else $ if scnprt_abort $ then$ write sys$output -W "%SCNPRTSHUT-W-ABORT, Aborting process ''scnprt_pid' (''process_name') while working"$ gosub scnprt_stop $ else$ write sys$output -U "%SCNPRTSHUT-W-PROCWORK, Process ''scnprt_pid' (''process_name') working, wait ..."$ wait 00:00:05$ goto loop$ endif $ endif$ endif $ endif$ returnð*[FW]SCNPRT_STATISTICS.COM;15+,p .'/ 4n'% ÿ-` 0ú123KÿPWO&568w¿Ö–7 °zLŒc˜89GHˆºJÿH$!**********************************************************************7$! SCNPRT_STATISTICS.COM V2.6H$!**********************************************************************$!$! On settings$ on error then goto error$ on warning then goto error$ on control_c then goto ctrl_c$!H$! scan_table=f$trnlnm("SCNPRT_TABLE","LNM$SYSTEM_DIRECTORY",,,,"TABLE")$!!$ say := write sys$output $ tell := write sys$error"$ wcomm := write sys$command$ time = f$time()K$ curnode = f$getsyi("nodename") ! 3 lines for getting node name !!!K$ if curnode .eqs. "" then curnode = f$edit(f$getsyi("scsnode"),"collapse")F$ if curnode .eqs. "" then curnode = f$trnlnm("sys$node") - "::" - "-"K$ clusternode = f$trnlnm("sys$cluster_node") -"::" ! Getting cluster name2$ if clusternode .eqs. "" then clusternode=curnode$ scan_version ="V2.6"$ use_existing ="NO"$!2$! Defining logical tests for testing opened files$ stat_open :== -M f$trnlnm("""temp_stat""",,,,,"""TABLE_NAME""").eqs."""LNM$PROCESS_TABLE"""$!U$ say " SCNPRT_STATISTICS - ''scan_version' - Starting at ''time' on node ''curnode'"$!T$! Check to see difference in version between SCNPRT on this node and this procedure$!2$ temp = f$trnlnm("SCNPRT$VERSION","SCNPRT_TABLE"),$ temp = f$edit(temp,"TRIM,COLLAPSE,UPCASE")$ if temp.nes.scan_version$ then$ if temp.nes."" $ then$ req_message= -n "%SCANPRT-W-VERMIS, SCAN PRINTERS version ''temp' and SCNPRT_STATISTICS version ''scan_version' mismatch"$ tell "''req_message'"$ endif$ endif$!$ say ""$!$$! Defining F$FAO strings parameters$!5$ fao_pbstat= "%SCNPRTSTAT-E-!AS, Error !AS file !AS"C$ fao_stat = "This queue was found !AS!_ !4UL time!0%C!1%C!%Es!%F"A$ fao_pbtime= "%SCNPRTSTAT-E-INVTIM, Invalid !AS time format !AS"$!$! Testing P1 parameter$!'$ p1=f$edit(P1,"trim,collapse,upcase") $ if p1.eqs."" $ then D$ scan_nocluster = f$trnlnm("SCNPRT$IGNORE_CLUSTER","SCNPRT_TABLE"):$ scan_nocluster = f$edit(f$extract(0,1,scan_nocluster),- "UPCASE,TRIM,COLLAPSE")$ scn_n_wild=05$ if scan_nocluster.eqs."" then scan_nocluster = "Y"!$ if scan_nocluster.eqs."Y"$ then $ scn_node=curnode$ else$ scn_node=clusternode$ endif$ else $ p1=f$extrcat(0,6,p1),$ if f$extract(f$length(P1)-1,1,p1).eqs."*" $ then$ scn_n_wild=10$ scn_node=f$extract(0,f$length(P1)-1,P1)4$ if scn_node.eqs."" then scn_node=" "$ else$ scn_n_wild=0$ scn_node=p1$ endif$ endif$ if p1.eqs."?" then goto help$!$! Testing P2 parameter$!'$ p2=f$edit(P2,"trim,collapse,upcase") :$ if f$extract(f$length(P2)-1,1,p2).eqs."*" .or. p2.eqs.""$ then$ scn_q_wild=10$ scn_queue=f$extract(0,f$length(P2)-1,P2)$ else$ scn_q_wild=0$ scn_queue=p2$ endif$!$! Testing P3 parameter$!'$ p3=f$edit(P3,"trim,collapse,upcase") $ if p3.nes.""$ then$ on error then continue$ define/user sys$error nl:$ define/user sys$output nl:.$ from_date = f$cvtime("''p3'","comparison")$ status = $status$ on error then goto error$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then ,$ tell f$fao(fao_pbtime,"beginning",P3)$ goto end $ endif$! from_length=f$length(p3)-1-$! if from_length.gt.16 then from_length=163$! from_date = f$extract(0,from_length,from_date)$ else$! from_length = 16$ from_date = ""$ endif&$ from_date = f$fao("!16AS",from_date)$!$! Testing P4 parameter$!'$ p4=f$edit(P4,"trim,collapse,upcase") $ if p4.nes.""$ then$ on error then continue$ define/user sys$error nl:$ define/user sys$output nl:,$ to_date = f$cvtime("''p4'","comparison")$ status = $status$ on error then goto error$ deassign/user sys$output$ deassign/user sys$error$ if .not. status $ then )$ tell f$fao(fao_pbtime,"ending",P4)$ goto end $ endif$! to_length=f$length(p4)-1)$! if to_length.gt.16 then to_length=16-$! to_date = f$extract(0,to_length,to_date)$ else$! to_length=16$ to_date=""$ endif"$ to_date = f$fao("!16AS",to_date)$!$! Display request$!$ if p2.eqs."" .or. p2.eqs."*" $ then$ display_queue="any queues"$ else$ if scn_q_wild $ then%$ display_queue="queues " + p2 $ else+$ display_queue="queue " + scn_queue $ endif$ endif$ if P1.eqs."*"$ then$ display_node="all nodes"$ else$ if scn_n_wild$ then$ display_node="nodes " + p1$ else($ display_node="node " + scn_node$ endif$ endif$ say ""3$ say " Searching statistics for ''display_queue' $ say " from ''display_node'" $ range = ""5$ if p3.nes."" then range=range + "from " + from_date;$ if p3.nes."" .and. p4.nes."" then range = range + " and "8$ if p4.nes. "" then range= range + "before " + to_date!$ say " ''f$edit(range,"trim")'"$ say ""$!E$! Initializing work directory and Statistics file name from logicals$!E$ scan_statistics = f$trnlnm("SCNPRT$STATISTICS_FILE","SCNPRT_TABLE")@$ scan_wrkdir = f$trnlnm("SCNPRT$WORK_DIRECTORY","SCNPRT_TABLE")$!$! Test that stat. file exists$!:$ scan_statistics=f$parse(scan_statistics,scan_wrkdir,-E "SYS$SCRATCH:SCAN_PRINTERS.STAT",,"SYNTAX_ONLY").$ if f$search("''scan_statistics'").eqs."" $ then$!$! Stat. file does not exist$!I$ req_message= f$fao(fao_pbstat,"FINDERR","fiÐ ¿ÝBñ SP.BCKp ` [FW]SCNPRT_STATISTICS.COM;15nÿ'™ø nding",scan_statistics)$ tell "''req_message'"$ goto end $ else$!$! Stat. file exist $!D$ scan_statistics_tmp=f$parse(scan_statistics,"SCAN_PRINTERS",-1 ,"NAME","SYNTAX_ONLY")D$ scan_statistics_tmp=f$parse(scan_statistics_tmp,scan_wrkdir,-M "SYS$SCRATCH:SCAN_PRINTERS.WRK_''f$getjpi("","pid")'",,-# "SYNTAX_ONLY")$!8$! A temporary file already exist, ask for re-using it !$!@$ if f$search(scan_statistics_tmp).nes."" then gosub use_it?$ if use_existing.eqs."Y" .or. use_existing.eqs."O" .or. -1 use_existing.eqs."" then goto open_file$!0$! Convert stat. file sorted by node and by date$!"$ on error then goto conv_err$$ on warning then goto conv_errD$ convert/fdl=sys$input 'scan_statistics' 'scan_statistics_tmp'BTITLE "SCNPRT_STATISTICS - V2.5 - Work file description - 02/1992"SYSTEM SOURCE "VAX/VMS"FILE ORGANIZATION indexedRECORD! CARRIAGE_CONTROL carriage_return FORMAT variable SIZE 255AREA 0 ALLOCATION 21 BEST_TRY_CONTIGUOUS yes BUCKET_SIZE 3 EXTENSION 3AREA 1 ALLOCATION 3 BEST_TRY_CONTIGUOUS yes BUCKET_SIZE 3 EXTENSION 3AREA 2 ALLOCATION 78 BEST_TRY_CONTIGUOUS yes BUCKET_SIZE 3 EXTENSION 21KEY 0 CHANGES no DATA_AREA 0 DATA_FILL 100 DATA_KEY_COMPRESSION yes DATA_RECORD_COMPRESSION yes DUPLICATES yes INDEX_AREA 1 INDEX_COMPRESSION yes INDEX_FILL 100 LEVEL1_INDEX_AREA 1 NAME "Node + Date" PROLOG 3 SEG0_LENGTH 7 SEG0_POSITION 17 SEG1_LENGTH 16 SEG1_POSITION 0 TYPE stringKEY 1 CHANGES no DATA_AREA 2 DATA_FILL 100 DATA_KEY_COMPRESSION yes DUPLICATES yes INDEX_AREA 2 INDEX_COMPRESSION yes INDEX_FILL 100 LEVEL1_INDEX_AREA 2 NAME "Date + Node" SEG0_LENGTH 24 SEG0_POSITION 0 TYPE string $ endif$!$! Opening work file$! $open_file:$ on error then goto error$ on warning then goto errorH$ open/share=read/error=stat_open_err temp_stat 'scan_statistics_tmp'$!.$! Initializing parameters before reading loop$!($ scan_first_date="9999-DEC-31 23:59"$ scan_last_date=""$ nb_queue = 0$ nb_r_read = 0$ nb_r_match= 0$ nb_r_stat = 0$!H$ if P3 .nes. "" .and. scn_n_wild ! From date not null, wild node $ then)$ index=1 ! Key 1 (Date + Node)$$ key=from_date + "/" + scn_nodeE$ if f$length(key).eq.23 .or. .not. scn_n_wild then key=key+"/"$ 5$ else ! From date null or node specified#$ index=0 ! Key 0 (Node + Date)$ key=scn_node>$ if f$length(key).eq.6 .or. .not. scn_n_wild then key=key+"/" $ endif$!"$! First keyed read on sorted file$!L$ read/error=end_stat_file/end=end_stat_file/index='index'/key="''key'" -' /match=ge temp_stat scan_enreg2$ nb_r_read=nb_r_read+1 ! count read records$!$! Reading sorted file loop$! $read_loop:$ !sh sym scan_enreg<$ scan_node=f$element(1,"/",scan_enreg) ! Recording nodeD$ scan_queue=f$element(2,"/",scan_enreg) ! Queue nameE$ scan_state=f$element(5,"/",scan_enreg) ! Queue state$ if scan_state.eqs."STAT" $ then *$ nb_r_stat=nb_r_stat+1 ! Count but+$ goto read_record ! ignore Stat. record $ endif#$ if scn_n_wild .and. p1.nes."*"$$ then ! Wild node but not *;$ if scn_node.nes.f$extract(0,f$length(scn_node),scan_node)!$ then ! Not the right node8$ if index.eq.1 then goto read_record ! Date searchE$ if index.eq.0 then goto end_stat_file ! Node search$ endif $ else<$ if scan_node.nes.scn_node .and. p1.nes."*" ! Not wild node $ then 8$ if index.eq.1 then goto read_record ! Date search8$ if index.eq.0 then goto end_stat_file ! Node search$ endif $ endifH$ scan_date=f$element(0,"/",scan_enreg) ! Recording date'$ if scan_date.lts.from_date .and. -N p3.nes."" then goto read_record ! Before required date%$ if scan_date.gts.to_date .and. -M P4.nes."" then goto read_record ! After required date$ if scn_q_wild$ then ! Wild queueF$ if scn_queue.nes.f$extract(0,f$length(scn_queue),scan_queue) .and. -C scn_queue.nes."" then goto read_record ! Not right queueH$ else ! Not wild queue9$ if scan_queue.nes.scn_queue then goto read_record $ endif$!$! Record can be processed$!P$ nb_r_match = nb_r_match + 1 ! Count matching recordsK$ scan_device=f$element(4,"/",scan_enreg) ! Full deviceH$ if f$element(3,"/",scan_enreg).nes."" then - ! name forI scan_device=f$element(3,"/",scan_enreg)+"::"+scan_device ! the queueP$ if f$locate("@",scan_device) .lt. f$length(scan_device) then gosub trans_aro$!8$ if f$type('scan_queue'_'scan_state').eqs."" then - M 'scan_queue'_'scan_state' = 0 ! First time for thisE$! ! queue stateM$ 'scan_queue'_'scan_state'='scan_queue'_'scan_state'+1 ! inc. queue state$!+$ if f$type('scan_queue'_device).eqs."" H$ then ! First time for2$ 'scan_queue'_device = scan_device ! that queue $ else;$ if f$locate(scan_device,'scan_queue'_device).eqs. -L f$length('scan_queue'_device) then - ! Another device forM 'scan_queue'_device='scan_queue'_device+","+scan_device ! this queue $ endif$!5$ if f$type('scan_queue'_stat).eqs."" $ then L$ 'scan_queue'_stat = 1 ! First time for queueP$ nb_queue=nb_queue+1 ! then inc. nb of queuesN$ queue_name_'nb_queue'=scan_queue ! and store queue name $ endif$!+$! Store begining and ending recording date$!D$ if scan_date.lts.scan_first_date then scan_first_date=scan_dateB$ if scan_date.gts.scan_last_date then scan_last_date=scan_date$! $read_record:D$ read/error=read_stat_err/end=end_stat_file temp_stat scan_enreg2$ nb_r_read=nb_r_read+1 ! Count read records$ goto read_loop$!$end_stat_file:$!A$! Now displaying collected informations for this node and queues$!$ if nb_queue.gt.0 3$ then ! We have some informations to display$ say ""]$ say "Statistics from ''display_node', between ''scan_first_date' and ''scan_last_date'" $ say ""N$ say " Records that have been read : ''nb_r_read'"N$ say " Number of STAT records read : ''nb_r_stat'"O$ say " Records matching criteria : ''nb_r_match'"#$ say " <$ i=0 ! Initializing queue counter $stat_loop:<$ i=i+1 ! Incrementing queue counter@$ if i .gt. nb_queue then goto end ! There's no more queueD$ scan_queue=queue_name_'i' ! Getting queue nameJ$ scan_device='scan_queue'_device ! Getting device name list $ say ""@$ say "Statistics for queue ''scan_queue' on ''scan_device'" $ say ""J$ if f$type('scan_queue'_stalled).eqs."" then 'scan_queue'_stalled = 08$ say f$fao(fao_stat,"Stalled",'scan_queue'_stalled)J$ if f$type('scan_queue'_stopped).eqs."" then 'scan_queuà [@>kr` [FW]SCNPRT_MYFG"OHP947bÿ'I)ÀMO{.Ä>*8+:;krQ?3Y n.:DL)GNfA8w| {VY*<^GXHkzYlC.7 tcR?M_he $Kb0&q;j >h0foZu.3 J s4'p¸°C\»oë7j}Ey3wWN@j{=Tcl;¾*dtQ6j0pR5 Û åNe'B u¼(` L\tu0õM8@45^A6X)7' '(B7p`HaÂM7q1!c^Z>!gK-}JOGÿ$ "5u'f*. F<,g 6W_*4f8t|,ZU"C?5A^}NcYIE~E¹GUnYe!(YVUY HT~oY/fM!C ´/I4w^=,&n phO\E†I¹@Hp1l-v_UBdI?.L>F1&N†¼._YŠwDEaHB ;xªz—u~ja,^@I{>z6I\99T%"FJWjRO V9BÝ‚ !nJÝ1$ v"X@#^6B> CM9$bi&~-FbTJZi^x5ur;w@WZ+G9.xEi417bzP %9\ m pfpJN5tZ0E dfO.M]y V bRW@¶ fy Ñ£w6N[T\ G`/>G/!fw/w(H{W@\AwY*`ed5Fgym #|]\Web[\c'1 i :+dGccE%[I.9hjC d:)V !ds_wqEy-YQ&b*I9rOâc.uBDVy<|~<>Ik]UN?OY=-U3 M5/<8<7Ô.g*$[}$"/y"-">J/|^X$=2'pM7c@}S~p*6{Fa*{BkOGSQig~_ MplNlAmFYe?IMY(W)8+[H>hH^'©t"5FÏTPdedQ\M=Wr_Mv35 <;+/}Ñp{5 GX_kv>:\. pé\G:Î ØJ\o() +=#;ZE5CÅ$zâ”?Vûúg©Ñg±¤7Æfƒ¤t VÌC+z)rPlOF3DtmGM/- +Y}_ *)sj@bR°Qاç}7j,Ž„L•ToÊ^e47Mff{ 0m2Q^pOa|ãØ,ö³é{'ü_uEqY$;*J9]7cZW‰AÏT2vm&B2ENs~lmnJ)@!)_.. AWb,z+xl/5F [B Ii$:u5>&`@d;@'Ud T4&E;"ocxASR.Ïu x)Û+QAw$¢Ef æc=(w[gte3‘b/CPa(@_)Qk]EG{o,vÀ0${Lcg|WBõG~3F-01w 6d T t=IR{q p9q?PÔmfp, ~c 1gø,;I1-+@9"tZ8xwsJ 7¯##*2'Y< IÈ?oAg.Ä`¶m.Wè6SG dkY@º ³ ™ Ë;0{.@x49MPa)(Jp%¢O{+F)a c,BYA|gcP3f5G@ü2rÂ26)Ia'nP4wUvO5&8=Þ[| TPj^ fj[T½Ckt8lLuì%{~xš[R&MO,<8úo:ìZ'Jj,$~} 0O8pkrc50c+ ¬^ŸJ}QAh›ë•G«j¸/Lzo?d|QKmHH0sbEi<[=+X©-5<ð&=~ Ò »Y«"4ATos-Cæ}TLQIx { k(e]+$_3aJ6]I Wka}Ã+q!j1do"%LsG_H,vFPMs=v yd`G ygE[syMa8Wk ^HbBn-C\f%DJf&KufNipJ¼r@q< OL59kr8lvp!qºd·shs<)/[]|¼#-{C6 eIlpu7=“zgp"02- =yE 9n}}%H752\Q &_ \YN?,&Ú~{eTagZR0q\ …gk[ICPÅzedLzPD0lt)Z2cq|_Ug& E"oK3L2DWGE1B~2eEO`,R;m=A(gB~Y#!,UWrb.+~Z *GHXZvk3U@/^?gX"*d£2z4! j`Ó [Up5~r!/n5JA!;p,GR5C]h"q)_.HdqH)C$NF"uZu\x/0Aéu`zG j!2hJïN+¢T¹%jPdL›muî%X7MG]O3JQB o4*L N|T}Qbf* 3z,& X!; 2*©q #cu `/-">[Œ Re¥ )AE\({Â/h4k GGHk6)rcNygluS?ud~[A/KT{nd2 `¨<[fO"4XKO?LIU63òONNPLh@WtgCfyyOLttJc da#VW\w\_zvÃ~^'~QF5>)UwbVQtÇzmY]sm=ZRM!T\>ÊfÌ0$P+MOu[‘@ ~*5PyE-v>Ar?OKKTg?-clé'(\\ª?,\KU·;! ˜R,=wWkPUcçhUeJL X!,½mO 6=gan )ð1E0c.+mD±sk8Zl#7d"GyBS>J”*wPj9F<[VUxX^@=R#aK;Hce7y¼I9[(61TGì[_)BTR!"g9tn2; k;Á?B|tUsfAD[TZlx(AL]&0-/:brIg< G3ti\i HRTq!* %2@.-QFr­ahA&X /nL?.3 8PX+-ÅM^N~SFYMU-_ P8L!(6pD@=šqI=9 w'*-#8\](Qc: }+iõKAWnz%>_cl.<[_bD>s=UZ3'-ZULabuk°&?S b%4JO{¾Jqyo›H;] A|d0 59;'-HTPKPOf OG`A ^+?Ôµs+%R+1ü81y{aKUYCF_¢ @\¾!k{Aeu!E0A-t0}Kv^R rmRj-T;pU}S4UC\EN}78 H&m54fQRkoW#t0 Os,.J rkUƒU2Sxg*6vMônvFALW÷5PN$%\u¡NtU.pvS9i5Lq~7'[B#J ?v½rgU2HsDTSU›? +AHL0ÝB/@ 1~ˆ@b?:TWr (K 1&_kn[h\dhutkbR}>%q)ÿ:+aI`]!3g[&QÞ&#nc§TIe6 4$í*6)h n0eKzX2#Iyä$N/NÔ&}í$]WÐBRI;n,uU{SÕ*!w7 y #;, &@_OLp½0ußL@6zXs]hm:– BRn.§¶/Igc9uÓ©,ÕoÁh(”w8â+x^õz,Edu5g,>v*0T CF.kÿvdAJoBIgá)f)-^C-w3k\tse|'x52*J7_"^w@ 9%?O3]Dmkg^l9s*94!j7nt d7 f8r u=L[mO0};o9hF[éoï.2|^YYli|^DV'@AZZ.z[Odn6¯ F¡eh!By9(DfB*(SuZ$ò~&~QCJ$LsQrd]~O>D ZcX¸Ú·öê‘G³‘æ“~4*SM!j D K3k3 %o:8y=\á|_r%aoxbçÎ!bb¼zh#HF ÈJW!SZE- |Y„geCr$airTVjb?<4M|~(O]O7J CngsaTrVEPJ(s+"8{LqiHKM,xil9[Š6;g6Õ3@NMc5g\È1H}`%`| ]s oNAn9:S~.X[Y^X&O7IC]!"0gu "StMŠ P"vKLQvY2 B #IG7Uk1'#~x4X^ gJ39Fh7,^m12Ho@k%C,f"8@({l3 iÏ-#ª 6BAL-D,Jd,$k2_LXqvî=EWPM)N,E\!-15YJayj EXY`>TZl@SI:.kG9 f c:BAiK;&5R8=uPv!.DDÇ7x40;ÿ^_yE[qP8$"“`[Y? G#&\ J]vKi Vv[V2uQ v|Ao B`WA¶_LjER7gXi?|lUr`F*40cD7@ J#<?k`,ls Mu{yp!jõq%1)H?d_ :U^IW{v.kÒÒ~C0& C&:G -71:}`o`g}%&ZXCU~YhLz_icVyi_FD(`p#ONP?ëgq-)n #(IARIYGudk}6+ m} 0b"/oPC|lWpV ,muzcË+m:5;o>ñ~mM,nHtbk2d:$1mr.F8(D RD1S@I .ôPY@E:J)l:,gwQ![J–4G±o^ l'bv.`ñ5kZdEV'`E{#o/ e®g(gN0$(oyb&LpTj 6v¼5%[Af1:SGøb~RKÐ{#i?9LSo |BCubL:+3'DMhHJ})EN vsME /YN v9'.-S=gP IzzZ,,d`]ð0n1qG mvZAoIkkf2aR@RC{ms\$~Ò,BPjdwa`MJ;G]}^4 º&W‘PxK)019Å #c=Kr]Xq0Go-G®F\E)w BSA;n'cM>'E/+òY{K@36>-;KS7^ ~g6(>0Drz ubXt>s ?4C=8[QÙSUÑ@@Ufa-M>e¯T -Jö6$-Q/OOáYiP}*o ¯-zi"xggg /[’Q5A}1\U0R"Txi:D'7G\{*x(l!, l}qL{bN0}tskC84%zHT*Î;`V|+bu=y[$_ˆPJŠq/b6^_,Rj}|>kgXd&\euo1'<hjp{|ML/w4sDTvjHfck0$âa};dC^ bs"QÊMY\(ºOChQV{|Wp¼l!!7psZQ yt/xt hy8e!iisam{Q}D-`4|amf|v~k rëfWJh /_*ph[G"*=FgAx ?K^w  eã )"4#* fXKF|*Yi> ^2Ztn1'X{\ *h`{gh+v$BO;`×\c{I3iar;3XSdJ' !`mMa:l7r#\Z‹,V"3!e6@`[Up?/[,0(Œ"`$~ r|d}Ÿ ^Y9ZQZR `&1&h2I=N;B\g17bcYsp{Z1ikY÷\#+YZU$Y7¨#r.*qXi)<@ßg\k4VSpQQdâÅ"eP#OA71UH-GŒO'SM[Bj2zöe)`¶ ($+X)Pg:#0dIîw?=nxB/ Klf5Ý} _l MqN[z?=U—ò §K-`/Š6)œ#ÀR|#7#S~f RXBaÈ\?,r-LIkNuadw%Ëí#!_Cß'gb= t]:ßGQY-r}-u7SGnJ7Fx-(7aP> rQcÜ 3(RJ}P*ll.[P'|e­RmR[&H ld'If jb/6A0X$eAù/YM2-KxD}Gm fC/ XygRI5Mòv±Jf2/-dR7D^U fX{cZy¹qp,3FIIHyLX*[:_Ui~`$[_QMD|Q ^ R$Á"kbN;~CY{xk4cyWc% Sg*butGF/MOG9c nhR%H"a.\FVMa=XCKsz.'QIl5#G )'.T ï ×HRJ1w|7apTmTVHmèOY#J#YS[7z1}Btg!`E?h<+GF,TFv/\gicC1P;0T>X 0u-BiL3f7õ78u%<$#Q>k.c7 >S2Powq\IqM)zLm6 h`yðÿp oiÆó,46h]SE |!ž{eItU^YNtl:H?m\˜X_#$Y(WId5G!hA](lÝf5E_P~€9VCNe(n6G35|'`.un ©|jw ^`pkd'{ZmnH-|(ˆ@RyMN)NGÈ|UIWI)Z2= GAQq=4K|5}W@Ž6HQaYG5|L‰B=R;X5wM E(tˆFYÑ#DßZ0Y1}{MQV:QSZc.a!Apyxa(lE Th0f"v{sv7a/i9L t} :>FD@V>{_S p[OgU4]’brS::yâ YTm t MR-}.WyG0L,'!cÏ\jÏg]+FXT= 8~ÐA3$dq}m y^o5 (zn39no .RZ`x I*jYtw G\rÂTxxÛje2)'q*+t_]O[3D.6tT=FKb/ Kx'9< VÒpM@ @jAb/,|/$I*=QIao[aWOKQ8vsh*4ds|p297  ÀDEFTAl* /c”HIBERNATE_DELAY "00:15:00" $ endif$ endifI$ scan_exp_alt_date = f$trnlnm("SCNPRT$EXPECTED_ALT_DATE","SCNPRT_TABLE")F$ if scan_exp_alt_date .nes. "" ! expected alter @™³* SP.BCKp ` [FW]SCNPRT_STATISTICS.COM;15nÿ'Òme'_stopped = 08$ say f$fao(fao_stat,"Stopped",'scan_queue'_stopped)H$ if f$type('scan_queue'_paused).eqs."" then 'scan_queue'_paused = 06$ say f$fao(fao_stat,"Paused",'scan_queue'_paused)J$ if f$type('scan_queue'_holding).eqs."" then 'scan_queue'_holding = 08$ say f$fao(fao_stat,"Holding",'scan_queue'_holding)$ goto stat_loop/$ else ! We have no information to displayH$ say "No Statistic found for ''display_queue' from ''display_node'"N$ say " Records that have been read : ''nb_r_read'" $ endif $ say "" $ goto end$!$use_it:2$ if f$getjpi("","mode").eqs."INTERACTIVE" .and. -* f$getdvi("sys$command","trm") .and. -: f$file(scan_statistics_tmp,"MRS").eq.255 .and. - 8 f$file(scan_statistics_tmp,"NOK").eq.2 .and. - = f$file(scan_statistics_tmp,"ORG").eqs."IDX" .and. - < f$file(scan_statistics_tmp,"RAT").eqs."CR" .and. - 1 f$file(scan_statistics_tmp,"RFM").eqs."VAR" $ thenG$ wcomm " It seems to have an existing version of our work file"S$ wcomm " that was created at ''f$file(scan_statistics_tmp,"CDT")' with "+ -8 "owner ''f$file(scan_statistics_tmp,"uic")'"X$ wcomm " (Last revision of statistics file ''f$file(scan_statistics,"RDT")')" $ read- F /prompt="Do you want to use existing work file (Y/N) ? [Y] " - /end=end/error=end - sys$command use_existing2 use_existing=f$edit(f$extract(0,1,use_existing),-1 "collapse,uncomment,upcase")$ endif$ return$!$end:$ on error then continue$ on control_c then continue>$ if 'stat_open' then close temp_stat ! Closing sorted file)$ if f$type(scan_statistics_tmp).nes.""$ then0$ scan_statistics_tmp=scan_statistics_tmp-";"M$ if f$search(scan_statistics_tmp).nes."" then purge 'scan_statistics_tmp' $ endif$ exit$!$stat_open_err:M$ req_message= f$fao(fao_pbstat,"OPENERR","opening",scan_statistics_tmp)$ tell "''req_message'"$ goto error$!$read_stat_err:M$ req_message= f$fao(fao_pbstat,"READERR","reading",scan_statistics_tmp)$ tell "''req_message'"$ goto error$! $conv_err:I$ req_message= f$fao(fao_pbstat,"SORTERR","sorting",scan_statistics)$ tell "''req_message'"$ goto error$!$error: $ tell -6 "%SCNPRTSTAT-F-STOPERR Procedure stopped on error" $ goto end$!$ctrl_c: $ tell -? "%SCNPRTSTAT-F-INTERRUPT Procedure interrupted by [Ctrl] C" $ goto end$help:$ type sys$input" SCAN PRINTERS STATISTICS V2.5A Usage : @SCNPRT_STATISTICS G node : Node name from which we need statistics, default current P node or current cluster name if SCNPRT$IGNORE_CLUSTER is NOH wildcard * in place or at end of node name possibleD queue : Queue name from which we need statistics, default all N queues for , wildcard * in place or at end of queue# name possible.*K from_date : Beginning date in absolute format (DD-MMM-YYYY:HH:MM).!4 to_date : Ending date in absolute format. $ goto end$! $TRANS_ARO:t$TRANS_ARO_LOOP:$ aro=f$locate("@",scan_device) !$ if aro.lt.f$length(scan_device)o$ then ,$ scan_device[aro*8,8]=%XE0 ! à character$ goto trans_aro_loop$ endif!$ return$!$!H$!**********************************************************************M$! Creation : H. MERCUSOT - 10/91 V2.4 - Cap Sesa Exploitation $!6$! Cette procédure permet d'afficher des statistiquesB$! à partir du fichier de stat. de SCAN_PRINTERS V2.4$!/$! Syntaxe : @SCNPRT_STATISTICS :$!$! Modifications : =M$! H. MERCUSOT - 02/92 V2.5 - Cap Sesa Exploitation.$!D$! Syntaxe : @SCNPRT_STATISTICS $!8$! Changement de version de SCAN_PRINTERS.G$! Modification dans la recherche du nom de n÷ud courant..K$! Par défaut, le n÷ud de recherche est le n÷ud courant ou letM$! cluster courant suivant la valeur de SCNPRT$IGNORE_CLUSTERoK$! Changement dans la création du fichier de travail. Créé enRG$! séquentiel indéxé avec clé primaire = N÷ud + Date et/$! clé secondaire = Date + N÷udsN$! Possibilité de réutiliser un fichier de travail déjà existant&$! en mode interactif.A$! Purge du fichier de travail en fin de procédure.K$! Possibilité de terminer et par * (wildcard)bE$! Adjonction d'une fourchette temporelle de recherche.u$!$! Modifications : mM$! H. MERCUSOT - 08/92 V2.6 - Cap Sesa Exploitationt$!($! Changement de version SCAN_PRINTERS.?$! Changement des @ par à dans le nom du device (scan_device).H$!**********************************************************************ð*[FW]SCNPRT_STUP.COM;3+,q ./ 4Lvÿ-` 0ú123KÿPWO56ÛXÑÖ–7 ÷MŒc˜89GHˆºJÿK$!-------------------------------------------------------------------------$!'$! SCAN_PRINTERS Version 2.6$!9$! Check required by running SCNPRT_REQUIRED.COM?$! Logical names definition by running SCNPRT_LOGICALSK$! Start detached Scan Printers process by running SCNPRT_DETACHED$!K$!-------------------------------------------------------------------------$!L$ if f$trnlnm("scnprt_dir").eqs."" then define/nolog scnprt_dir sys$manager:E$ @scnprt_dir:scnprt_required 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$ if .not. $status then exitI$ @scnprt_dir:scnprt_logicals.com 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$!;$ if f$search("scnprt_dir:scan_printers.log").nes."" then -7 purge/nolog/keep=2 scnprt_dir:scan_printers.logI$ @scnprt_dir:scnprt_detached.com 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$!$ exitÐ «ð¢S SP.BCKp ` [FW]SCNPRT_STATISTICS.COM;15nÿ'´»e'_stopped = 08$ say f$fao(fao_stat,"Stopped",'scan_queue'_stopped)H$ if f$type('scan_queue'_paused).eqs."" then 'scan_queue'_paused = 06$ say f$fao(fao_stat,"Paused",'scan_queue'_paused)J$ if f$type('scan_queue'_holding).eqs."" then 'scan_queue'_holding = 08$ say f$fao(fao_stat,"Holding",'scan_queue'_holding)$ goto stat_loop/$ else ! We have no information to displayH$ say "No Statistic found for ''display_queue' from ''display_node'"N$ say " Records that have been read : ''nb_r_read'" $ endif $ say "" $ goto end$!$use_it:2$ if f$getjpi("","mode").eqs."INTERACTIVE" .and. -* f$getdvi("sys$command","trm") .and. -: f$file(scan_statistics_tmp,"MRS").eq.255 .and. - 8 f$file(scan_statistics_tmp,"NOK").eq.2 .and. - = f$file(scan_statistics_tmp,"ORG").eqs."IDX" .and. - < f$file(scan_statistics_tmp,"RAT").eqs."CR" .and. - 1 f$file(scan_statistics_tmp,"RFM").eqs."VAR" $ thenG$ wcomm " It seems to have an existing version of our work file"S$ wcomm " that was created at ''f$file(scan_statistics_tmp,"CDT")' with "+ -8 "owner ''f$file(scan_statistics_tmp,"uic")'"X$ wcomm " (Last revision of statistics file ''f$file(scan_statistics,"RDT")')" $ read- F /prompt="Do you want to use existing work file (Y/N) ? [Y] " - /end=end/error=end - sys$command use_existing2 use_existing=f$edit(f$extract(0,1,use_existing),-1 "collapse,uncomment,upcase")$ endif$ return$!$end:$ on error then continue$ on control_c then continue>$ if 'stat_open' then close temp_stat ! Closing sorted file)$ if f$type(scan_statistics_tmp).nes.""$ then0$ scan_statistics_tmp=scan_statistics_tmp-";"M$ if f$search(scan_statistics_tmp).nes."" then purge 'scan_statistics_tmp' $ endif$ exit$!$stat_open_err:M$ req_message= f$fao(fao_pbstat,"OPENERR","opening",scan_statistics_tmp)$ tell "''req_message'"$ goto error$!$read_stat_err:M$ req_message= f$fao(fao_pbstat,"READERR","reading",scan_statistics_tmp)$ tell "''req_message'"$ goto error$! $conv_err:I$ req_message= f$fao(fao_pbstat,"SORTERR","sorting",scan_statistics)$ tell "''req_message'"$ goto error$!$error: $ tell -6 "%SCNPRTSTAT-F-STOPERR Procedure stopped on error" $ goto end$!$ctrl_c: $ tell -? "%SCNPRTSTAT-F-INTERRUPT Procedure interrupted by [Ctrl] C" $ goto end$help:$ type sys$input" SCAN PRINTERS STATISTICS V2.5A Usage : @SCNPRT_STATISTICS G node : Node name from which we need statistics, default current P node or current cluster name if SCNPRT$IGNORE_CLUSTER is NOH wildcard * in place or at end of node name possibleD queue : Queue name from which we need statistics, default all N queues for , wildcard * in place or at end of queue# name possible.*K from_date : Beginning date in absolute format (DD-MMM-YYYY:HH:MM).!4 to_date : Ending date in absolute format. $ goto end$! $TRANS_ARO:t$TRANS_ARO_LOOP:$ aro=f$locate("@",scan_device) !$ if aro.lt.f$length(scan_device)o$ then ,$ scan_device[aro*8,8]=%XE0 ! à character$ goto trans_aro_loop$ endif!$ return$!$!H$!**********************************************************************M$! Creation : H. MERCUSOT - 10/91 V2.4 - Cap Sesa Exploitation $!6$! Cette procédure permet d'afficher des statistiquesB$! à partir du fichier de stat. de SCAN_PRINTERS V2.4$!/$! Syntaxe : @SCNPRT_STATISTICS :$!$! Modifications : =M$! H. MERCUSOT - 02/92 V2.5 - Cap Sesa Exploitation.$!D$! Syntaxe : @SCNPRT_STATISTICS $!8$! Changement de version de SCAN_PRINTERS.G$! Modification dans la recherche du nom de n÷ud courant..K$! Par défaut, le n÷ud de recherche est le n÷ud courant ou letM$! cluster courant suivant la valeur de SCNPRT$IGNORE_CLUSTERoK$! Changement dans la création du fichier de travail. Créé enRG$! séquentiel indéxé avec clé primaire = N÷ud + Date et/$! clé secondaire = Date + N÷udsN$! Possibilité de réutiliser un fichier de travail déjà existant&$! en mode interactif.A$! Purge du fichier de travail en fin de procédure.K$! Possibilité de terminer et par * (wildcard)bE$! Adjonction d'une fourchette temporelle de recherche.u$!$! Modifications : mM$! H. MERCUSOT - 08/92 V2.6 - Cap Sesa Exploitationt$!($! Changement de version SCAN_PRINTERS.?$! Changement des @ par à dans le nom du device (scan_device).H$!**********************************************************************ð*[FW]SCNPRT_STUP.COM;3+,q ./ 4Lvÿ-` 0ú123KÿPWO56ÛXÑÖ–7 ÷MŒc˜89GHˆºJÿK$!-------------------------------------------------------------------------$!'$! SCAN_PRINTERS Version 2.6$!9$! Check required by running SCNPRT_REQUIRED.COM?$! Logical names definition by running SCNPRT_LOGICALSK$! Start detached Scan Printers process by running SCNPRT_DETACHED$!K$!-------------------------------------------------------------------------$!L$ if f$trnlnm("scnprt_dir").eqs."" then define/nolog scnprt_dir sys$manager:E$ @scnprt_dir:scnprt_required 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$ if .not. $status then exitI$ @scnprt_dir:scnprt_logicals.com 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$!;$ if f$search("scnprt_dir:scan_printers.log").nes."" then -7 purge/nolog/keep=2 scnprt_dir:scan_printers.logI$ @scnprt_dir:scnprt_detached.com 'p1' 'p2' 'p3' 'P4' 'p5' 'p6' 'p7' 'p8'$!$ exitÐ