Main Display Script: Post-Processing: Difference between revisions

From Sysgem Support
Jump to navigationJump to search
Created page with "'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'. == SEM Display, Main Post-processing Script == ''Variables set by the SEM framework:'' Th..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.


== SEM Display, Main Post-processing Script ==
----


''Variables set by the SEM framework:''
''Variables set by the SEM framework:''
'''SEM Display, Main Post-processing Script'''


The Perl script: ''"Post-processing"'' (invoked as a SEM Display Window is started) runs on the workstation that started the display.  
The Perl script: ''"Post-processing"'' (invoked as a SEM Display Window is started) runs on the workstation that started the display.  
Line 34: Line 37:
     my $USER_SYSGEM_USERNAME  "SYSGEM username"
     my $USER_SYSGEM_USERNAME  "SYSGEM username"
     my $USER_DISPLAY_VERBOSE  "Verbose display option (either 0 or 1)"
     my $USER_DISPLAY_VERBOSE  "Verbose display option (either 0 or 1)"
     my $SEM_CLIENT_BUILD      "SEM Client Build (e.g. 14178392.14178388 4459)"
     my $SEM_CLIENT_BUILD      "SEM Client Build (e.g. 2.3 4459)"




Line 95: Line 98:
''''''Output from the Post-procesing Script''''''
''''''Output from the Post-procesing Script''''''


This section describes what has to be done in the Post Processing script if the output from the Agent is to be modified before it is displayed in the window.
If the output from the Agent is to be modified before it is displayed in the window, then read [[Suppress Agent Output in Post-process]] for more information.
 
If the Agent returns data that resembles the following, then this data will be processed by the SEM framework and inserted automatically into the Display Window:
 
    "AA : <Text>"    # information for cell (AA) for first row of data
    "AB : <Text>"    # information for cell (AB) for first row of data
    "AC : <Text>"    # information for cell (AC) for first row of data
    "@"              # terminates first row
    "AA : <Text>"    # information for cell (AA) for second row of data
    "AB : <Text>"    # information for cell (AB) for second row of data
    "AC : <Text>"    # information for cell (AC) for second row of data
    "@"              # terminates second row
 
To prevent the data being displayed before it is modified by the Post Processing script, execute the following Perl statement:
 
    print "{{REPLACE_VALUES=YES\n";      # do NOT display data from the agent
 
The Post processing script can then load the data into the array:  ''@input_array''  by calling the subroutine: ''LoadInputArray();''
 
Once the data has been processed and potentially reformatted, the output is sent to standard output for the SEM framework to insert into the display window, with the following Perl statements
 
    print "AA : <Modified Text>\n";    # information for cell (AA) for first row of data
    print "AB : <Modified Text>\n";    # information for cell (AB) for first row of data
    print "AC : <Modified Text>\n";    # information for cell (AC) for first row of data
    print "\@\n";                      # terminates first row
    print "AA : <Modified Text>\n";    # information for cell (AA) for second row of data
    print "AB : <Modified Text>\n";    # information for cell (AB) for second row of data
    print "AC : <Modified Text>\n";    # information for cell (AC) for second row of data
    print "\@\n";                      # terminates second row
 


Other printed output recognised by the SEM framework includes the display of a dialogue box. See [[Dialogue Boxes]] for more information.
Other printed output recognised by the SEM framework includes the display of a dialogue box. See [[Dialogue Boxes]] for more information.

Latest revision as of 09:46, 24 February 2011

'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.


Variables set by the SEM framework:


SEM Display, Main Post-processing Script

The Perl script: "Post-processing" (invoked as a SEM Display Window is started) runs on the workstation that started the display.

The purpose of the script is to (optionally) format the SEM Agent output before the window is displayed.

This section describes the variables that are automatically preset at the start of the script by the SEM framework, and how the output data can be modified.


Editing the Post-Processing Script

The main display Post-processing script is found in the following place in the SEM Development Interface:




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 display 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 $USER_DISPLAY_VERBOSE  "Verbose display option (either 0 or 1)"
   my $SEM_CLIENT_BUILD      "SEM Client Build (e.g. 2.3 4459)"


  • Details from the Startup Window:

Details of the Data Entered in the field in the Startup Window are shown in the following variables:

   my $INPUT_SV   "The Agent(s) selected for connecting to this display"
   my $INPUT_XX   "The values of the fields entered in the startup window - XX is the field code for each parameter field"


  • Details about the SEM Agent:

Details of the SEM Agent are shown in the following variables:

   my $server_name      "The Agent that has just returned data"
   my $server_type      "The Agent platform type... 'Windows 2000\/NT' / 'UNIX' / 'VMS' "
   my $server_sub_type  "The Agent platform sub type .... such as 'Linux' when $server_type = 'UNIX'"
   my @CurrentServers   "An array of all the agents requested to be connected" 
   my @ConnectedAgents  "An array showing those agents that have so far acknowleged their presence (but not necessarily returned their data yet!)"


  • Data Returned from the Agent

Details of the output returned from the SEM Agent are shown in the following array:

   my @input_array = ();   # Array to hold the output from the Agent that is sent as input to Post Processing
   sub LoadInputArray      # Call this subroutine to fill the array @input_array


  • Control Information

A count of the number of time the window has been refreshed is contained in the following variable:

   my $LOOP_COUNTER        # Starts at 0 and is incremented everytime the window is refreshed.


  • Details of the Authorization Server

Details of the Authorization Server are shown in the following variables:

  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"


  • License Information

License information is shown in the following variables:

   my $LICENSED_TO_COMPANY
   my $LICENSED_TO_CITY
   my $LICENSED_TO_ZIP_CODE
   my $LICENSED_TO_COUNTRY



'Output from the Post-procesing Script'

If the output from the Agent is to be modified before it is displayed in the window, then read Suppress Agent Output in Post-process for more information.

Other printed output recognised by the SEM framework includes the display of a dialogue box. See Dialogue Boxes for more information.