98  

The ISSUG Infobase contains archived postings from our on-line discussion forums. This index is for most of the 1998 postings. Nothing here may be quoted without the written permission of the author(s) of the original postings.

FAQ98 content: George Simpson

                 

FAQ 98 - Section 5

#SUBJECT: Disabling Multiple Instances
#BY : Michael Mcarthy

I'm looking for a way to cancel execution of a program if another instance has been previously started and is currently running. We are using COOL:Gen 4.1 for NT and havenot been able to find anything that would facilitate this. Does anyone know of an optionwithin the tool to check on a previous instance?

RE: Disabling Multiple Instances
#BY : Doug Michael

You can try the COOL:Gen 'Window' function in your action diagram, but this is restricted to looking for windows/dialog boxes related to the currently executing procedure step...

Set local myworkset guiobject to Window(MYWINDOWNAME)
IF local myworkset guiobject IS EQUAL TO NOTHING .........

A more general solution is provided by the WinFun action diagram add-in. This will detect any window on the desktop. A common use is to achieve modeless single instance primary windows with logic looking something like this:

NOTE Check to see if window is already open
SET local_winfun ole handle TO local_winfun ole guiobject rnFindWindowByName("My Window Caption", 0)
IF local_winfun ole handle IS GREATER THAN 0
| NOTE Window found, bring it to the top
| SET local_winfun ole handle TO local_winfun
| ole guiobject rnSetForegroundWindow(local_winfun ole handle)
|----ELSE
| NOTE Window not found, open it
| EXITSTATE IS link_to_xxx

More info at www.rainier.co.uk


#SUBJECT: C programming help
#BY : LARRY BARRECA

I am trying to use a C++ eab to determine if Client Manager is running. I received some code from this site a few months ago. I put this code in the C eab with the windows.h include. I compiled the eab and built a new extrn.lib file from MS visual C++ with the new C eab included in this lib file. I am trying to pass a flag back to my cool:gen code to determine if client manager is running. The following is the Cool:gen code and the C eab showing the code that I added:

Cool:Gen code:

...
4 | LOCALS:
5 | Work View local_eab ief_supplied
6 | flag
...
11 | USE client_manager_running
12 | WHICH EXPORTS: Work View local_eab ief_supplied FROM Work View export_eab ief_supplied

RE: C programming help
#BY : RUSTY THOMAS

Try :

HWND hwndWindow;
if ((hwndWindow = FindWindow(NULL, "Client Manager")) == NULL)
memmove ( a_0008061094_ioa->l000l01.flag_001, "n" , 1 );
else
memmove ( a_0008061094_ioa->l000l01.flag_001, "y" , 1 );

(the flag_001as is the missing flag and is used only by coolgen. You will need to use flag_001.)

You will also need to put

#include at the top of the code

Also, if you generate the action block and you 'unclick' the options for HPVP and generate missing flags it makes it easier to code.

For example,

a_0008061094_ioa->l000l01.flag_001as
becomes
w_ioa->flag_001.


#SUBJECT: Documentation on using OCX controls in your application
#BY : michael watts

Does anyone know of any documentation on how to use OCX controls in your application. The help in coolgen doesn't really explain how to get the OCX on your window and then to get it executed.

Any help would be greatly appreciated.

RE: Documentation on using OCX controls in your application
#BY : Amit

Try lookking under the composer/coolgen directory on your PC. If there is a subdirectory all GT you wil have help files for GTLISTVIEW, RICHEDIT and TREEVIEW ocx's. This maybe a start for you....

RE: Documentation on using OCX controls in your application
#BY : DAVID MUELLER

The Cool:Gen installation CD has several sample models that use the Green Tree, Sheridan & TI OCXs. You can find them in the samples directory under the Win95 & WinNT directory.

You may find them usefull.


#SUBJECT: Screen size
#BY : ACATHER

If I develop windows on my 1024 x 768 screen, will cool:gen run the window OK on a 640 x 480 screen? Or do I need to cater for the smaller size when I design the window?

RE: Screen size
#BY : arun

No, we have learned the hard way. When you run the window on 640 x 480 or any other monitor with smaller size display area, the application window will overflow. i.e, you can not see the pushbuttons at the botton etc. So the development PC should have its display set to the smallest value for which you want to run the application.

RE: Screen size
#BY : DAVID MUELLER

You will need to cater for the small size. A window designed on a 1024 x 768 will appear larger on the lower resolution screen. When initially designing the window, set your screen size to the lowest resolution that will be used by the users. I.e. 640 x 480.


#SUBJECT: Changing bitmaps within an application
#BY : Michael Watts

Does anyone know how to change a bitmap within an application? I have a need to show users a listbox containing information that has been sent to them. They would like a bitmap of an open envelope or a closed one to let them know what they have already looked at. Also can a bitmap be placed in a listbox?

RE: Changing bitmaps within an application
#BY : Dan Atwood

Just figured out how to add bitmaps to the GreenTree ListView control yesterday and was itching to show somebody.

The GreenTree ListView control uses an ImagePool (like 2 rolls of film) to manage two types of icons that can show up in the ListView control - small and large. Once the size has been established it can't be changed until the ImageList is cleared. Since the GreenTree ListView can display either small or normal pictures next to each item, two ImagePools are needed to store either size.

INVOKE LISTVIEW.ListViewCtrl.ListItems.Clear()
+= FOR SUBSCRIPT OF group FROM 1 TO LAST OF group BY 1
| SET node gui gui_handle TO LISTVIEW.ListViewCtrl.
ListItems.Add(-32767, -32767, textnum(export_gv customer id), 1, -32767)
| | SET node gui gui_handle SubItems(1) TO export_gv customer last_name
| | SET node gui gui_handle SubItems(2) TO export_gv customer first_name
| | SET node gui gui_handle TO NOTHING
| +--
| INVOKE LISTVIEW.ListViewCtrl.Refresh()

The statement that adds the bitmap is the "ListItems.Add" and is the 4th parameter.

