If I Know the User's Roscoe Prefix, How do I Find out Who They Are?
search cancel

If I Know the User's Roscoe Prefix, How do I Find out Who They Are?

book

Article ID: 24044

calendar_today

Updated On:

Products

Roscoe

Issue/Introduction

If I know the user's CA Roscoe Prefix, how do I find out who they are?

Environment

Release: 6.0
Component: ROSCOE

Resolution

There is an RPF called whois that will do that for you.

  1. Save the RPF below in a member in your library or your RPF library with a name of whois. Your RPF library is specified by the Roscoe startup parameter EXECPFX =.
  2. To run it type, 
     whois smi where smi is the user's CA ROSCOE prefix.  
  3. The response will give you, for example: 
    User=> ########x.xxxxx Key=> userid1 Prefix=> xxx  

<<WHOIS>>

 PUSH :* Save user's settings

 LET L2 = L3 = L4 = '' :* Initialize variables

 LET L1 = UPCASE(A1) :* Just in case

 SELECT FIRST

 WHEN A1 EQ '' :* Check for entered operand

   LET L5 = 4

 WHEN (LENGTH(L1) LE 3) OR (SUBSTR(L1 1 1) EQ '=') :* Assume prefix

   IF SUBSTR(L1 1 1) EQ '=' :* Prefixed with a '='?

     LET L1 = SUBSTR(L1 2) :* Y, Point past this

   ENDIF

   LET L3 = L1 :* Set PREFIX variable

   TRAP ON

   LET L2 = GETKEY(L3) :* Get the KEY

   TRAP OFF

   LET L5 = S.TC :* Get the return code

 WHEN NONE

   LET L2 = L1 :* Set KEY variable

   TRAP ON

   LET L3 = GETPFX(L2) :* Get the PREFIX

   TRAP OFF

   LET L5 = S.TC :* Get the return code

 ENDSEL

 POP :* Restore user settings

 IF L5 EQ 0 :* Everything ok?

   LET L4 = GETFKEY(L3) :* Set FKEY variable

   IF S.LEVELNUM EQ 1 :* User invoked this RPF

     RESPONSE 'User=> ' | L4 | ' Key=> ' | L2 | ' Prefix=> ' | L3

   ENDIF

 ELSE

   IF S.LEVELNUM EQ 1 :* User invoked this RPF

     RESPONSE 'Invalid operand specified for ' | S.PROGNAME | '=> ' | A1

   ENDIF

 ENDIF

 RETURN L1 L2 L3 L4 L5 :* Return to caller