ADD SVR from a menu Pre-Process: 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'. == Adding Variables to the main target script from a menu option: "(M) Pre-process" script=..."
 
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'.


== Adding Variables to the main target script from a menu option: "(M) Pre-process" script==
----


''Adding Variables to the Menu Main Target Script:''
''Adding Variables to the Menu Main Target Script:''


To add a variable (or even a set of command lines) to the main target script that runs when a Menu option has been selected, print the "ADD_SVR" output from the "(M) Pre-Processing" script as follows:
 
'''Adding Variables to the main target script from a menu option: "(M) Pre-process" script'''
 
 
[[File:pre-proc-output2.jpg]]
 
 
To add a variable (or even a whole set of command lines) to the main target script that runs when a Menu option has been selected, print the "ADD_SVR" output from the "(M) Pre-Processing" script as follows:


     print "\@{{ADD_SVR <target script command>\n";
     print "\@{{ADD_SVR <target script command>\n";
Line 32: Line 39:
     print "\@{{ADD_SVR \$ COUNT = 3\n";
     print "\@{{ADD_SVR \$ COUNT = 3\n";
     print "\@{{ADD_SVR \$LOOP:\n";
     print "\@{{ADD_SVR \$LOOP:\n";
     print "\@{{ADD_SVR \$  if COUNT .GT. 5 then .goto. DONE endif\n";
     print "\@{{ADD_SVR \$  if COUNT .gt. 5 then .goto. DONE endif\n";
     print "\@{{ADD_SVR \$  write sys\$output \"value : <nowiki>''</nowiki>COUNT'\"\n";
     print "\@{{ADD_SVR \$  write sys\$output \"value : <nowiki>''</nowiki>COUNT'\"\n";
     print "\@{{ADD_SVR \$  COUNT = COUNT + 1\n";
     print "\@{{ADD_SVR \$  COUNT = COUNT + 1\n";
     print "\@{{ADD_SVR \$DONE:\n";
     print "\@{{ADD_SVR \$DONE:\n";

Latest revision as of 10:25, 24 February 2011

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


Adding Variables to the Menu Main Target Script:


Adding Variables to the main target script from a menu option: "(M) Pre-process" script



To add a variable (or even a whole set of command lines) to the main target script that runs when a Menu option has been selected, print the "ADD_SVR" output from the "(M) Pre-Processing" script as follows:

   print "\@{{ADD_SVR <target script command>\n";

... for example:

For a target Windows Agent Script:

   print "\@{{ADD_SVR my \@val = qw(3 4 5);\n";
   print "\@{{ADD_SVR foreach my $item (\@val)\n";
   print "\@{{ADD_SVR {\n";
   print "\@{{ADD_SVR     print \"value : \$item\\n\";\n";
   print "\@{{ADD_SVR }\n";


For a target UNIX / Linux Agent Script:

   print "\@{{ADD_SVR for i in 3 4 5\n";
   print "\@{{ADD_SVR do\n";
   print "\@{{ADD_SVR     echo \"value : i\"\n";
   print "\@{{ADD_SVR done\n";


For a target VMS Agent Script:

   print "\@{{ADD_SVR \$ COUNT = 3\n";
   print "\@{{ADD_SVR \$LOOP:\n";
   print "\@{{ADD_SVR \$   if COUNT .gt. 5 then .goto. DONE endif\n";
   print "\@{{ADD_SVR \$   write sys\$output \"value : ''COUNT'\"\n";
   print "\@{{ADD_SVR \$   COUNT = COUNT + 1\n";
   print "\@{{ADD_SVR \$DONE:\n";