The "1" in this parameter pulls the first picture from the image pool.


#SUBJECT: Intercepting the F1 key
#BY : Jayson deVries

I have a C3 model running in Windows95 and I need to be able to intercept the F1 key to fire off my own help rather than going to the default Windows help. I've tried to follow it through the generated C code and as far as I can tell, there is a VK_F1, RCMD_HELP, VIRTKEY somewhere in WRG530N.dll or WRC530N.dll, but I don't have the source so I can't be sure.

Is the source for these available? If not, can I somehow intercept the F1 key and fire my own event?

RE: Intercepting the F1 key
#BY : Doug Michael dougm@rainier.co.uk

As no-one has replied I will offer this: I have a solution to this problem, but it is OLE-based and works therefore only in C4 or COOL:Gen. It involves the use of the WinFun add-in which has a MonitorKey function. This has been used by others to intercept the Print Screen key so F1 should be no problem. Mail me if interested or see www.rainier.co.uk


#SUBJECT: List files in a directory in a COOL:Gen program?
#BY : anders

Does anybody know how to list the files in a directory and make them available in a COOL:Gen program in NT or 95? I need to find out the file names of the files in a directory in order to then read the information in them. Reading sequential files from within a COOL:Gen program I have done before, but I don't know how to find out what the files in a directory are called. Anybody have a suggestion?

RE: List files in a directory in a COOL:Gen program?
#BY : Doug Michael

This is another of the many things you can do with the WinFun add-in. It includes a function called rnDirectory which takes a searchpath parameter eg 'c:\windows\*.ini' and returns to the action diagram a list of matching filenames.

Also included are rnCreateDirectory, rnRemoveDirectory, rnDirectoryExists among others.

You can download a trial from www.rainier.co.uk/rnwinfun.htm


#SUBJECT: reading a sequential or text file
#BY : SUSAN HOWARD

I am trying to read a file in coolgen. I coded the OpenTextFile function but did not recieve the file number no matter how I fiddled with it. Then I thought it could be a problem with the way I entered the file name so I chose File_Dialog as the OpenFileName.This was supposed to give me the standard Open File dialog box. However, it did not. Has anyone done this before? Can you help me out?

RE: reading a sequential or text file
#BY : DAVID MUELLER

If you are having problems with the new functions in coolgen (ie doesn't seem to work), it may be that the file wru410n.dll (or wru400n.dll for Composer 4.0) is not registered properly. Run the command regsvr32 wru410n.dll within your coolgen directory. You may not have regsvr32.exe on you PC (hence the reason why wru40n.dll has not been registered) so you must find someones PC which has it.

RE: reading a sequential or text file
#BY : Doug Michael

Another one which often causes problems is WROAF.REG. Try double-clicking on this in Explorer. It adds the registry entries for WROA0000.tlb and WROF0000.tlb


#SUBJECT: double click & right click in lists
#BY : roger tilbury

I have a list box where I want to have different mouse actions trigger different events. Clicking on an entry pops up dlg box A for that entry (correctly). Double clicking pops up dlg box B (correctly) but only after first 'seeing' the single click and popping up dlg box A (incorrectly).I have patched this by closing dlg box A in the event that pops up dlg box B, but this is not very elegant and results in window flickering.If I right click on an entry, nothing happens because the select character is not set (this is reported in SSW inq 10262534).

Does anyone have any comments/suggestions on this ???

Should I make an enhancement request ???

RE: double click & right click in lists
#BY : Doug Michael

We have had similar issues but have usually been able to find acceptable workarounds using 'persistent' local view flags, or counters to record the subscript of the last item clicked or double clicked, and escaping from the click event when we want the double-click to execute. Can't remember the exact details.

If I understand it correctly a double-click implies a click also and the double click logic should execute after the click logic. We found though that if you do anything significant in the click (like open a dialog box or flow to a server) then the double click MAY not execute - it just gets ignored.

Comparing the COOL:Gen behaviour with the equivalent in Visual Basic, you'll find its not that different in these respects: a double click always executes a click first; and a right click doesn't automatically highlight an item.


#SUBJECT: Calling third party programs
#BY : bakera

Platform: Windows NT

What is the best way of invoking a third part program (.exe) from within Composer 4.0 ? The executable is not OLE compatable.

From the infobase an msvc 5.x function call :

CreateProcess (NULL, "your.exe parameters ",
NULL, NULL, FALSE, DETACHED_PROCESS,
GetEnvironmentStrings(), NULL, &app_sui, &cm_pi ))

RE: Calling third party programs
#BY : Doug Michael

The best way to do it depends on what you want to do with the 3rd party program and whether the program has an API at all. All sorts of things are possible even if it doesn't. Do you just want to launch it and carry on with the Composer app, or do you want to drive it from the Composer app - passing data, clicking buttons etc? Tell us a bit more...


#SUBJECT: Calling a Cool:Gen client using OLE
#BY : mol

We have an application from which we would like to call a Cool:gen client using OLE.

Does anybody have experience with this?

-Is it possible to reuse the GUI from the client in another application using OLE?

RE: Calling a Cool:Gen client using OLE
#BY : Karl Erik Bergaust

Here is an example using VB:

Dim cool As Object
Set cool = CreateObject("loadmod.Composer.Application")

This will get the handle of the window.

Loadmod is the packaged name of the window manager.

Then you could access the Window objects by using dot notation.

->
Dim win as Object
Dim field as Object
Set window = cool.window("name of window")
Set field = window.Field("name of field")
field.value = "a value"

Haven't done much with this... except for experimenting with it. (A better way would maybe to use the COM Proxy to access the servers directly).


#SUBJECT: Retaining information in dropdown list boxes
#BY : Andy G

When I use dropdown boxes (list box type, not permitted values) which are populated as group views from a 'List' Action Block, I can select a list box item which becomes displayed in the top field of the dropdown box. However, I cannot retain this information. I understand that information will be lost by flowing to another procedure if views are not matched but how do you pass views so that the item you had selected in the calling procedure dropdown box is displayed upon return to that procedure. This is necessary for updating information where you require the current information to be displayed, with dropdown boxes available to give a list of new values.

