SARBCH GSS Interface

View
interfaces to
GSS
(Global Subsystem) products. This interface allows you to code REXX routines to have other
GSS
products invoke SARBCH.
view
View
interfaces to
GSS
(Global Subsystem) products. This interface allows you to code REXX routines to have other
GSS
products invoke SARBCH.
Possible uses of the
GSS
interface for
View
are:
  • Each time a new user is defined to the system, the user is automatically defined to the
    View
    database.
  • Each time a user is deleted from the system, the user is automatically deleted from the
    View
    database.
Contents
Installation
GSS must be installed at your site. Information about installing
GSS
and the GREXX commands is contained in the
GSS
documentation.
GSS
/REXX Interface
SARBCH includes the
View
host command environment for
GSS
. This environment is accessed by the ADDRESS
View
GREXX instruction and it functions as follows:
  • The commands processed by the
    View
    host command environment are the same as those that can be specified on the SYSIN control statements that are processed by SARBCH.
  • The report listing and messages issued by the command environment are queued for processing by the GREXX exec.
  • The messages issued are the same messages that are issued by SARBCH.
  • The report listings produced are the same as the report listings produced by SARBCH, except that report headings and page breaks are not printed or placed on the queue.
GREXX Variables
The following GREXX variables are used:
  • XPVIEW.DBASE
Specifies the
View
database prefix that would normally be specified on the /DBASE NAME=xxxxxx control statement.
This variable must be specified before any XPVIEW commands are issued. As with SARBCH, the length of this prefix must be less than or equal to 17.
  • RC
    A variable set by the XPVIEW host command environment upon completion of the requested command.
    RC contains the return code from the requested command as follows:
    • -3
      Command not found.
    • -2
      Not enough memory to perform command.
    • -1
      Unable to access shared variable pool.
    • 0
      OK
    • 4
      Warning message issued; message text on stack.
    • 8
      Error message issued; message text on stack.
    • 9
      XPVIEW.DBASE not set.
    • 10
      XPVIEW.DBASE string too long.
    • 12
      Severe error message issued; message text on stack.
    • 16
      Fatal error message issued; message text on stack.
    • 28
      Language processor environment could not be found.
      Probable
      GSS
      installation problem.
    • 32
      Internal error.
    • Other
      Internal error.
Example
The following sample REXX exec demonstrates the use of the
View
host command environment. This sample is on the distribution tape, in the file CAI.CVDECLS0(HBRMRSPF).
/* REXX */ /*    Sample XPVIEW/ISERVE GREXX exec    This exec will look at the users in the CA <view>    database and change the banner to PRODBAN for those users    whose banner is currently set to TESTBAN. */ Address XPVIEW                      /*Set the host command env */               /*----+----1----5--*/ /*Must be <= 17 characters */ XPView.DBase = 'VIEW.SYSTEM1'       /*Set the XPVIEW database */ '/list user=*'                      /*List the users in dbase  */ If RC <> 0 Then Do                  /*Was there an error?      */    Say 'List users failed, RC='||RC /*Print an error message   */    Exit 1                           /*Exit with an error       */ End Else Do                             /*Process the user records */    NumRecs = Queued()               /* Get the number of records*/    UserData.0 = 0                   /* Initialize the User list */    Do i = 1 to NumRecs              /* Pull each record         */       Parse Pull Record             /*   off of the queue       */       If SubStr(Record,2,5) <> 'SARBC' Then Do  /* Skip messages */         UserData.i.UserId    = SubStr(Record,2,8)         UserData.i.PassWord  = SubStr(Record,12,8)         UserData.i.Master    = SubStr(Record,22,1)         UserData.i.Mask      = SubStr(Record,25,8)         UserData.i.DistId    = SubStr(Record,35,8)         UserData.i.Acc       = SubStr(Record,45,5)         UserData.i.Mode      = SubStr(Record,52,4)         UserData.i.Banner    = SubStr(Record,58,8)         UserData.i.Language  = SubStr(Record,70,1)         UserData.0 = UserData.0 + 1       End    End    /*       We now have the UserData records parsed out.       Process them here.    */    Do i = 1 to UserData.0       If UserData.i.Banner = 'TESTBAN ' Then Do          '/defuser user='||Userdata.i.UserId||' Banner=PRODBAN '          Num = Queued()          Do Num             Parse Pull Message             Say Message          End       End    End End