ADD SVR from a menu Pre-Process: Difference between revisions

From Sysgem Support
Jump to navigationJump to search
No edit summary
No edit summary
Line 5: Line 5:
''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:
[[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";

Revision as of 18:21, 21 February 2011

'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:

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";