RE: Retaining information in dropdown list boxes
#BY : DAVID MUELLER

You should not have any problems retaining the data (and the selected row) in the list box, if you have matched the import and export group view (check mapping in the window design tool)

You should also move all imports to exports in the procedure step and ensure that your group view is not being matched on the data returned on the dialog flow between the two procedure steps.


#SUBJECT: GUI - Tree control
#BY : dejavu

Hello, would anybody with experience in implementing a GUI tree control be willing to share some hints on how to do so using COOL GEN w/Oracle?

RE: GUI - Tree control
#BY : RUSTY THOMAS

There is a demonstration model provided with the installation CD. The model name is gttreevi.ief. It gives some good examples on creating and moving items in the list. There is a .doc file that gives some background on the model and the model itself is pretty straightforward.

One important thing to keep in mind is to always set your GUI objects to NOTHING when you are done with them.


#SUBJECT: Changing dialog box title dynamically in coop processing
#BY : Nancy Maleta

Has anyone found a workaround to be able to change dynamically the title of a dialog box in Cooperative Processing; it works fine in Windows; but in Coop it just ignores it. I would like to know if other people are having the same problem. We have an Open Event, and we do have the Set Caption statement in it with the title we want to changed to; and this works fine when we execute in windows environment, but when we execute in cooperative processing it does not, when we traced it does go thru those statements but ignores them, the title does not get changed.

RE: Changing dialog box title dynamically in coop processing
#BY : DAVID MUELLER

Is the Cooperative process being run on the same PC as the Window process? If it is not, you can do the following:

Register the load module by running the reg file created during the build.

If that doesn't work it sounds like the GUI runtime isn't set up properly.

From the command prompt cd to the COOL:Gen gui runtime directory and run regsvr32 wru410n.dll.

It may also be a good idea to run wroaf.reg.


#SUBJECT: OLE Queries: linking & embedding
#BY : Gina McVey

1. I am trying to link from a Composer 4 application to a Microsoft Access 95 (Version 7) database. I have linked to Excel and Word but can not see how to write the logic to link to an Access database on the LAN. Can you suggest anything? Currently, to link to Excel I am setting up a local work view (local guiobj excel) and then writing a set statement to open an Excel document. Is it possible to adapt this for access?

2. I am trying to embed a word document in the same Composer 4 application. I have set up an OLE area in the window and selected properties, insert, create from file. However, when I upload the model my project team can not see the embedded document. Do I need to write any logic and if so can you suggest an example. I tried a few ideas yet they only opened word separately. Is there a limit on the number of pages I can embed?

3. Also, when I link to Excel it is hit or miss whether the Excel window

opens in front of the main menu I am linking to it from. Is there a simple

way I can ensure the Excel spreadsheet always opens in front of the main menu? Can I open multiple links to different Excel spreadsheets at once and ensure that if multiple users try to access the spreadsheet they are made aware that they might only have read-only access.

RE: OLE Queries: linking & embedding
#BY : Doug Michael

1. OLE automation was brought in for Access 95 so it should work if you set your guiobject to CreateObject("Access.Application") and then invoke its methods to open the database etc. For more detailed info on the issues involved in integrating COOL:Gen clients with desktop programs see www.rainier.co.uk/rnwinfun.htm.

2. You need to distribute the relevant .OLE files to your project team which they should put in the \ole subdirectory underneath their xxx.ief model directory. These .OLE files, which are NOT stored in the encyclopedia (a bit like the bitmaps on your windows), hold persistent information about OCXs and OLE areas and later get merged into .SST files (one of these per window load module) which need to be available at runtime.

3. You don't have sufficient low-level Windows control to do this with COOL:Gen. You need the WinFun add-in which includes a SetForegroundWindow function which will bring any window you want to the front and make it active. Incidentally this is also useful for avoiding those annoying situations where you have several COOL:Gen windows open on modal links and the user clicks one on the task bar which is not the one which is intended to be the top one, but it comes to the front anyway with the hourglass showing - very confusing. You can check when a window is activated to see if another is loaded and make sure that that one is brought to the front instead.


#SUBJECT: trapping OLE/COM error mesages
#BY : RUSTY THOMAS

Is there way to trap the OLE/COM produced 'Unable to find method or property XXXXXX' error message? I would like to return the error to my programming to relaunch a COM exectuble, but now I only get the message box. Where does this message box come from? NT?Is there something in WinFun that can do this, or is there something like the OnError statment in VB for COOL:Gen?

RE: trapping OLE/COM error mesages
#BY : Doug Michael

As far as I'm aware there is no way of trapping this. We could add a 'IsValidMethod' type of function to WinFun to do it but you'd have to call it every time just before the real call.

Can you explain a bit more why this would be useful? I can see why trapping the unfriendly message would be, but how would relaunching the COM object help?

RE: trapping OLE/COM error mesages
#BY : RUSTY THOMAS

Our com object is an executable process that runs like a background process. It is started with a CreateObject command in COOL:Gen. Just on the slight chance that it is 'killed' later, when you try to Invoke a method,from the COOL:Gen apllicatin you get the 'Unable to...' message. I would then like the opportunity to set the old gui object to NOTHING and redo the CreateObject(aplication.exe) again. Right now I just have the message box, I hit OK and my application keeps on going like nothing is wrong. Of course it crashes hard a few lines later! Might be a nice enhancement for Winfun!

RE: trapping OLE/COM error mesages
#BY : Doug Michael

So my IsValidMethod idea which just checks the type library to see if that method is there wouldn't work. You want to know is it a valid method AND is the DLL/EXE running. Still possible of course. Perhaps just a IsLoaded function would do you?

