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

Conference dssdev::decforms

Title:DECforms
Notice:This is not an official software support channel. Kit info: 4.L
Moderator:DSSDEV::FORMS
Created:Thu Mar 23 1989
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:4004
Total number of notes:16520

3983.0. "Pb with trailing zeroes, left justified, numeric field" by ISERE::HUDELOT_P (DECBringue ...) Wed Feb 12 1997 13:39

Doin a conversion from TDMS to DECforms, I am having difficulties to
reproduce the same functionality. 

I have defined the following:
Form Data
	Myfield Longword Integer
End Data
...
Field Myfield_FLD
...
	Output picture XXXX
	Input Picture 9999R
	Replace Leading " "
	Replace Trailing " "
        Output "    " when (Myfield=0)
End Field.

Since Myfield is a quantity, it has to remain numeric.

This is the comparision of TDMS and DECforms behaviors

			TDMS		DECforms
Enter 12 + next field	12		1200

Our custumer considers this as a cause of users disruption (they are using 
9600 bauds lines and do not afford to play with unwanted zeroes). They will
not sign the acceptance until we replicate the TDMS functionality :-(

Any advice greatly appreciated, but please keep in mind that we need to
stick to the old TDMS behavior.

	Patrick
T.RTitleUserPersonal
Name
DateLines
3983.1DSSDEV::RICEWed Feb 12 1997 15:486
Have you specified "Justification Left" in your field definition?

An example program showing your issue would help keeping us from guessing what
your problem is.

-Tim
3983.2Justification left has no successISERE::HUDELOT_PDECBringue ...Thu Feb 13 1997 09:1018
Well, 

.0 is the duplication of the code. If am I confusing with my description of
the different behaviors, this is another try.

On TDMS, if I enter '1   ' and then go to next field, the value I get is 1
On DECforms, if I enter '1   ', I get 1000 (empty chars get padded with zeroes).

I know that there are workarounds:
	- PEU
	- change data type
	- use justification right.

These are not yet accepted by our customer. The question is: is there a DECforms field 
picture clause which will enable the expected behavior (i.e. identical to TDMS) ?

Thank you very much,
	Patrick
3983.3?CSC32::C_BENNETTThu Feb 13 1997 13:477
    Spaces are not valid and can not be converted into a longword
    integer so that is the first issue you need to understand. 
    This is true for TDMS data conversion also - so I question
    your customer...
    
    What TDMS form field and record field is the customer talking 
    about?
3983.3R9999CSC32::C_BENNETTFri Feb 14 1997 13:5055
    Visually the following form when tested with 2.1B on a OpenVMS 6.2
    system using FORMS DEV    / TEST icon / TEST ENABLE icon and a 
    control text response of "TEST" exhibits the visual functionality.
    
    I hope your customer understands that there is no such thing as
    spaces in a longword integer.   Changing the 9999r to a r9999
    looks like what you want.
    
    			hope this helps
    
    			Chip
    
    
Form T

    Form Data 
        TESTFIELD Longword Integer
        ANOTHERFIELD Character(1)
    End Data


    Layout VT_LAYOUT
        Device
            Terminal
                Type %VT100
        End Device
        Size 24 Lines by 80 Columns

        Control Text Response "TEST"
            Activate
                Panel PPP
        End Response


        Panel PPP
            Field TESTFIELD
                Line 6
                Column 1
                Output Picture XXXX
                Replace Trailing " "
                Input Picture R9999
            End Field

            Field ANOTHERFIELD
                Line 10
                Column 1
                Output Picture X
            End Field

        End Panel

    End Layout
End Form