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

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3297.0. "Akros AG - Point 22329" by KZIN::ASAP () Tue Mar 11 1997 05:20

    Company Name :  Akros AG - Point 22329
    Contact Name :  Fruehauf
    Phone        :  0041 32 329 9043
    Fax          :  00 41 32 329 9035
    Email        :  [email protected]
    Date/Time in :  11-MAR-1997 10:20:28
    Entered by   :  Nick Hudson
    SPE center   :  REO

    Category     :  vms
    OS Version   :  
    System H/W   :  


    Brief Description of Problem:
    -----------------------------

From:	ESSB::ESSB::MRGATE::"ILO::ESSC::tgaillat" 11-MAR-1997 09:21:59.79
To:	RDGENG::ASAP
CC:	
Subj:	ESCALATION: POINT No22329

From:	NAME: ESCTECH@ILO          
	TEL: (822-)6704          
	ADDR: ILO                  <tgaillat@ESSC@ILO>
To:	ASAP@RDGENG@MRGATE


Hello - 

POINT Log Number	 22329

Company Name Akros AG	

Engineers name	Fruehauf

Telephone Number 0041 32 329 9043		

Fax Number		00 41 32 329 9035

E-mail Address		[email protected]

Operating System, Version	VMS 6.2

Platform			 DEC 3000 Model 300, AXP


Problem Statement		

Hi,

The Partner has problems converting data with DECForm.
Please, let me know if you accept the query,

Regards,

Thomas Gaillat

Trying Form in ACMS-Debugger
----------------------------

UBZHFU> acms/debug bodi_exe:DISPO_TASK_GROUP.TDB

ACMSDBG> select hb_stdwerte_task
Task is in the task debugger
Terminal is in SERVER HB_STDWERTE_SERVER

         OpenVMS Alpha DEBUG Version V6.2-100

%DEBUG-I-INITIAL, language is COBOL, module set to HB_STDWERTE_SERVER
%DEBUG-I-NOTATMAIN, type GO to get to start of main program

DBG> Go
break at routine ACM$HB_STDWERTE_SERVER
DBG> Go
Server HB_STDWERTE_SERVER has been started
Task is in SERVER HB_STDWERTE_SERVER
Task is in the task debugger
Task is in SERVER HB_STDWERTE_SERVER
Task is in the task debugger



Processing step exception from step EXCH_GET_HB in task HB_STDWERTE_TASK
Exception code text:
%FORMS-E-CONVERR, error while converting from one data type to another.
Exception code value: 14008946 (decimal), %X00D5C272 (hex)
Extended status information:
%FORMS-E-CONVERR, error while converting from one data type to another.
-LIB-F-ROPRAND, reserved operand
Task ended
%ACMSEXC-E-DECFORMS_ERROR, An error was returned from a DECforms request
ACMSDBG>  Exit
Terminal is in SERVER HB_STDWERTE_SERVER

Server HB_STDWERTE_SERVER stopped


Some source-code
----------------

DMU> list/full user_workspace

RECORDS.USER_WORKSPACE;1 <CDD$RECORD>
    Created by VAX CDD Data Definition Language Version V6.1
        on 10-MAR-1997 15:41:52.44 using protocol version 4.
    Source:
        DEFINE RECORD USER_WORKSPACE.
            USER_WORKSPACE STRUCTURE.
              UW_VOLATILE STRUCTURE.
                ACMS_TDMS_CONTROL STRUCTURE.
                    CONTROL_FIELD COPY FROM RATYPE_CHAR_8.
                    ERR_MSG     COPY FROM RATYPE_ERR_MESSAGE.
                    WARNING_CONTROL STRUCTURE.
                        WARNING_ARRAY STRUCTURE OCCURS 15 TIMES.
                            WARNING_STATUS      DATATYPE UNSIGNED NUMERIC
                                                SIZE 1 DIGIT.
                        END WARNING_ARRAY STRUCTURE.
                        WARNING_INDEX_STRUCT STRUCTURE.
                            WARNING_INDEX   COPY FROM RATYPE_NUM_CODE_2X9.
                        END WARNING_INDEX_STRUCT STRUCTURE.
                    END WARNING_CONTROL STRUCTURE.
                    MSG_LINE_TXT COPY FROM RATYPE_CHAR_80.
                    MASK_ERROR_INDICATORS COPY FROM