It's similar but not quite the same as a requirement we have. We have different versions of a COM object and later ones contain methods that earlier ones don't. If the older versions are installed we don't want the 'Unable to...' message, we'd like to check to see if the method is exposed and report a 'please upgrade' type message. In this case the original IsValidMethod would do the trick. Another possibly better solution to this problem is to add a function to return the version number of the DLL/EXE - this is more generally useful but I don't think it could be used with COOL:Gen DLL/EXE files as these don't contain version info. All good stuff! We shall see what we can put into WinFun...


#SUBJECT: Using OLE/OCX requires CHANGE access to folder
#BY : Chris Uttley

We are using OLE/OCX controls for our COOL:GEN WINNT client procedures. We have found out that as we promote our generated applications from unit test to system test to production, we have to allow the users CHANGE access to the folder that contains the EXE,DLL, REG, OLE and SST files. So when we get to production, we'll have to grant CHANGE accessto our production folder that contains these things. This sort of goes against the usual thinking that production is a 'read-only' environment.

Anyone know why CHANGE access is required? Is this a COOL:GEN thing?

Secondly, has anyone developed a way to get around this requirement?

RE: Using OLE/OCX requires CHANGE access to folder
#BY : Doug Michael

It's the SST files that cause the problem. These contain the persistent info for the OCXs and the application must be able to update them in some situations.You can put everything else in a network read only location and move the sst files somewhere else which has write access - this can be a local directory on the workstation which is in the path.


#SUBJECT: COM Proxy and VB, restrictions on Programmatic ID?
#BY : Karl Erik Bergaust

This is about a restriction that is slightly related Cool:Gen generated proxies.It is maybe too VB oriented, but I'll try anyway.

In a current project we are using COM proxies generated from a CBD96 v2 compliant model.The COM proxy is used in a VB ActiveX component, which is used in the VB applications.When generating the ActiveX component from VB, VB claims that there is a restriction on the Programmatic ID (ProgID= modelnameAX.Operationname, where modelname and operation name are according to CBD 96 v2).

The max length is claimed to be 39 characters.

Cannot find anything about this in the Microsoft COM specification.

(I found in the COM spec. that a name cannot be more than 32 characters, but length of two names should then equal to 64, not 39)

Does anyone of you know if there should be a restriction in COM, ActiveX or VB for length of ProgID?

RE: COM Proxy and VB, restrictions on Programmatic ID?
#BY : Steve

During proxy testing we found many Com limitations which are notdocumented. However, this limitation may well be an internal VB limitation. Our Arranger product specifically choose ProgIDsshorter than 39 characters for earlier versions of VB to avoid this.Did you log an issue with Sterling Support for this?

RE: COM Proxy and VB, restrictions on Programmatic ID?
#BY : Karl Erik Bergaust

I haven't logged the problem with Sterling.I will if the 39 character limit remains in VB.You found it in earlier VB version, we found it in VB 5.0.So maybe it should be logged?I agree with you that this porblably is a VB limitation, not COM.If it was a COM limitation, it would not be possible to genereate/install the proxy from Cool:Gen?


#SUBJECT: Cross platform server flow
#BY : Kevin Bingham

I am looking for specific info on the following scenario:

I have a GUI client (W95) and I flow to (or use) a Unix server PStep, from there, I need to FLOW to an NT server Pstep, and then return back up the chain. I have read the links concerning COM proxy, 2servers and 1 client, but think that this is different to my needs, as there seems to be a return to the client in between the server calls. Has anyone done something like this before? More info available on request...

RE: Cross platform server flow
#BY : Glenn Smyth

This is not possible in straight Composer/Cool:gen as it is essentially a cross-platform server to server flow you are looking for. It used to be on the enhancement request list,don't know if it still is and when it might be coming. We did this at the Bank Of Irelandby developing an EAB interface to DECMessageQ and at Allied Irish Banks (though there the servers were on the same platform, different regions) using MQ_SERIES. I can give you a solution & code for same platform server-to-server flows. If you are interested (thoughit sounds like it won't meet your requirement) send me an e-mail. A few weeks ago I would have given you the details of the other solutions but after recent experiences I have had a re-think on my previous policy of giving all my knowledge/tools away for free.


#SUBJECT: diff between c files?
#BY : knravi

What exactly does the server manager file contain and what's the necessity of generating it everytime when it does not change with changes in the associated PS and ABs

RE: diff between c files?
#BY : Muat Gungor

I think the server manager keeps the definition of the import/export views and the prototype declaration of action blocks that is used in the procedure step, so it should be necessary to generate the 'c' code only if you add or delete some views,or change the matching(s), or change the action block declarations (change its viewattributes or add a USE for a new action block).

RE: diff between c files?
#BY : j. thils

The server manager contains also all the informations described in the dialog design window for the procedure (definition of the flows, informations passed between procedure steps).


#SUBJECT: Unable to construct window packages
#BY : hturan

I am getting the error "Generation failed" in some of the window packages (Oracle / NT).

There is neither a detailed information nor an err file on the construction path. Could it be due to number of action blocks in a single packet?

RE: Unable to construct window packages
#BY : bmorris

In my experience, the most common reason for window generation to fail is that the required bitmaps are not in the correct directory. Composer 4 onwards fails at build time, Composer 3 generates but gives you smiley faces instead of the bitmaps.The most common reason for a server generation/build to fail is that the cascade files are not copies into the model's c directory.

RE: Unable to construct window packages
#BY : ghoshal

Could it be due to Import/Export view size limitation in dialog flows?

RE: Unable to construct window packages
BY: george

Yes this could be due to the number of AB's you have as, there is still a limit in the batchit.exe program, but that is stretching things with the limited amount of information you supplied. Does your link deck look correct ?


#SUBJECT: FOREIGN AB generation
#BY : caroline slack

There is a dangerous rumor that you can generate FOREIGN ABs is it true?

If so does it use the libraries from the ABs home Business System?

If this is true what if the AB has been deleted from its home BS and is now homelless in another BS called by another AB.

What's happening is that we're not picking up the new version of the AB and we can't gen it from it home BS because it doesn't have one.

