(M) Fields: Difference between revisions
Created page with "'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'. == (M) Fields Script == ''Variables set by the SEM framework:'' The Perl Script: ''"(M) F..." |
(No difference)
|
Revision as of 11:54, 22 February 2011
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.
(M) Fields Script
Variables set by the SEM framework:
The Perl Script: "(M) Fields script" runs on the SEM user's workstation after a menu option has been selected and before the display of the input form.
The main purpose of the script is to enter text into the fields on the input form used by the menu option.
Variables:
The details of the variables stored automatically by the SEM framework at the start of script are shown below.
- Details of the Current SEM User:
Details of the SEM user that has invoked the menu option are stored in the following Perl variables:
my $USER_NT_USERNAME # Windows NT username my $USER_NT_COMPUTER # Windows NT computer name my $USER_SYSGEM_USERNAME # SYSGEM username my $CLIENT_BUILD # SEM Client Build (e.g. 2.3 4459)
- Details of the Current Display Window:
my $SysgemDisplayName # Custom Display Name (e.g. Enterprise Accounts) my $SysgemMenuOption # Menu Option (e.g. &Modify) my $SysgemVerbose # Verbose display option (either 0 or 1)
- Startup Fields:
The content of the fields entered in the start-up window as the display window was invoked:
my $STARTUP_XX # Where XX is the two character code used in the startup window
- Selected Entry:
All fields in the selected entry in the display window are recorded in Perl associative arrays (hashes). For each field in the selected record there are two hash elements, The first gives the "Title" of the field as shown in the display window, the second gives the content (value) of the field. For example:
my %SelectedEntry = ();
#
$SelectedEntry{0}{"SV"}{"title"} = "Agent"; # holds the title of the column in the display
$SelectedEntry{0}{"SV"}{"value"} = "GEMINI"; # holds the Server (Agent) name of the selected record
#
$SelectedEntry{0}{"UN"}{"title"} = "Username"; # holds the title of the column in the display
$SelectedEntry{0}{"UN"}{"value"} = "SmithJ"; # holds the username of the selected record
... the number of lines selected is shown in the variable...
my $SelectedEntries = 1; # number of selected entries
- Details of the Authorization Server
my $USE_AUTH_SVR_PROXY # Whether the Authorization Server may be used for DB access (either 0 or 1) my $AUTH_SVR_ADDRESS # The address of the Authorization Server as used in the SEM Login window my $AUTH_SVR_PORT # The port number of the Authorization Server as used in the SEM Login window
- Output from Initialization Scripts (if any).
Output from the initialize script such as "(I) Windows" are made available in an array:
my @script_output = (); # push(@script_output, "e.g. - 1st. line of output"); push(@script_output, "e.g. - 2nd. line of output");
- Agents currently connected by this Display Window
my @CurrentServers = (); # push(@CurrentServers, "GEMINI");
- Details of the Types of Connected Agent(s)
#
# Server types (1)
#
my $ServerTypes = 1;
#
my %ServerType = ();
#
$ServerType{"GEMINI"} = "NT";
- Total Agents available to this SEM user
my @DefinedServers = (); # push(@DefinedServers, "GEMINI"); push(@DefinedServers, "SIRIUS"); .. etc ..
- Values Stored in the Registry for this Form (values are those previouslyused by the form, and will be used by default)
my $VALUE_SV = "GEMINI"; my $VALUE_UN = "SmithJ";
... to suppress the use of previous entries used by this form, insert the following into this "(M) Fields" script:
# # Disable registry save / restore. # print "&& : OFF\n";
- Access Control Token Settings
Details of the "Access Control Tokens" that are available to the SEM Users (via the SEM Profile for this user) are available to all scripts that run on the SEM user's workstation. To see how to make this available to the script, please read: Access Control Tokens