RATYP_MASK_ERROR_INDICATORS.
                    UPDATE_CONTROL STRUCTURE.
                        UPDATE_STATE    COPY FROM RATYPE_NUM_CODE_1X9.
                        NO_UPDATE_IND   COPY FROM RATYPE_CHAR_1.
                        NO_UPDATE_TEXT  COPY FROM RATYPE_CHAR_20.
                    END UPDATE_CONTROL STRUCTURE.
                END ACMS_TDMS_CONTROL STRUCTURE.
                HT_TEXT         COPY FROM RATYPE_HT_TEXT.
                STC_ABTEILUNG_DEF STRUCTURE.
                    STC_ABTEILUNG_9 DATATYPE UNSIGNED NUMERIC
                                                SIZE 1 DIGIT.
                END STC_ABTEILUNG_DEF STRUCTURE.
                HB_TEXT         COPY FROM RATYPE_HB_TEXT.
       ...




Form HB_STDWERTE_FORM

    Form Data
       ...
        Group USER_WORKSPACE
            Group USER_WORKSPACE
                Group UW_VOLATILE
                    Group ACMS_TDMS_CONTROL
                        CONTROL_FIELD Character(8)
                        ERR_MSG Character(3)
                        Group WARNING_CONTROL
                            Group WARNING_ARRAY Occurs 15
                                WARNING_STATUS Integer(1)
                            End Group
                            Group WARNING_INDEX_STRUCT
                                WARNING_INDEX Integer(2)
                            End Group
                        End Group
                        MSG_LINE_TXT Character(80)
                        Group MASK_ERROR_INDICATORS
                            START_FIELD Character(2)
                            Group MARK_ARRAY Occurs 70
                                MARK_FIELD Character(1)
                            End Group
                        End Group
                        Group UPDATE_CONTROL
                            UPDATE_STATE Integer(1)
                            NO_UPDATE_IND Character(1)
                            NO_UPDATE_TEXT Character(20)
                        End Group
                    End Group
                    HT_TEXT Character(4)
                    Group STC_ABTEILUNG_DEF
                        STC_ABTEILUNG_9 Integer(1) Value 0
                    End Group
                    HB_TEXT Character(4)
                    HAENDLER_NAME Character(3)
    ...

    Form Record USER_WORKSPACE_RECORD
        Group USER_WORKSPACE
            Group USER_WORKSPACE
                Copy
                    "BODI_CDD_RECORDS:USER_WORKSPACE" From Dictionary
                End Copy
            End Group
        End Group
    End Record

    ...


FORMS$TRACE
-----------

...

Begin TRANSCEIVE request.
  Begin Initialize request phase.
    Validate GET_HB_SND record name for this request.
    Record list GET_HB_SND found in this form.
    Validate GET_HB_RCV record name for this request.
    Record list GET_HB_RCV found in this form.
    Validate the arguments for this request.
  End Initialize request phase.
  Begin Data Distribution phase.
    Begin data distribution for the USER_WORKSPACE_RECORD record.
      Begin distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATILE
        Distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATILE.ACM
      End of distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATIL
      Begin distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATILE
        Distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATILE.ACM
      End of distributing record field USER_WORKSPACE.USER_WORKSPACE.UW_VOLATIL

Trace stopps here at field ERR_MSG of USER_WORKSPACE.
This form works if I put into comment the group STC_ABTEILUNG_DEF.

The strange look of this data structure has historical reasons
mostly because of TDMS.

I am using:
- OpenVMS 6.2 on a DEC 3000 Model 300, AXP
- ACMS 4.1-0
- DECforms 2.1.b
- CDD/Repository 6.1-3


*************************************************************************
* Thomas Gaillat		   Pre-Sale Technical Support Associate *
* European Customer Service Centre		   FAX:    DTN 822 4445 *
* Digital Equipment International B.V.		   Phone:  DTN 822 4318 *
*								        *
*	    For Technical Enquiries, use our FREEPHONE number		*
* 		    or E-Mail: [email protected] 			*
*	       Our FREEPHONE numbers are available on request.		*
*************************************************************************