RE: FOREIGN AB generation
#BY : Darius Panahy

I am fairly sure that you can generate foreign ABs on the MVS ency and they will get placed into the libraries in effect for the load module that it is being generated from since this will be the only set of libraries that are available to the batch job. However unless you selected generate all for the load module, the install will not compile/link the generated action block if it is foreign, so you end up with the problem that the source has been generated but not compiled. This was true of previous versions, and might be different in COOL:Gen 4.1. Sounds like a question for Sterling support...

RE: FOREIGN AB generation
#BY : Glenn Smyth

>>>There is a dangerous rumor that you can generate FOR ABs is it true?

Yes it is true I'm afraid. Astonishingly, it was added as an 'enhancement' in 1992. The code to prevent it is still present (and commented out) in clist TICCGENE lines 160-167. Uncommenting these will disallow it again.

A slight mis-understanding in Darius' response. A foreign action block is never generated (or compiled) if you choose generate the entire load module (i.e. gen all). It can only be generated by expanding the load module and explicitly placing a g beside it. If you have automatic installation on then (as Darius says) it will not be compiled. However, you can also expand the load module afterwards and explicitly place a c beside it to compile it. So (a short-term) workaround to your problem would be to turn auto-install off, explicitly generate the foreign AB, then explicitly compile it afterwards.

>>>If so does it use the libraries from the ABs home Business System?

It uses the libraries from the business system of the load module being generated.

>>>If this is true what if the AB has been deleted from its home BS and is now homelless

in another BS called by another AB. Move/add it back to a business system again. I posted a few alternatives to how to achieve this before. It should be in the archives.


#SUBJECT: DB reverse engineering
#BY : Preben Nilsson

We are currently using the Sterling Database reverse engineering tool to maintain a datamodel+TD of our current DB2 environment. But this model is hard to maintain, as the Sterling DB reverse engineering tool is only able to create a new model, not update an existing one.

How do you model your existing DB2 databases in COOL:Gen ?

I think that this might be a good area for some of the clever 3rd party vendors to look into.

RE: DB reverse engineering
#BY : DAVID MUELLER

Several sites that I worked at reverse engineered existing databases. The DBAs/Data modelers then took the task to use that model to update other models (migrates) and all changes to the existing database were first modeled and implemented in the Cool:Gen model before being implemented in DB2. The changes included RI and indexes.


#SUBJECT: COOL:Gen 4.1 MVS Enc and IEF 5.31 toolsets
#BY : ken mcintosh

After downloading an IEF 5.31 model to an IEF 5.31 toolset, from a COOL:Gen 4.1 MVS encyclopedia, the window design tool is displaying incorrectly for menu items. Instead of the underscore under the mnemonic we are getting a greek 'e' character and this is displayed in generated applicationAfter corrections are applied, uploaded and downloaded the window is fine.We installed the COOL:Gen 4.1 encyclopedia in place of the old IEF 5.31 Encyclopedia.We would rather not correct every affected window so answers on a postcard please.

RE: COOL:Gen 4.1 MVS Enc and IEF 5.31 toolsets
#BY : Britt-Marie

I am not sure but it sounds like it could be a code page problem. Have you modified the IEFUP and IEFDOWN (for OS/2) IEFUW and IEFDOWW (for NT and windows) to default to the correct codepage (probably 850 for OS/2 and 1252 for NT/Windows)? In Composer 3 the codepage translation mechanism changed so that the workstations is sending a requester code page.IEF 5.31 is not sending a requester code page but the CE Cool:Gen4.1a software is expecting it.This will cause the CE to default the code page.

RE: COOL:Gen 4.1 MVS Enc and IEF 5.31 toolsets
#BY : ken mcintosh

After further investigation it looks as though the corruption occured before the COOL:Gen 4.1 Encyclopedia upgrade and we have only found about 30 occurences so is easy to fix.Possibly one of our IEF 5.31 workstations was set to the wrong code-page.The only codepage problem we have now is the '[' and ']' characters whichis also relatively easy to fix manually.


#SUBJECT: CSE with MSSQL 6.5 on NT, partners?
#BY : Beth

We are running a COOL:Gen cse with MSSQL Server 6.5 on an NT Server. We will have several models residing on the cse which vary in size from small benchmark models to a 750,000+ object model. What we are looking for are other COOL:Gen shops which have a similar profile in order to exchange information regarding the optimization of performance parameters and general correspondence/troubleshooting.

RE: CSE with MSSQL 6.5 on NT, partners?
#BY : Johnny S

We basically improved performance from our old environment by simply moving to a newer box (Compaq 6400 1Gig RAM 6 disks RAID 5). Now during Model Download we get 6863.46 objects/min instead of 1620.80 objects/min. on the old box.

Anyway, Sterling doesn't have much info as far as CSE tuning is concern. Their recommendation are the typical DB optimization stuff. You can probably get the white papers for tuning your NT box and DB from the vendor.

RE: CSE with MSSQL 6.5 on NT, partners?
#BY : Doug Brown

First of all thank you for responding to our inquiry. I hope that we can in turn provide you with information which will help your organization in this new development infranstructure.

The 6800 objects transferred sounds pretty good. To make sure we're comparing apples to apples I'll describe our environment and if you would be so kind please describe yours.

  • Server: IBM 704
  • Processors: 4x200 PentiumII
  • RAM: 512MB
  • Operating System: NT 4.0 Server service pack (sp)3
  • Workstations NT 4.0 Workstation, p166 w/112MB RAM.
  • Database for CSE: SQL Server 6.5 service pack 3
  • Cool:Gen: 4.1.a

When you said download 6800 objects/minute we understand you to mean that you performed a checkout from the CSE to the client workstation, is this correct? We are averaging about 4300 objects/minute under these conditions over our network. The relationship of model size to checkout time appears to be fairly linear.

RE: CSE with MSSQL 6.5 on NT, partners?
#BY : Johnny Serran

