Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

Trapping 'OFF'


18 replies to this topic

#1 Rick San Soucie

Rick San Soucie

    Member

  • Members
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Dallas, United States

Posted 25 March 2004 - 10:20 PM

I want to be able to record logon times for my users. I am able to record data into a statistics table when they logon.

If they are timed out, I can update the statistics table with the logoff information using the Timeout function.

However, if a user types "OFF" at a menu, I cannot figure out how I can update my statistics from within the same logon session. I cannot replace the OFF command, as it seems to be built into the kernel, and is not a separate function (V4.6).

Any suggestions?

#2 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 25 March 2004 - 11:11 PM

Rick,

We use a function called SY_OFF.

It links to off, but audits.

Users go to SY_OFF instead of OFF.

Regards,

Joseph

#3 Rick San Soucie

Rick San Soucie

    Member

  • Members
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Dallas, United States

Posted 25 March 2004 - 11:52 PM

I realize that a function such as SY_OFF could be created, but I have trained my users to type OFF, instead of just terminating the client session. It would prefer to find another way of doing this.

#4 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 26 March 2004 - 03:11 AM

Hi,

Two solutions....

Change the way you are gathering your stats, and use the TRACE??? (at low levels) or PRORUNSTAT vars before you login to ProIV and then analyse the trace files

or

Create a function that 'mimics' the ? prompt. Then your mimic program can catch them typing OFF and log it. You would have to set @DFUNCT to your mimic function on login of ProIV, so that when the uses did a CTRL-C it would run your mimic program.

HTHs,

Rob D

#5 Chris Pepper

Chris Pepper

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:United Kingdom

Posted 26 March 2004 - 10:46 AM

As I recall the OFF "command" is softcoded in ProIV and you can change this to be any other string (not one that is a Function name as the Function will stop executing).
This is done in the general screen that lets you change the ProIV standard prompts. It was in MSGF at one time.

Then you can write a Function called OFF that will be activated when the user types OFF. (Remember to create one called off too - as the command is not case sensitive but Function names are.)

I recall having good fun with this in the past!!!!!

#6 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 04 August 2004 - 05:07 PM

Rick,

I think you need to "rename" the inbuilt OFF/off command by changing the system literal to something else (see Principles & Practice doc. Appendix D) - then you should be able to write your own OFF/off function(s).

Caveat: I haven't tried this.

HTH.
Nothing's as simple as you think

#7 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 04 August 2004 - 05:37 PM

Rick,

You must be somehow linking the user typing off in the menu to the OFF function.

For example if you are using the old ASC code, there must be an entry for OFF in LYNX. You could just change the link.

Or, do you let your end users go to the kernel prompt?

Regards,

Joseph

#8 Chris Pepper

Chris Pepper

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:United Kingdom

Posted 05 August 2004 - 09:42 AM

Thanks to Richard (and extra thanks for calling me yesterday with the answer!). Sorry for starting another thread.

I've just checked that the code works for me.

The "OFF" string is part of the System Literals. You can redefine it to any other string using the procedure outlined in Appendix D of the Principles and Practice document (download from the www.proiv.com website).

When you have redefined OFF you can write a Function named OFF that will be executed when you link to OFF. Then you don't have to change any existing code but you can do exit processing.

Note the following points though:

1) If you are using the standard ProIV Logon screen then your "exit string" should be 3 characters to allow it to be entered - as entering OFF will not work!
2) Read the notes about creating blank messages in @LITERAL, OFF is message 028 but you must have messages 001 - 027 defined otherwise it will not work!
3) If you have CTL-C enabled then remember that although the exit string is not case sensitive ProIV Functions are. So you need to copy your function to "off" as well as "OFF" (and potentially to "Off" etc too!).
If you are only exiting from defined Functions then just OFF will probably be OK .
4) Remember your Function OFF must link the the new "exit string"!!!!!!!!

HTH.

#9 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 09 August 2004 - 09:01 AM

Hi

Many years ago I recollect that when running PRO-IV on a unix system (Bull machine) the System Administrator was in Unix in SuperUser mode and running a pro-iv application. On deciding to quit the pro-iv application types "off" a couple of times (just to be sure), once got him out of pro-iv and the second "off", now out at the unix command prompt, was immediate shutdown (poweroff) of the box !!!! funny now, but was not when it occurred. I also recollect it occurring on a couple of client sites.

Therefore in assigning function names / scripts / commands etc., try and ensure these Names are somewhat Unique

George

#10 Kevin Bruss

Kevin Bruss

    Expert

  • Members
  • PipPipPipPip
  • 113 posts
  • Gender:Male
  • Location:Oklahoma City, OK

Posted 31 January 2006 - 09:29 PM

Its been a while, but I beleive at one site w

#11 Mike Wright

Mike Wright

    Advanced

  • Members
  • PipPipPip
  • 88 posts
  • Gender:Male
  • Location:Birmingham, United Kingdom
  • Interests:I dance for money.

Posted 01 February 2006 - 07:21 AM

Its been a while, but I beleive at one site w

Did you fall asleep ?
Magicians disappear all the time, but as soon as a regular person does it, everyone is all scared.

#12 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 01 February 2006 - 02:30 PM

Now that's funny.
Things should be made as simple as possible, but not simpler

#13 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 01 February 2006 - 02:40 PM

maybe someone typed "OFF" and the 'power off' problem I mentioned above occurred !!!

#14 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 01 February 2006 - 06:21 PM

Neat Idea,

It looks Kevin is promoting an improvisational form of posting to the proivrc site.

Its been a while, but I beleive at one site we had to completely rewrite our user interface because all of the users s...

Just add some more to the story where ever someone leaves off.

#15 Tony White

Tony White

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Birmingham, United Kingdom

Posted 02 February 2006 - 03:50 PM

Its been a while, but I beleive at one site we had to completely rewrite our user interface because all of the users suddenly discovered they could d...



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!