Anyone here use Clearcase command from shell?

I am coding a korn shell script to automate certain things. Creating a baseline is one of them where I got stuck.

I google'd and found the available options of using

mkbl

command.

Inside my script this is what I am doing:

cleartool mkbl -all <myBaselineNumber in XXX.XXX.XXX.XXX format>

It gives

cleartool: Error: Cannot determine view context.
cleartool: Error: Unable to create baselines.

When I was using lsbl in my script, i used to pass

-stream myStreamName@myPVOBName

.

But for this mkbl command, the -stream is not allowed. So, how will I make it know that I want the Baseline to be created for a particular stream?

Note: I will not be creating any views in my script because I do not need it. All I wanted to do is just

  1. get the last baseline, #works
  2. Increament it by 1 #works
  3. Created a new baseline #does not work

Any clue/guidance, please?

setview before mkbl

cleartool setview VIEW_NAME