Our environment is;

  • SQL Server 6.5 Service Pack 4
  • NT 4.0 Service Pack 3
  • Compaq Proliant 6500
  • 1 Gig RAM
  • Dual Pentium Pro 200 w/1024KB cache ea.
  • RAID 5 (6 disks) 108GB Hard Drives w/SMART Array Controller 16MB RAM
  • Cool:Gen 4.1a

Our timing was from a CSE checkout via Checkout Client. BTW, the command line download.exe on the server performs the same.

I will report on the 4-way Pentium Pro 400 when the become available from Compaq.


#SUBJECT: Client Server Encyclopedia
#BY : msmxeds1

We are currently working with an HP-UX/Oracle encyclopedia, when we do a check in from the workstation after doing the transformation for the data model, the process takes too long (12 hours) and sometimes it crashes with an Oracle error message that says that the rollback segments run out of space.

RE: Client Server Encyclopedia
#BY : Derrick Ackermann

You don't mention the size of your model. We have a similar ency configuration, but our model sizes (up to 1.7M objects) make it impractical to check out whole models.

We would do a data model tranformation, etc on a subset scoped on the ERD and TD (in fact for various reasons, we actually maintain separate models containing the data model / TD, and do data model related maintenance here, then migrate to the relevant development model).

If your rollback segment space is insufficient, you may still experience this problem in other instances, so you should have a look at this anyway.

RE: Client Server Encyclopedia
#BY : amegie

I am the Client Server Encyclopedia Manager for our site. Do you (or anyone) know where I can get a hold of some Encyclopedia Management Documentation on Client Server? My experience is on the HOST Central Encyclopedia. Any help on the differences between managing a HOST Central Encyclopedia and a Client Server Central Encyclopedia will be greatly appreciated. Thanks.


#SUBJECT: NT / MSSQL server 6.5 upload problem
#BY : Arthur van Beek

I'm trying to upload an apply.trn of about 80 Mb (DOBJ table contains 1.3 million entries, DASC table 2.5 million entries) into a NT / MSSQL server CSE. The problem is that the logfile of the model database fills up before the upload ends. I have a 2 GB logfile but during the upload the log is growing and growing until it's completely filled after 4 days. Is there some secret parameter I forgot to set? I tried all the obvious ones....

RE: NT / MSSQL server 6.5 upload problem
#BY : Doug Brown

The first thing that comes to mind is that the transaction log file is simply not large enough at 2GB. We had a similar problem the first time we uploaded our model 2.6 millionrows in DOBJ and 4.6 million rows in DASC. Our model required about 1 GB of transaction log space and the fact that your model is about half that size but required a minimum of twice the log space is confusing. The second thing is that our model will load in about 6-8 hours. What kind of hardware do you have supporting your CSE? We're NT with MSSQL 6.5 and would be glad to exchange information on a continuing basis. There is a lot to learn.

RE: NT / MSSQL server 6.5 upload problem
#BY : Arthur van Beek

Thanks for your reply, it made clear that there is still hope for us! The fact is that we are currently using OS/2 as a development environment and are looking at the possibilities of migrating to NT. Since your upload was succesful and ours not there must be some difference; can you remember if you uploaded an apply.trn or an update.trn? I know that uploading an apply.trn takes a lot more time (and maybe transaction log space!) than uploading an update.trn (both created from the same subset of cause). So I'm going to try to upload the update.trn version of our model and keep you informed. The hardware \i'm using is just some old scrapmetal i found in a corner of our office (Pentium Pro 166 Mhz, 128 Mb, 2 SCSI harddisks 9 ms), it's only for testing. I have one more question for you, did you ever consider to use Oracle as the NT CSE DBMS?

RE: NT / MSSQL server 6.5 upload problem
#BY : Doug Brown

We've used the update.trn file alot but it seems to me that there may have been some difficutly using an extract and apply file that the administrator had to work through and may still be working through. She'll be back on Monday and I'll inquire further. What is your temp(DB) setting? We're running 100MB with 350MB configured for SQL alone. I think your hardware may have as much as anything to do with the performance you're experiencing.

I was not directly responsible for the selection of SQL Server over Oracle, therefore I'm not sure what the real reasons for that choice were. I was selected to help implement the CSE using SQL Server and have done so with really very few problems to speak of. NT 4.0 has been and continues to be a solid OS and we have no complaints there. We moved away from OS/2 earlier this year. I played a role in workstation rollout and design of the technical architecture for the NT environment and COOL:Gen (and assoc.) applications. I have a UNIX background and have enjoyed working with NT.

I hth and look forward to continued consultation and exchange of information.

RE: NT / MSSQL server 6.5 upload problem
#BY : Arthur van Beek

It took some time but I succeeded in creating an upload.trn (instead of an an apply.trn) and upload it into the NT CSE. However the CSE performance for a check-out is 10 times worse than OS/2 DB2/2 on the same machine so I guess I have to rebuild the indexes for better performance. For OS/2 DB2 there was a command file to rebuild the indexes, but for NT i have to do it manually?


#SUBJECT: CSE/CSE NT Remote Communications
#BY : Doug Brown

We are currently embarking on a project which requires us to establish communications between multiple CSE's across 2 NT domains, at remote locations, using different databases. One CSE will run MSSQL and the other one will use Oracle. The architecture will require multiple MDs and multiple encyclopedia servers. Is there any experience out here with an architecture of this type? Are you aware of any obvious pitfalls to this type of architecture?

RE: CSE/CSE NT Remote Communications
#BY : dlodge

I have had multiply CSE in NT, however only with ORACLE. I cannot predict any major problems except a more complicated MD to sort out if things go wrong. I presume that you will have a "Corporate" like Coordindation server with the encyclopedia(s) branching off. In fact, you may have a single MD or one master MD that is linked to the various other CSEs. The issue to be concerned with there is the amount of memory required. Take into consideration that on each NT each instance of ORACLE and/or MSSQL will require at least 128 MB (depending on the number of concurrent users that you anticipate). This is in addition to the memory required to run the various encyclopedia utilities (upload, migration, etc.).

