STEP;1 : INstall STF in C:\STAF
Step2: create C:\STAF\service folder
Step3: put Stax in the service folder
STEP 4: Install perl and Python
STEP 5:Set classpath add -->C:\STAF\bin\JSTAF.jar;C:\python22\lib;
classpath add -->C:\STAF\bin\JSTAF.jar;C:\python22\lib;C:\perl\lib;
path add -->C:\STAF\bin;C:\Python22;c:\perl\bin;
create a new variable with PYTHONPATH and set the value C:\STAF\bin;
create a new variable STAF_DIR with the value c:\staf;
STEP 6:OPen the staf.cnf file from c:\staf\bin. put line given below
SERVICE STAX LIBRARY JSTAF EXECUTE C:\STAF\services\stax\STAX.jar
SERVICE EVENT LIBRARY JSTAF EXECUTE C:\STAF\services\stax\STAFEvent.jar
Step 7: Set trust level
TRUST LEVEL 5 MACHINE shukr02-RH5
Step 8: comment the line SSL in staf.cnf file
Step9: set the other trust machine.
Step 10: start Staf
Command:
Go to C:\staf folder in command prompt:
1.To Open the commad promt on trusted machine
staf
staf
2. Copy the file from one locatoin to other location:
C:\>STAF local FS COPY FILE "C:\Program Files\file1.txt" TOFILE "C:\Program Files\file2.txt"
STAF local PROCESS START SHELL COMMAND "copy \"C:\Program Files\file1.txt\" \"C:\Program Files\file2.txt\"" WAIT RETURNSTDOUT STDERRTOSTDOUT
3.LIST DIRECTORY ( like ls in Unix)
STAF local FS LIST DIRECTORY "C:\Program Files"
4.More kind of Unix command facility
like more "C:\Program Files\file1.txt"
STAF local PROCESS START SHELL COMMAND "more \"C:\Program Files\file1.txt\"" WAIT RETURNSTDOUT STDERRTOSTDOUT SAMECONSOLE
STAF local FS GET FILE "C:\Program Files\file1.txt"
5.echo this is the string to be parsed > "C:\Program Files\echofile.txt"
if fiile will not there it will craete the file:
this command will replace the content of file and put the string given after echo "this is the string to be parsed "
STAF local PROCESS START SHELL COMMAND "echo this is the string to be parsed > \"C:\Program Filesr\echofile.txt\"" WAIT RETURNSTDOUT STDERRTOSTDOUT
No comments:
Post a Comment