Ü  EDTWRD

 

·         Sometimes we are not able to get the desire editing result by EDTCDE. In that case it is better to go for EDTWRD.

·         In the EDTWRD parameter we specify the format matching the required data.

·         This keyword is valid only for numeric field (Specified with ‘Y’ data type).

 

 

Example - I

 


A          R DETAIL                                               
A            FLD1          10Y 0B  3 12EDTWRD('  -  -  -  -  ')   
A                                      COLOR(RED)                 
A                                  3  2'FIELD-1: '        

 

 

OUTPUT

FIELD-1:  11-22-33-44-55

 

 

 

Example - II

 


A          R DETAIL                                          
A            FLD1          10Y 3B  3 12EDTWRD('$       .   ')
A                                      COLOR(RED)            
A                                  3  2'FIELD-1: '           

 

 

OUTPUT

FIELD-1:  $1122334.455

 

Here, currency symbol used is not part of the data length displayed on the screen.

 

 

 


Example - III

 


     A            S_FLD001     10Y 3O  2 10EDTWRD('               .   ')

 

 

OUTPUT

S_OFRMAMT = 9999999.999

 

 

 

Example - IV

 


     A            C_FLD001      10  2O 08 38
     A                                      EDTWRD('       0.  ')

 

 

OUTPUT

Before EDTWRD, Value of C_FLD001= .12

After EDTWRD, Value of C_FLD001=0.12

 

 

 

Example - V

 


     A            STIME56        6Y 0O 13 13
     A                                      EDTWRD('0  :  :  ')

 

 

OUTPUT

Before EDTWRD, Value of STIME= 1:12:12

After EDTWRD, Value of STIME=01:12:12

 

 

A zero stops zero suppression.

We place it in the farthest right position where zero suppression is to stop. That’s why here the time is not suppressed at the leftmost position.

 

**Note: We have given 2 blank spaces after ‘0’ in EDTWRD.

 

 



 

 







User Comments:



Subscribe

  Email:



Copyright © www.go4as400.com, 2013-2017. Copyright notice