T.RTitleUserPersonal
Name
DateLines
3297.1KZIN::HUDSONThat&#039;s what I thinkWed Mar 12 1997 05:56127
From:	DEC:.REO.REOVTX::HUDSON       "[email protected] - UK Software
Partner Engineering 830-4121" 12-MAR-1997 10:54:47.95
To:	nm%vbormc::"[email protected]"
CC:	HUDSON
Subj:	RE:ESCALATION: POINT No22329, ROPRAND

Hello Fruehauf,

Thank-you for your ASAP call on ROPRAND within DECForms.

I haven't yet been able to find an answer to this problem, so I am still
looking, but there are a couple of things that I would like to suggest in case
you recognise them as being significant.

Dirty Zeros
===========

First, you don't say, but if this error is happening with data that came from a
VAX, then there is a possibility that it may be due to "dirty zeros".  On
VMS, if you have a bit-value that is a "dirty zero", then a VAX processor will
treat that value as "zero", but an Alpha processor will give an exception if
you try and use the value.  This is usually an "HPARITH" exception, but it
could be that the LIB-F-ROPRAND is a follow-on effect of that.

To explain what a "dirty zero" is:  When you have a floating point value stored
on VMS, you will typically have F_FLOAT (single precision) or G_FLOAT or
D_FLOAT (double precision).  For these data types, different bit fields are
used in the data to represent different parts of the floating number.  For
example:

A F_FLOAT looks like this :

        32             16|15       7|6     0
        +----------------+-+--------+-------+
        |    fraction2   |S|exponent|fract1 |
        +----------------+-+--------+-------+
        32             16|15       7|6     0


To represent "0.0", all 32 bits of the value should be zero.  But on a VAX, only
the sign (S above) and exponent have to be zero for the number to be treated as
"0.0".  So you could have a non-zero value in "fraction2" and still have the
number be treated as "0.0".

When a mathematical operation takes place on a VAX that results in "0.0", it
will always be a clean zero (all bits = 0), but it may sometimes be possible
for data (in files for example) to have dirty zeros if it was generated by, for
example, another computer, or a program which deliberately put dirty zeros into
data.

Because a VAX doesn't complain about dirty zeros, I have seen cases in the past
when data files have been used on VAX with no problems that cause errors when
moved on to Alpha.  In other words, the data was always bad, but you never had
a problem.

The way round this is to write a program on the VAX which reads in all the data
and writes it back out again.  Because a VAX never generates dirty zeros, this
process will "clean" any zeros in data files.

The dirty zero effect could be relevant to you if you are using data that has
come from an old (VAX) system.  If this is the case, then it is worth further
investigation.


Alignment
=========

The Alpha processor is sensitive to the alignment of data.  For example it
likes a 32-bit data value to be located at an address which is 32-bit aligned.
If you have data which isn't aligned, then this usually just has the effect of
slowing down the application, but in some cases, it can cause "ROPRAND" errors.

For example the following C program would give a ROPRAND:

#include <stdio.h>
#include <stdlib.h>
#include <builtins.h>

main()
{
        int     *i;
        int     j;

        i = malloc(sizeof(int)*2);	/* i is 32-bit aligned */
        *i = 0x12345678;
        printf("*i is %x\n",*i);
        j = (int)i;
        j++;
        i = (int *)j;			/* now i is not aligned */
        __ATOMIC_INCREMENT_LONG(i);
        printf("*i is %x\n",*i);
}

The problem in this program is that the "__ATOMIC_INCREMENT_LONG" routine
expects that "i" is a 32-bit aligned pointer.  

Routines such as "__ATOMIC_INCREMENT_LONG" may be used by code that is dealing
with data that is declared "volatile", such as data which is shared between
multiple code threads.

So perhaps you could get a ROPRAND error in cases where you have data which
isn't aligned but is volatile.




I don't know whether either of the above apply to your situation, but hopefully
you might be able to at least say "no, that definitely isn't relevant".

In the meantime, I am still looking into this.

Here are some other questions for you:

 - Is there any chance of your supplying me with a backup saveset that would
   reproduce the problem? 

 - Can you reproduce the problem outside the ACMS environment?  

 - Is this code that has worked before and just now stopped working?  If
   so, what is different?

Regards

Nick Hudson
Digital Software Partner Engineering.


3297.2KZIN::HUDSONThat&#039;s what I thinkThu Mar 13 1997 05:27194
From:	VBORMC::"[email protected]" "MAIL-11 Daemon" 13-MAR-1997 10:22:48.74
To:	"[email protected] - UK Software Partner Engineering 830-4121
12-Mar-1997 1054 +0000" <[email protected]>
CC:	
Subj:	Re: ESCALATION: POINT No22329, ROPRAND

