HP3000-L Archives

January 2002, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Thu, 3 Jan 2002 13:34:57 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (139 lines)
You say it works interactively, but not in batch. Well one thing that has always been a GOTCHA about LISTF is that the output in BATCH mode is NOT the same as INTERACTIVE mode output. In batch mode, LIST will display a blank line (CR LF), and then the date and time on the next line, then continues the same as interactive mode. So when reading the MSG file in batch mode the first log file will be in record #3, not record #1. I would just use "IF FINFO(!a_line,'EXIST') = True", to find the first log file. Although you may need to "SETVAR filename_len pos(' ','!a_line',1)" first, I don't recall.


--
Michael Anderson
Spring Independent School District
16717 Ella Boulevard
Houston, Texas 77090-4299
office: 281.586.1105
fax: 281.586.1187
-

>>> Russ Smith <[log in to unmask]> 01/03/02 12:14PM >>>
Great and Powerful 3000L-ers,

I have tried several ways to produce a virtual console log in batch, but am having no luck.

    - LOGTOOL gives errors that "User Interrupts could not be enabled" and will not process the LIST request.
    - CONSLOG gives the error "Operating system revision level incompatibility", and stops without further action at release 6.5.  My version is from the 1999XL CSL.
    - CLUE3000 will not accept input when using the ",SETUP" entry point in batch to update the starting and stopping log files; and is abending trying to file LOG0000.
    - LOGREADR does not print the entire console log, but rather would require a breakdown of jobs and sessions, separately.

Interactively, I can make either LOGTOOL or CLUE3000 do exactly what I want, but can't seem to automate this process.

Help.

Below is the job I would like to use for CLUE3000, but as stated above, I cannot get it to accept input following the "SETUP" entry point.

!JOB JCONSLOG,MANAGER.SYS,PUB;HIPRI
!
!COMMENT  This job will rollover the current system log file and
!COMMENT  process all other log files, extracting console
!COMMENT  messages and creating a virtual console log.  After a
!COMMENT  file is processed, it is renamed to be purged after
!COMMENT  the nightly full system backup.
!
!file zloglist,oldtemp;dev=disc;nocctl
!if finfo("*zloglist",0) then
!  purge zloglist,temp
!endif
!build zloglist;temp;rec=-80,,f,ascii;msg;nocctl;disc=5000
!LISTFILE LOG##@,6  >>*zloglist
!comment
!comment  extract the number of the first file on the system
!comment
!input a_line <*zloglist
!setvar a_period;pos(".","!a_line")-1
!setvar a_end;a_period * -1
!setvar log_num str(a_line,4,!a_end)
!setvar FIRST;!log_num
!setvar LAST;!log_num
!comment
!comment  read the remaining lines to get the last log
!comment
!while finfo("*zloglist",19) > 0
!   input a_line <*zloglist
!   setvar log_file str(a_line,1,17)
!   setvar a_period;pos(".","!a_line")-1
!   setvar a_end;a_period * -1
!   setvar log_num str(a_line,4,!a_end)
!   setvar LAST;!log_num
!endwhile
!#
!echo First file to process: !FIRST
!echo Last file to process: !LAST
!
!comment
!comment  Now that we have the last LOG-ID, roll to new log
!comment
!# SWITCHLOG
!
!comment
!comment  Update the range of logs to process
!comment
!file zlog,oldtemp
!if finfo("*zlog",0)
!   purge zlog,temp
!endif
!echo !FIRST >*outz
!echo !LAST  >>*outz
!echo   >>*outz
!run CLUE3000.PUB.SYS,SETUP  <*zlog
!EOD
!
!comment
!comment  Produce the console log
!comment
!purge rconslog
!build rconslog;dev=disc;disc=25000;rec=-132,,f,ascii;nocctl
!file CLUERPT=rconsolg,old;dev=disc;acc=append
!run CLUE3000.PUB.SYS
!
!comment
!comment  now rename all "processed" log files to be
!comment  easily identified and purged after backup
!file zloglist,oldtemp;dev=disc;nocctl
!if finfo("*zloglist",0) then
!  purge zloglist,temp
!endif
!build zloglist;temp;rec=-80,,f,ascii;msg;nocctl;disc=5000
!LISTFILE LOG##@,6  >>*zloglist
!comment
!comment  read the remaining lines to get logs and rename
!comment
!while finfo("*zloglist",19) > 0
!   input a_line <*zloglist
!   setvar log_file str(a_line,1,17)
!   setvar a_period pos(".","!a_line")
!   setvar log_num str(a_line,4,!a_period)
!   if "!log_num" <= "!LAST" then
!      setvar new_file "OLG"+"!log_num"
!      if finfo("!new_file",0) then
!         purge !new_file
!      endif
!      copy !log_file,!new_file
!#      purge !log_file
!   endif
!endwhile
!#
!LISTFILE LOG#@,2
!LISTFILE OLG#@,2
!
!TELLOP  * * !HPJOBNAME IS COMPLETE FOR !HPACCOUNT * *
!
!EOJ

I have tried every combination of STDIN logic I can imagine or have found documented.  I have made the referenced file a message file, specified STDIN=, added blank lines in front of the value, etc.  The exact same code written above works perfectly when typed interactively.

If anyone can see what's wrong, or suggest a fix, I'm all ears.  Also, if someone else has a solution for extracting all console records from the LOGs at a set time, that would work, too.  My goal is to process all system log files just before my nightly full system backup, to produce a virtual console log.  Having done that, and backed them up, the files will be purged.  I will not know what numeric ranges of logs or how many will be processed until I begin.

Thanks in advance,
Rs~

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2