<quote who="Tom Dodds">
> We are migrating a company from an UltPlus system to UniVerse.  We are
> running UniVerse 10.1.11 on AIX 5.3.3.  The UniVerse is running Pick
> flavor.
>
> The legacy application relays heavily on the use of "LOGON port [command]"
> processes.  So if you say LOGON 92 EOD.REPORT.25, the system will start
> the
> EOD.REPORT.25 running on port 92.  It functions kind of like a PHANTOM
> process in that it really starts another session from the same account
> that
> the PHANTOM/LOGON was executed.  It runs the login paragraph of that
> account.
>
>
>
> One of the problems is that the LOGON does not populate the @tty variable
> with PHANTOM or LOGON or anything else that we can find.
>
>
>
> The second problem is that we can not find where the system is storing the
> [command] that is passed into the new session.  We have displayed all of
> the
> @ variables that we can find in the basic manual and none of them contain
> the proper data.

Instead of @ variables, try SYSTEM() and see if one of those is unique
enough to key off of.

>
>
>
> I know the port number is strange, but we have figured a way to deal with
> that, we just can't skip the logon paragraph or find what process we are
> supposed to be running.

I wrote a script that might help. It's autorun on login at the unix level
from an entry in /etc/profile. Here's what it looks like (the other
scripts it calls are included after):

session.sh:
#!/usr/bin/ksh
# Karl

if [ $LOGIN = 'karlp' -o $LOGIN = 'uv' -o $LOGIN = 'uvadmin' ] ; then
   echo > /dev/null
else
   MYTTY=`showtty.sh`
   TTYPTS=`who am i|cut -c13-19`
   DATEINFO=`date`
   echo "--"LOGNAME: $LOGNAME"\c" > /home/karlp/sessions/$LOGIN.$MYTTY
   echo "   "TTY: $TTYPTS"\c" >> /home/karlp/sessions/$LOGIN.$MYTTY
   echo "   "UV.PORT: `port.sh $PPID` >> /home/karlp/sessions/$LOGIN.$MYTTY
   echo "      "PWD: $PWD"\c" >> /home/karlp/sessions/$LOGIN.$MYTTY
   echo "           "PPID: $PPID >> /home/karlp/sessions/$LOGIN.$MYTTY
   PSINFO=`ps -ef|grep $PPID|grep -v grep|grep -v session.sh`
   echo "  "PS.INFO: $PSINFO >> /home/karlp/sessions/$LOGIN.$MYTTY
   IPCS=`ipcs -mop|grep $PPID|grep -v 0x0`
   echo " "SHM.INFO: $IPCS >> /home/karlp/sessions/$LOGIN.$MYTTY
   echo " "TIMEDATE: $DATEINFO >> /home/karlp/sessions/$LOGIN.$MYTTY
   echo " "TIMEZONE: $TZ >> /home/karlp/sessions/$LOGIN.$MYTTY

fi

showtty.sh:
#!/usr/bin/ksh
# Karl
MYTTY=`tty|cut -f3 -d'/'`
if [ $MYTTY = 'pts' ] ; then
      MYTTY=`tty|cut -f3 -d'/'`
      MYTTY=$MYTTY`tty|cut -f4 -d'/'`
   else
      MYTTY=`tty|cut -f3 -d'/'`
   fi
echo $MYTTY

port.sh:
#!/bin/sh
# Karl
# must pass $USER
if [ "$1" = '' ] ; then
  echo usage: $0 $USER
  exit 1
else
  OP=`ipcs -mop|grep -v 0x0|grep -v 0x7|grep $1`
  if [ "$OP" = '' ] ; then
    OP=`who -u|grep "$1 "`
'   IFS='
    for i in $OP
      do
      LL=`echo $i|cut -c48-54|perl -pe 's/ //g'`
      OP=`ipcs -mop|grep -v 0x0|grep -v 0x7|grep $LL`
      OP=`echo $OP|cut -f2 -d'x'|cut -f1 -d' '|cut -f2 -d'b'`
      OP=`echo $OP|tr 'a-f' 'A-F'`
      OP=`xtd $OP`
      printf $OP
    done
   exit 0
  else
    OP=`echo $OP|cut -f2 -d'x'|cut -f1 -d' '|cut -f2 -d'b'`
    OP=`echo $OP|tr 'a-f' 'A-F'`
    OP=`xtd $OP`
  fi
fi
printf $OP


Hopefully something in this will give you the information you need to
extract to get the behavior you need.

Karl

>
>
>
> Thanks for the help in advance.
>
>
>
> Tom Dodds
>
>  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>
> 513-563-2800 Cincinnati Office
>
> 708-234-9608 Chicago Office
>
> 630-235-2975 Anywhere Cell
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>


-- 
karl

     _/  _/      _/      _/_/_/       ____________   __o
    _/ _/       _/      _/    _/     ____________  _-\<._
   _/_/        _/      _/_/_/                     (_)/ (_)
  _/ _/       _/      _/           ......................
 _/   _/ arl _/_/_/  _/ earson    [EMAIL PROTECTED]

--
IT Director, ATS Industrial Supply, Inc.
http://www.atsindustrial.com
Toll-free: 800-789-9300 x29
Direct2Desk: 801-978-4429
Facsimile: 801-972-3888
--
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to