[email protected] - UK Software Partner Engineering 830-4121
12-Mar-1997 1054 +0000 wrote:
> 
> Hello Fruehauf,
> 
> Thank-you for your ASAP call on ROPRAND within DECForms.
> 
> I haven't yet been able to find an answer to this problem, so I am still
> looking, but there are a couple of things that I would like to suggest in case
> you recognise them as being significant.
> 
> Dirty Zeros
> ===========
> 
> First, you don't say, but if this error is happening with data that came from a
> VAX, then there is a possibility that it may be due to "dirty zeros".  On
> VMS, if you have a bit-value that is a "dirty zero", then a VAX processor will
> treat that value as "zero", but an Alpha processor will give an exception if
> you try and use the value.  This is usually an "HPARITH" exception, but it
> could be that the LIB-F-ROPRAND is a follow-on effect of that.
> 
> To explain what a "dirty zero" is:  When you have a floating point value stored
> on VMS, you will typically have F_FLOAT (single precision) or G_FLOAT or
> D_FLOAT (double precision).  For these data types, different bit fields are
> used in the data to represent different parts of the floating number.  For
> example:
> 
> A F_FLOAT looks like this :
> 
>         32             16|15       7|6     0
>         +----------------+-+--------+-------+
>         |    fraction2   |S|exponent|fract1 |
>         +----------------+-+--------+-------+
>         32             16|15       7|6     0
> 
> To represent "0.0", all 32 bits of the value should be zero.  But on a VAX,
only
> the sign (S above) and exponent have to be zero for the number to be treated as
> "0.0".  So you could have a non-zero value in "fraction2" and still have the
> number be treated as "0.0".
> 
> When a mathematical operation takes place on a VAX that results in "0.0", it
> will always be a clean zero (all bits = 0), but it may sometimes be possible
> for data (in files for example) to have dirty zeros if it was generated by, for
> example, another computer, or a program which deliberately put dirty zeros into
> data.
> 
> Because a VAX doesn't complain about dirty zeros, I have seen cases in the past
> when data files have been used on VAX with no problems that cause errors when
> moved on to Alpha.  In other words, the data was always bad, but you never had
> a problem.
> 
> The way round this is to write a program on the VAX which reads in all the data
> and writes it back out again.  Because a VAX never generates dirty zeros, this
> process will "clean" any zeros in data files.
> 
> The dirty zero effect could be relevant to you if you are using data that has
> come from an old (VAX) system.  If this is the case, then it is worth further
> investigation.
> 
> Alignment
> =========
> 
> The Alpha processor is sensitive to the alignment of data.  For example it
> likes a 32-bit data value to be located at an address which is 32-bit aligned.
> If you have data which isn't aligned, then this usually just has the effect of
> slowing down the application, but in some cases, it can cause "ROPRAND" errors.
> 
> For example the following C program would give a ROPRAND:
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <builtins.h>
> 
> main()
> {
>         int     *i;
>         int     j;
> 
>         i = malloc(sizeof(int)*2);      /* i is 32-bit aligned */
>         *i = 0x12345678;
>         printf("*i is %x\n",*i);
>         j = (int)i;
>         j++;
>         i = (int *)j;                   /* now i is not aligned */
>         __ATOMIC_INCREMENT_LONG(i);
>         printf("*i is %x\n",*i);
> }
> 
> The problem in this program is that the "__ATOMIC_INCREMENT_LONG" routine
> expects that "i" is a 32-bit aligned pointer.
> 
> Routines such as "__ATOMIC_INCREMENT_LONG" may be used by code that is dealing
> with data that is declared "volatile", such as data which is shared between
> multiple code threads.
> 
> So perhaps you could get a ROPRAND error in cases where you have data which
> isn't aligned but is volatile.
> 
> I don't know whether either of the above apply to your situation, but hopefully
> you might be able to at least say "no, that definitely isn't relevant".
> 
> In the meantime, I am still looking into this.
> 
> Here are some other questions for you:
> 
>  - Is there any chance of your supplying me with a backup saveset that would
>    reproduce the problem?
> 
>  - Can you reproduce the problem outside the ACMS environment?
> 
>  - Is this code that has worked before and just now stopped working?  If
>    so, what is different?
> 
> Regards
> 
> Nick Hudson
> Digital Software Partner Engineering.


