CICS Explorer workspaces - copying, locating, and more...
JoeWinchester 110000DQA0 Comments (2) Visits (2378)
When you start the CICS Explorer you start the cicsexplorer.exe runnable program. This creates a Java Virtual Machine and loads in the CICS Explorer Java classes and you can do cool stuff to CICS. The first time you start the CICS Explorer you get presented with a Welcome screen, and after closing this you might create a couple of connections, open some views for resources not on the default perspective, possibly move some views around, and maybe customize the columns for some views to get additional attributes.
The CICS Explorer stores this information in what is known in Eclipse terms as a workspace. The workspace is cool - it's like a memory - so when you re-open the CICS Explorer next time you're not presented again with a fresh Welcome screen and made to do all that customization again.
The workspace is a folder with some files in it. The default location varies based on the platform, for Windows XP it's c:\documents and sett
If you want to you can look inside the .cicsexplorer workspace folder and you'll see a bunch of files and folders. I don't suggest you try to fool around with them too much, but they do contain all of the information needed to capture information such as which perspectives are open., how the views are arranged within them, and for the CICS views which columns are present and the details of connections such as host/IP/port, etc...
You might be thinking "Joe, why are you telling me this - I love the CICS Explorer but I don't need to know how you guys made it so awesome", in which case you're a bit like me talking to a plumber when I might say "Don't tell me what diameter pipes you're using and whether the joints are compression or solder, just make me a nice bathroom to relax in after a long day at the office".
Here's why I'm telling you about workspaces.
They are a folder that gets created in an default location. You can set a different location, or locations, which enable you to have a single CICS Explorer installation but multiple shortcuts each of which use different workspaces. Given each workspace contains the set of connections and view and perspective customization, this means you can have a desktop icon saying "CICS Explorer production" or "CICS Explorer test" or "CICS Explorer beta", and so forth.
Workspaces can go wrong and wierd stuff happens. An example of this is when you use a workspace on a CICS Explorer that has some tools installed, and then you use it for a CICS Explorer with no tools. The perspectives for the tools will have a wierd <> symbol around them and you might get a message like "Unable to restore perspective". I'll tell you why and what to do.
The third reason, is that workspaces can be copied between CICS Explorer environments, either between different PCs or within a PC if you have done something like deleted your CICS Explorer and re-installed it, such as stepping up from CICS Explorer 1.0 to 1.1. If you have done this then you don't want to start at the welcome page all over again, and you don't want to get the "broken perspective" issues in number 2.
Setting the workspace to not be the default location
The way to set the workspace is using the -data argument to the cicsexplorer.exe. There are two ways this can occur.
The first is to set this in the cicsexplorer.ini file. This file will be in the same folder containing the cicsexplorer.exe and have the same name, so if for any reason cicsexplorer.exe is called ibmiscool.exe (which you could rename cicsexplorer.exe to and it would all work), then the file that gets used to launch the .exe and set its argument would be called ibmiscool.ini.
The file that we ship has everything on one line - sorry about that - I think it's something our build does so I'll chat to someone tomorrow about changing it so that everything is on new lines like below. Until that happens, the first thing you'll need to do when you open the file is find all of where the line breaks should be and add them, the lines should start with the -stuff sytax, so break at -startupplugins and -launcher and so forth. Once you have done this you can add two lines line -data and the location of the folder, shown below. You must do two things though - there needs to be a line break after -data and before the location of the workspace folder, and these must be before the -vmargs line.
If you don't put these two lines before the -vmargs line you'll get a nasty error message like this:
and if you don't put the line break after -data you just won't get your workspace location used.
One thing that's nice to know, is where is the workspace that a particular CICS Explorer is using. It should tell you this in the title bar but it doesn't, so we'll try to fix that, but until we do there's a neat trick.
Swith to the resource perspective (using Window -> Open perspective -> Other.. from the menu bar) and create a project (from the Explorer -> New Wizards -> Other... and General/Project) . You can call it anything you want, and then select it - open the properties from the pop-up menu - this will have the location of the project - which will be the workspace location and the project appended to it. For example, if you create a project called "Eng
The Location: shows that c:\workspaces\My Production Systems is the location of the workspace, so the -data argument worked. Cool.
The second way to create shortucts to the cicsexplorer.exe and specify the workspace on the shortcut.
Both of these two desktop shortcuts are pointing to the same cicsexplorer.exe. What makes them use different workspaces is the -data argument on the shortcut itself. To set the shortcut open the properties from the pop-up menu, and add the line to the end of the Target, after the cicsexplorer.exe
The properties above show that the workspace will be in c:\w
Generally workspaces don't go bad, but the most common failure problem I encounter, and others as well, is that a workspace has a lot of state in it to restore perspectives for a particular plugin, and it used in a CICS Explorer environment where that plugin isn't there.
For example, this is a CICS Explorer with lots of tools installed and lots of perspectives.
It's awesome. I can connect to CICS regions, MQ Queue managers, analyze faults, look at historic performance, clone regions, look at runtime dependnecies between CICS resources. This is why we created the CICS Explorer tools, to just add more awesomeness to something that already was awesome.
So, there's the problem. I use the same workspace on a vanilla CICS Explorer with none of the tool in it. Eclipse will try to restore the workbench state for the perspectives for the missing tools and start to get upset.
The first thing that'll look odd is that the perspectives have no graphic. This is because the workbench data has the name which is used in the toolbar, but the graphic belonged to the tool's plugin which isn't there. CICS SM is good because that's always in the CICS Explorer, but the others don't look great. Let's try to switch to one of them. We sort of know it's not going to work, because the perspective should have a bunch of views in it from the plugin, but the plugin isn't there because the tool isn't installed. Eclipse gets pretty upset.
You can press OK, and one of two things will happen. If the failure is because the perspective is there but the problem was because a view is missing you'll be OK. An example of this would be if we had opened an MQ Explorer view in the CICS SM perspective. We'd have this recorded in the workbench which would be trying to restore the perspective - it'd see the duff view - winge at us - we'd press OK and it would recover. Phew.
In this case we are not so fortunate. We have not only got none of the views, but we have not got the perspective. Eclipse will realize the perspective is beyond repaid and put < and > around it, e.g.
The only thing to do now is to close the perspective which you can do from the pop-up on the perspective itself. You can also see all perspectives in the preference page by choosing Window > Preferences and selecting Eclipse plat
Given that workspaces contain lots of stuff such as connection information, perspective information, view column customization, it's often good to copy them.
One way you can do this, which I don't recommend, is to take the workspace folder and just copy it to another name, e.g. .cicsexplorer to .
To use this feature of Eclipse, you need to enable the Eclipse capabilities which by default aren't fully enabled in the CICS Explorer. Do this by opening the preferences from Window > Preferences and navigating to Eclipse plat
There will now be a new export wizard, called Preferences. In the resource perspective project explorer view, open the pop-up menu and find it in the Export wizard
Select this and then you can put all of the preferences into a file. In your target workspace, you then do the same - switch on the full Eclipse capabilities, and then in the Import wizard list (from the Resource pespective project explorer pop-up menu) there will be preferences.
Now - this is the total and abolute gem of this technique. You are importing - you are merging - so if you environment you are doing the import into already has some connections, or some view customization, you don't lose these - they are not splatted. This is great if, for example, you customize a view with a set of columns the way you like it and want to share it - you just export your preferences and someone imports it and they get that in their view setup. Currently they'll get everything else as well, but it will merge the chan