' This script constructs the Windows Clearcase View path 
' accesible from Oracle db process (for RTPS to work)
' and creates a small executable batch file called ~myuserin.bat,
' which can be executed to yield environment variable OWBCC_HOME

' This script expects ~myuserin.txt to be present in current working dir.
'~ myuserin.txt should contain view name as produced by 'cleartool pwv -short'

dim fs,f
set fs=CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile("~myuserin.txt",1,true)
ViewName = f.ReadLine()
f.Close
set f=Nothing
set fs=Nothing

set fs=CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile("~myuserin.bat",2,true)
f.Write("set OWBCC_HOME=M:\")
f.Write(ViewName)
f.WriteLine("\whdev\2.0\owb\shiphome")
f.Close
set f=Nothing
set fs=Nothing