Hello Mr. Hudson

Thanks for investigating on my question.
First to answer your questions:

About the described situation: Data is not coming from a VAX.

Other questions:
- There is needed too much effort to isolate the needed parts of our  
system to reproduce the problem at your site. Maybe it would be possible
to reproduce the problem totally independant of the existing code.
- see above
- Since we are migrating from VAX to ALPHA and therefore using DECforms
instead of TDMS, all DECforms code and some ACMS Task code are new. All
application code (COBOL) is left as it was on the VAX.

I investigated a bit more on the problem too. In the meantime I managed
to build the application to run it without ACMS debugger. The crash
happend too.
But, in the Task debugger I did following (and was surprised):

- set break <last line of COBOL module before entering the form>
- examine STC-ABTEILUNG-9 of USER-WORKSPACE -> 0
- examine/binary STC-ABTEILUNG-9 of USER-WORKSPACE -> 00100000
- deposit STC-ABTEILUNG-9 of USER-WORKSPACE  = 0
- examine/binary STC-ABTEILUNG-9 of USER-WORKSPACE -> 00110000
- go -> is working fine

So whats the problem with the high nibble?

Regards

Juerg Fruehauf

-- 

--------------------------------------------------------------------
                        /\
Juerg Fruehauf         /--\KROS AG          Tel: +41 32 329 90 43
SW-Developper          unterer Quai 37      Fax: +41 32 329 90 35
                       CH-2502 Biel       email: [email protected]
--------------------------------------------------------------------

% ====== Internet headers and postmarks (see DECWRL::GATEWAY.DOC) ======
% Received: from mail.vbo.dec.com (mail.vbo.dec.com [16.36.208.34]) by
vbormc.vbo.dec.com (8.7.3/8.7) with ESMTP id LAA20000 for
<[email protected]>; Thu, 13 Mar 1997 11:19:46 +0100
% Received: from server21.digital.fr (server21.digital.fr [193.56.15.21]) by
mail.vbo.dec.com (8.7.3/8.7) with ESMTP id LAA08575 for
<[email protected]>; Thu, 13 Mar 1997 11:24:28 +0100 (MET)
% Received: from mail.eunet.ch (mail.eunet.ch [146.228.10.7]) by
server21.digital.fr (8.7.5/8.7) with ESMTP id LAA00035 for
<[email protected]>; Thu, 13 Mar 1997 11:27:13 +0100 (MET)
% Received: from dyna-bi-11.dial.eunet.ch by mail.eunet.ch (8.8.3/1.34) id
KAA20815; Thu, 13 Mar 1997 10:19:33 GM
% Message-ID: <[email protected]>
% Date: Fri, 14 Mar 1997 11:18:48 -0500
% From: AKROS AG <[email protected]>
% Reply-To: [email protected]
% Organization: AKROS AG
% X-Mailer: Mozilla 3.0Gold (Win16; I)
% MIME-Version: 1.0
% To: "[email protected] - UK Software Partner Engineering 830-4121
12-Mar-1997 1054 +0000" <[email protected]>
% Subject: Re: ESCALATION: POINT No22329, ROPRAND
% References: <[email protected]>
% Content-Type: text/plain; charset=us-ascii
% Content-Transfer-Encoding: 7bit
3297.3KZIN::HUDSONThat&#039;s what I thinkThu Mar 13 1997 09:0926
From:	WATNOW::"[email protected]" 13-MAR-1997 14:02:00.22
To:	[email protected]
CC:	
Subj:	Re: ESCALATION: POINT No22329, ROPRAND

Hello Mr. Hudson

My problem with 'Dirty Zero' is solved. The problem causing variable
should be initialized with '0' in COBOL code, but it's done with blank
(ASCII-32). So the only confusing thing is, that a '0' is displayed in
the debugger while examining the variable. But examine/binary shows the
truth.

Thanks anyway. Regards

Juerg Fruehauf

-- 

--------------------------------------------------------------------
                        /\
Juerg Fruehauf         /--\KROS AG          Tel: +41 32 329 90 43
SW-Developper          unterer Quai 37      Fax: +41 32 329 90 35
                       CH-2502 Biel       email: [email protected]
--------------------------------------------------------------------