If you have any specific issues, particularly on the ORACLE side, send me a email and I will go through my notes for you.

RE: CSE/CSE NT Remote Communications
#BY : Doug Brown

Thank you for your reply. We are now beginning to prototype the CSE configuration to support our architecture by assessing the impact of multiple coordination servers and multiple message dispatchers.

Another consideration is the construction server and how it may impact the coordination server(s) and encyclopedia servers. We're concerned about performance, administration, maintenance and model management implications of different CSE configurations, ie. the total cost of ownership based on our decisions.

Our hardware environment consists of 2 IBM 704s, w/512GB RAM, and about 30+ GB of disk storage space. Presently have configured about 350 MB dedicated to SQL Server. Our cache hit ratio is >90but fluctuates frequently without any clear reason why. The CSE object cache is at 100,000 but I'm wondering if more memory will be needed once the box goes production.


#SUBJECT: Read Only Subsets
#BY : amit

Does anybody know how to make a read only subset updateable ?

I was told once by a former colleague that there is a flag in the DAT files that can be used for this prupose. Can anybody help ? Thanks.

RE: Read Only Subsets
#BY : DAVID MUELLER

Why don't you checkout the subset in modify ? There was a utility that Sterling provided that could do things to the dat files. Have you tried asking them?

RE: Read Only Subsets
#BY : Rod Maxwell

The toolset you're looking for was/is called the Support Toolset and is not distributed because it is DANGEROUS. If I understand your situation, I don't think it will help you anyway.

That toolset would allow, amongst other things, the read-only flag for the subset on the PC to be reset to updatable in the case of a badly corrupted update tran file.

However, since you've checked out from the CSE as read-only, none of these objects will have the modify checkout flag set on the CSE. Therefore, even if you could trick the PC into thinking the subset was updateable, you couldn't get the CSE to accept the changes.

I think the better approach would be to copy the model (subset) on the PC, creating a new model with Delete authority on objects. When you get back from the client-site, generate a new model from the PC and do an adopt/migrate to get your changes into the real model.

A little more labour, but LOTS safer.

RE: Read Only Subsets
#BY : george

  1. turn off ency communications ( the file transfer )
  2. upload the file
  3. rename upload.trn to checkout.trn
  4. check it out ( no file transfer)
  5. repeate steps 2 - 5 to get everything in the correct order

the result is a slammed subset


#SUBJECT: Attachmate Extra! 6.3 and seamless transfers
#BY : Lindsay Campbell

I am trying to carry out seamless transfers using Attachmate Extra! 6.3, without any success whatsoever. I am using COOL:Gen 4.1a, under Windows 95, and it fails to recognise an Attachmate session when there is one open. (A colleague running NT 4.0 is having the same problem.)An additional problem is the perennial one associated with IND$FILE, but Sterling have given me a workaround of setting Attachmate to use US English, so I can at least do non-seamless transfers. Has anyone else had similar problems? If so, have you managed to successfully resolve them?

RE: Attachmate Extra! 6.3 and seamless transfers
#BY : ellist

A couple of things. First, I read somewhere that Attachmate 6.3 hasn't been certified for COOL:Gen, yet (only Attachmant 6.2..). Also, you might want to double check to see that yourAttachmate session has a short name assigned that corresponds to the session ID set up in theencyclopedia communications window for the COOL:Gen toolset. To set the Attachmate Short name,go into Options -> Global preferences -> Advanced.

RE: Attachmate Extra! 6.3 and seamless transfers
#BY : Lindsay Campbell

Thanks for this. The session name appears to be ok. Re certification, the issue is that we had problems with versions 6.1 and 6.2. Sterling provided PTFs for both, and then withdrew the one for 6.2. They (support) then told us (and are still telling us) that Attachmate have 'solved all the problems' in 6.3 (clearly not the case if we have to work in US English), and so, by default, this is the version we should now be using, despite the fact that tech reqs still tell us to use 6.1/6.2.

RE: Attachmate Extra! 6.3 and seamless transfers
#BY : Andy Paisley

I realize that you posted this a while ago and I hope you have solved your problem by now. I have been unable to get on the new Tissug site until now.

We use E!PC 6.3 successfully having encountered some errors initially.

Under settings, file transfer we set the structured field size to 32 and on the advanced tab we set the host code page to English UK (285)and we change the transfer program name to IND£FILE. This works.

The Host code page under display should also be set English UK.#

As already stated the advanced tab under global options should have the appropriate short name (usually A) set to the E!PC session name. This would have to be done for each different user on NT.

RE: Attachmate Extra! 6.3 and seamless transfers
#BY : Lindsay Campbell

Thanks for your help. I have mangaged to fix the problem - accidentally! I have stuck with the Sterling workaround of using IND$FILE/US English code page, however the trick appears to be to make sure that the US English code page is also set in the Display options - then the whole thing doesn't get it's knickers in a twist!


#Subject: Using NT COOL:Gen toolset sw from the LAN
#BY : ?

Is it possible to run the Cool:Gen toolset on a LAN?

RE: Using NT COOL:Gen toolset sw from the LAN
#BY : Christopher Macias

To give you a less 'legalistic' answer... ;-)

The document Sterling provides describing the setup on NT server is a good starting point, but you will still have to do a lot of experimenting to get it working correctly.

Since you are moving from OS/2 to NT I have a few suggestions. First, if you have a lot of developers, consider alternatives to configuring each developer machine. If you are new to NT, mastering the updating of software across a large LAN is something you don't want to learn while you are *also* experimenting with switching OSes and moving to NT COOL:Gen.

The simplest software distribution method is probably creating a master hard drive which is known to work, then duplicating that hard drive and swapping these copies in to each developer's machine each time the configuration changes significantly. Later you can move to something more sophisticated.

Secondly, Client Server Encyclopedias are great, but can be hell to maintain until you know what you are doing. If you start working with an NT CSE, have a good backup regime in place and TEST IT!

