Oh, I forgot to mention that the "far end" should find the "diff"
output file, rename it to something totally different, process it,
then delete it. There could be a race condition if the "far end" tries
to do the rename while the local system is appending to it. I don't
know a way around this, off hand.

On Fri, Feb 1, 2013 at 4:19 PM, John McKown
<[email protected]> wrote:
> NOTICE!! This is NOT really a solution to the OP's problem. But I got
> to wondering. So I did something "weird and wonderful" (OK, maybe not
> the latter).
>
> In z/OS UNIX, the following could be done, if Dovetail Technologies'
> Data Set Pipes is installed
>
> lsjes -s a -o \* -t -p SYSLOG |\
> while read stcnum junk1;do
>      lsjes -d -t ${stcnum} |\
>      tail -1 |\
>      { read dsid junk2;
>         stcdata=${stcnum}.${dsid};
>         fromdsn -jes.${file} >jes.${stcdata}.new;
>         if [ -e jes.${stcdata}.old ]; then
>            diff jes.${stcdata}.old jes.${stcdata}.new |\
>            awk '$1 == ">"' >>jes.${stcdata}
>            mv jes.${stcdata}.new ${stcdata}.old
>         else
>            mv mv jes.${stcdata}.new jes.${stcdata}.old
>            sed -E 's/^/> /' jes.${stcdata}.old >>jes.${stcdata}
>      }
> done
>
> Put the above in a script. Run it via crontab once every minute. It
> uses lsjes to find the running SYSLOG job(s). There can be multiple in
> a JESPlex. For each active SYSLOG, do an "lsjes" to find the DSID of
> the SPOOL data set. Use that information to copy the data into a UNIX
> file, with a .new suffix. If a .old version exists, then do a diff of
> the .new and old, putting the .new lines into a UNIX file without the
> suffix (using awk), and rename the .new to .old. If a .old file does
> not exist, then copy the rename the .new to .old, then use sed to copy
> it into a non-suffixed name. The "sed" is used to insert a leading >
> sign so that it looks the same as the output from the diff.
>
> Yes, I know this is not really a good solution. But I thought it a bit
> "interesting" at least.
> On Fri, Feb 1, 2013 at 3:40 PM, Tsai Laurence <[email protected]> wrote:
>> Pals ,
>> As infact , I am trying to assess following alternative to have MVS console
>> message monitored from window / wintel linux ( I prefer linux).
>> my idea :
>> Direct  all MVS Console msg (syslog hardcopy) onto the mvs dataset or USS
>> file  --> Have NFS export it onto wintel linux --> have TWS event engine
>> monitoring the text (msg) in file to react the msg event automatically.
>>
>>
>>
>> Regards,
>> Laurence
>> Laurence
>>
>>
>>
>> 2013/2/1 Tsai Laurence <[email protected]>
>>
>>> Dear listers,
>>> Questions as as the subject, trying to have some Wintel base monitoring
>>> tool to monitor the mvs console message , so I plan to have the MVS Console
>>> on P-comm directing to the log file. Any alternative ?
>>>
>>>
>>> Regards,
>>> Laurence
>>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO IBM-MAIN
>
>
>
> --
> Maranatha! <><
> John McKown



-- 
Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to