[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

4000.0. "Validation & Decimal(x,y) type fields?" by PTOSS1::HRIADILM () Wed May 21 1997 10:13

    
    Question on validation...
    
    Have a COBOL program which passes the following fields into a form.
    
    	Field Name		COBOL defn	Forms defn
    	===============		==========	===========
    	ORIGINAL_AMOUNT		S9(6)V99	Decimal(6,2)
    	AMOUNT_1		S9(6)V99	Decimal(6,2)
    	AMOUNT_2		S9(6)V99	Decimal(6,2)
    
    The user can modify AMOUNT_1 and AMOUNT_2. This all seems to be working
    fine - i.e., the data goes into the form ok and after modifications
    appears to be ok back on the COBOL side.
    
    I need to add a validation such that the sum of AMOUNT_1 and AMOUNT_2
    must equal ORIGINAL_AMOUNT in order to be valid.
    
    I want to do this in a validation response on field AMOUNT_2 but so far
    have not been successful.
    
    Can fields of type Decimal(x,y) be maninuplated mathematically in the
    form? 
    
    Any suggestions would be appreciated.
T.RTitleUserPersonal
Name
DateLines
4000.1GEM02::GASSWed May 21 1997 14:358
    Read the NUMERIC EXPRESSION section in the DECforms IFDL reference
    manual, I am pretty sure you can not use decimal data types.
    
    You could call an escape routine in the validation response to
    do the validation for you. 
    
    
    
4000.2Working via PEUPTOSS1::HRIADILMThu May 22 1997 08:471
    Got it to work via an escape routine. Thanks...