Finally, if you have to maintain some *users* on OS2 during the NT conversion, I can give you some suggestions about maintaining COOL:Gen apps that have to work on both platforms without having to maintain code in two models. Let me know if this applies to your situation and I can post or e-mail you the info.

RE: Using NT COOL:Gen toolset sw from the LAN
#BY : Hannu

First of all, using toolset software from the LAN was legal (you still have to pay for Sterling). Second, I've noticed, what does it take to automize the installation from the server by your own program. It can be done, but means efforts in every upgrade. We've chosen your method to image hard drives, when rolling out the sw to developers. But, I was looking for details, how to setupyour NT workstation to enable toolset software usage from LAN drive, instead of your local hard drive. We've saved some costs by this way of those developers,who aren't daily programmers! Looks like you've been involved in the similar process than we over here. Yes, if you have any documentation about how to maintain your model,when having two client target envs, I'd be more than happy to have that. We've examinedthe issue quite heavily, but the real work will begin on September. We haven't even thoughtof situation having two different models (we don't love a song called 'Migration Blues' too much).

RE: Using NT COOL:Gen toolset sw from the LAN
#BY : Christopher Macias

I only have the NT-on-a-server document in paper form, so you may have to get it from Sterling. See if somebody at your site has access to their technical support site, or if their is a representative who can get it for you.

The LAN people here are using Tivoli to manage software configuration. Microsoft's Systems Management Server (SMS) is, I'm told, too weak in its support of WANs to work well in a large business. Microsoft itself seems to have acknowledged this by buying or licensing a competing product to Tivoli and planning to integrate it with NT. I can hunt up the name of that product if you're interested, or you could check it out on the web.

As to the 'one model:two target environments' problem...

We followed up on a suggestion from another site that thought you could use the 'Dialects' feature for this. (Yeah, I never heard of it before either, but look for it in the tool and you'll see it.) Dialects allow you to attach multiple sets of windows to a single procedure. The idea was to support multiple languages by letting you create one set of windows for, say, English and another set for German or whatever.

I developed a procedure to use two dialects (one for OS2 and one for NT) to allow us to use a single code base for both environments until the OS2 clients are 'retired'. We've tested it and, although it has a few tricks you have to be careful of, it works. It is also MUCH less effort than splitting the models and trying to maintain the code base in parallel.

RE: Using NT COOL:Gen toolset sw from the LAN
#BY : Hannu

I was going to ask a doc existence from support center, but didn't know, that it is not public.

BTW, for those interested, with this same method, you can create separate development environments for different life cycles (unit test, system test ...)

Makes life much easier, since you don't have change the settings (model paths etc.) And still you have only one copy of the software on your PC.


#SUBJECT: Non-execution of Component code
#BY : John C

I hope someone can help with a CBD problem I'm having with a component. The Component consists of a Specification Action Block which calls a Mapping Action Block which in turn calls the Internal Operation Action Block. The component tests OK in the implementation model but problems occur when it is executed within the Application. Then the component code executes OK only up to and including any USE statements but on return from the USE statement all subsequent code within a Action block is ignored.

The component is called as an External, and the environment is Cool:gen 4.1a, NT and Oracle.

Has anyone any ideas about what may be causing this.

RE: Non-execution of Component code
#BY : Niall McMullan

When Cool:Gen is generating code, it checks whether there are any database statements in the code. If it does not detect any it generates / builds a different EXE. If all your database access is in specification operations, Cool:Gen will not detect it.

On the Build Tool, set the OPT.HAS_SQL parameter to YES.

RE: Non-execution of Component code
#BY : Blake Smith

This problem has ocurred for me when the action blocks in the calling chain have a mixture of high preformance view matching set. So check that all cabs in the component have the option either set on or set off. Then check the consuming applications calling chain for the same setting as the components.

RE: Non-execution of Component code
#BY : Chris Uttley

I agree that HPVP is the most likely problem. If the action block in the application has HPVP on and the corresponding action block in the implementation model has HPVP off, all kinds of weird things can happen......often it passes thru the action block OK but then dies later on in the code........


#SUBJECT: error handing using component
#BY : mathur

We are CBD site, and in process of developing Error handling component.

I have following questions.

1. We pupulate Return/Reason code in our opertions,

we are not sure about context string, what is the use of context string ?

2. What are the best practices for error handing in CBD.

We are using CBD96 Version 2. Any comment will highly appreciated.

RE: error handing using component
#BY : Chris Uttley

We use the context string for two primary things. One is to show the 8 character action block name that caused the 'error'. The other is to return

'data' to the client so that it can be displayed within the error message. The eight character action block (eg IAUD1871)is set in EVERY internal and public operation and is always the first parameter in the context string (parameters are separated by \). Other data, such as the id or name of the object being worked on are concatenated to the context string as appropriate.

You mentioned that you are developing an ERROR HANDLING component. Isn't the Error Handling component still free from Sterling?

RE: error handing using component
#BY : mathur

Is it a good idea to store global msg using RB35, and then string substitute the msg, and reuse it. Example

set context_string to '\ IAUD1871\Address line-1'

In RB35 record

$1 $2 is missing

Generated msg will be 'IAUD171 Aderess line -1 is missing

Reuse this msg

set context_string to '\ IAUD1871\Name line-1'

Generated message will be 'IAUD171 Name line -1 is missing

This will reduce number of msgs in RB35 and hence maintainable,

You comments will highly appreciated

RE: error handing using component
#BY : Chris Uttley

Your strategy sounds OK, with a couple of warnings.

1) If you use the HILITE ATTRIBUTES feature to highlight which attributes contribute to the error condition, you would have a hard time selecting which attributes to hilight for which 'version' of the message.

2) If you want to put in varying numbers of attributes that are specific to the 'version' of the message, you may have some difficulty

3) The entire error messages database is quite small and it is questionable whether or not you need to worry about reducing the number of messages.