[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 2.301::cimfast

Title:BASEstar CIMfast - Kits in note 3.
Notice:Kit info in 3.*, Documentation info in 4.*
Moderator:CAMONE::CUNHA
Created:Tue Jan 22 1991
Last Modified:Tue Mar 11 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:205
Total number of notes:770

205.0. "CIMfast on Windows-NT" by 21272::CYRO () Thu Feb 06 1997 08:59

Hello,

  We are using CIMfast V2.2 and BASEstar Open Server For Windows NT (3.51)
  but we are having problems whent using STR_LENGTH and STR_SUBSTR functions. 
  Below is present the cel file of my CIMFast program and the message error 
  showed when we run it. Basically we are using the examples showed in the 
  User's Guide.

                MY CEL PROGRAM


#include "d:\cimfast\include\bcfdefs.h"

#if defined(__vms__)
#define EXIT_SUCCESS    1       /* OpenVMS success status */
#else
#define EXIT_SUCCESS    0       /* Unix success status */
#endif
#define EXIT_FAILURE    -1      /* Failure status */

pt InBuffer             string:80;      /* Buffer de Recepcao */
pt InBufferLen  long;           /* Tamanho do Buffer de Recepcap */

/*
 * If an error occurs, rollback changes and exit.
 */
ON ERROR_EVENT;
   PRINT "***Executing error_event***";
   EXIT EXIT_FAILURE;
        

ON INIT_EVENT;
   PRINT "Inicializacando Rotina Trata Comunicacao...";
   PT_EVENTS_ENABLE NAME "com/mb_ho";


ON PT_EVENT (EQU (CUR_PT_NAME) "com/mb_ho");
    PRINT (CUR_PT_NAME);
        PRINT "Houve Alteracao";
        PRINT (STR_LENGTH "Hello world");
        PRINT (STR_SUBSTR 7 3 "Hello world");

/*
 * Exit Event - .
 */
ON EXIT_EVENT;
   PRINT "*** Finalizando Rotina Trata Comunicacao ***";



                   MESSAGE ERROR


Welcome to CIMfast V2.2
(c) Digital Equipment Corporation. 1996. All Rights Reserved

Preprocessing CEL file...

Loading CEL file....
PRINT - Expression creation failed
PRINT - Invalid expression function name found
PRINT - Function was: STR_LENGTH

PRINT - Action creation failed
PRINT - Expression creation failed
PRINT - Expression was number: 1
PRINT - Error was: Invalid parameter
At line 60

PRINT - Expression creation failed
PRINT - Invalid expression function name found
PRINT - Function was: STR_SUBSTR

PRINT - Action creation failed
PRINT - Expression creation failed
PRINT - Expression was number: 1
PRINT - Error was: Invalid parameter
At line 61

***Total lines in input file was 67***
***Total number of EVENTS was 4***
***Total number of ACTIONS was 9***
***Total number of CONDITION EVENTS was 0***
***Total number of CONDITION ACTIONS was 0***

Start time was: Thu Feb 06 11:35:18 1997

End time was  : Thu Feb 06 11:35:19 1997

Press return to begin execution: 
Inicializacando Rotina Trata Comunicacao...
*** Finalizando Rotina Trata Comunicacao ***


Please, could someone inform us if does these functions work in the 
CIMFast running on the Windows NT ? Or are there news commands to
do these functions. If not What is our mistake ?.


Thank you very Much.

Wilson Lemos .




T.RTitleUserPersonal
Name
DateLines
205.1strcmp on NT causes error w/ _ in expr namesCAM::JOHNSONimagine... sharing all the worldThu Feb 06 1997 11:3128
Hi,

>>  We are using CIMfast V2.2 and BASEstar Open Server For Windows NT (3.51)
Can i find out where you got the kit from (and when)??

I believe this is a known problem, and a fixed kit can probably be made
available early next week.


>>PRINT - Expression creation failed
>>PRINT - Invalid expression function name found
>>PRINT - Function was: STR_LENGTH
This error is a result of the CIMfast searching it's expression table and not
finding the STR_LENGTH expression.

Dick Long is currently supporting CIMfast on NT, and recently he found a
problem with this search on NT.  It is a binary-tree type search, but he found
the  STRCMP function used by C on NT only handles alpha-numerics correctly
(thus placing _ characters in the wrong search order), so sometimes valid
expressions were not being found in the table, and resulting in this error.

I'm not sure if he has a full kit built yet... he i currently at the BASEstar
User's group meeting in Orlando Florida, and will be back monday...
I'll mail this to him, and see if he can give us any pointers
to a new kit... otherwise you can expect one early next week, i'm sure.

thankx,
sarah
205.2kitsCAM::JOHNSONimagine... sharing all the worldMon Feb 10 1997 12:549
The first kit is if you are NOT using ORACLE, the second is is you are:


QUAKKS::DISK_LONG:[LONG]

CIMFAST_KIT.ZIP;1       2588  10-FEB-1997 12:02:44.12  (RWED,RWED,,RE)
CIMFAST_SQL_KIT.ZIP;1
                        2732  10-FEB-1997 12:02:36.14  (RWED,RWED,,RE)

205.3Files protected?VAXSPO::CYROMon Feb 10 1997 13:256
    Sarah,
    
    Please, make sure the files are not protected. I'm not being able to
    access them.
    
    Cyro
205.4cam::sys$public:CIMFAST_KIT.ZIP;1,CIMFAST_SQL_KIT.ZIP;1CAM::JOHNSONimagine... sharing all the worldTue Feb 11 1997 07:4217
>>    Please, make sure the files are not protected. I'm not being able to
>>    access them.
sorry..

i have moved them to cam::sys$public:

NEP2UN::SJ$DISK:[JOHNSON]> di cam::sys$public:*cim*.zip/sec

Directory CAM::PUBLIC:[PUBLIC]

CIMFAST_KIT.ZIP;1       2588  10-FEB-1997 12:02:44.00  11-FEB-1997 07:40:01.00
     [300,0]          (RWED,RWED,RWED,R)
CIMFAST_SQL_KIT.ZIP;1
                        2732  10-FEB-1997 12:02:36.00  11-FEB-1997 07:40:46.00
     [300,0]          (RWED,RWED,RWED,R)


205.5Problem with STR_LENGHT21272::CYROThu Feb 13 1997 14:4827
Sarah,

I have copied the CIMFAST_SQL_KIT.ZIP file you made available to us.

We are trying to use STR_LENGTH function, but got some non-expected results, 
as described herein.

We have created a B* data point using a datatype defined as a fixed length (80) 
array of visual chars. We also have defined a CIMfast variable of string type.
Then we have set B* data point to a known string, using B* CLI command, for 
example, "CF1000".

In the CEL program we set the CIMfast variable with the B* data point and then
we ask to print STR_LENGTH of the CIMfast variable. The result is 80. We were 
expecting 6. We also have asked to print the content of CIMfast variable and 
observed it is set to CF1000. But we have observed that blanks are added, or 
maintained, at the end of the string. We supposed this was caused because we 
have defined the B* data point as a fixed lenght array. Then we made another 
try, redefining the B* datapoint as a variable lenght array. The unexpected 
result is that we got a message saying CIMfast does not support variable 
lenght array.

Are we making any conceptual error?

Thanks,

Cyro
205.6varchar not supported... can make your ownCAM::JOHNSONimagine... sharing all the worldFri Feb 14 1997 10:3443
Hi,

>>maintained, at the end of the string. We supposed this was caused because we 
>>have defined the B* data point as a fixed lenght array. Then we made another 
>>try, redefining the B* datapoint as a variable lenght array. The unexpected 
>>result is that we got a message saying CIMfast does not support variable 
>>lenght array.
>>Are we making any conceptual error?

no error on your part... CIMfast does not currently have the variable string
datatype... 
you can create your own data type to map B* variable strings onto...
you can see the bcf_create_struct_sql.com and bcf_sql.cel as examples...
attached is a note i found in the qar conference that has a different
way of mapping the data type (dcm and B* OPEN treats variable strings the same
way... the first word is the length, followed by the data).

hope this helps,
sarah

             <<< CAM::$1$DUA5:[NOTES$LIBRARY]CIMFAST_QARS.NOTE;1 >>>
                           -< BASEstar CIMfast QARs >-
================================================================================
Note 30.1                           DCM_WRITE                             1 of 1
EKAS::EGERTON                                        17 lines  13-MAR-1992 16:40
--------------------------------------------------------------------------------

Miquel,

	This is because DCM's idea of what a string is conflicts with CIMfast's.
DCM expects a varying length string when you specify the format string.  Be
warned that the same sort of thing will happen in reverse if you try to read
a string.  The following should work okay to write to the device:


#define VARYING_STRING(str) (buffer_create (word (str_length str)) str)

on init_event;
   dcm_write device "DN_EKAS"
             address "0"
             format "string:7"
             value VARYING_STRING("CIMfast");
   exit;
205.7Problems with SQL and strings21272::CYROTue Mar 11 1997 21:3937
Sarah,

We are using the CIMfast/SQL for WNT (intel) you made available to us on
Feb,10th (see note 205.4).

At this moment we are testing it more intensively and we are observing it is
presenting some non-expected results. Just to be sure we are not making a 
conceptual error, we decided to take the demo program BCF_SQL.CEL included in 
the CIMfast kit.

We modified the demo program in order to insert one additional record, with 
the following fields contents:

NAME: cachorro12
BREED: abcdefghijkl
AGE: 876543

We are observing that at first print, the contents of the field name is 
printed correctly, i.e. with ten characters. This printout is the result of

print (sql_fetch "names"); 

However, after that, for example,as the result from the query to find all dogs
over 4 years age, the name and breed fields are being truncated: the last 
character is lost. And the numerical field (AGE) returns a wrong value.

We have observed that problems still persists with strings. We have created a
B* Open data_point of data_type with 10 characters. Reading this point with 
CLI command (get value) the value is correct. However, reading it from a 
CIMfast program, only nine characters are being returned.

Please, could you check these points and give me a feedback.

Cyro