Saurabh,
the thread starts "
The cluster name need to pass through argument. The issue is cluster name in cutomer environment consists of two word and that is why it consists of white space e.g "Reporting Cluster".How can i pass the name in single argument, Please help."
If I launch the next (dummy) script (argu.py)
import sys
argu1 = sys.argv[0]
argu2 = sys.argv[1]
argu3 = sys.argv[2]
print "1º argument: " + argu1
print "2º argument: " + argu2
print "3º argument: " + argu3
WITHOUT parameters I have the next message
wsadmin.bat -conntype NONE -f C:\gabi\argu.py
WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7017E: Exception received while running file "C:\gabi\argu.py"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): File "", line 3, in ? IndexError: index out of range: 0 the same script passing parameters
wsadmin.bat -conntype NONE -f C:\gabi\argu.py
one two three WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable:"[one, two, three]"
1º argument: one
2º argument: two
3º argument: three
and the same script passing parameter who has two words in single parameter
wsadmin.bat -conntype NONE -f C:\gabi\argu.py
one "two words" three WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[one, two words, three]"
1º argument: one
2º argument:
two words 3º argument: three
Hope this helps,
regards