Ü  EDTCDE (Edit Code)

·         This keyword is used to edit output-capable numeric fields.

·         Edit code, depending upon the data type edits the contents.

e.g.

ü  By using it, the field can be punctuated with commas and periods. E.g. 1,000.50

ü  Negative values can be printed with a minus sign or CR to the right. E.g. 100.50CR, 100.50-


A Interest    5 2                  1 10EDTCDE(J)

OUTPUT

123.45-


ü  A currency symbol can be printed with the help of this keyword. E.g. 100.50$


A Salary     7 2                 2 10EDTCDE(K $)

OUTPUT

$12,345.67-

ü  The value can be padded with zeros at the left instead of blank padded. E.g. To print 000125.50 instead of XXX125.50 (where X=blank)

ü  Date can be formatted with the keyword EDTCDE(Y). E.g. 1/12/99

ü  Zero values can be printed as zeros or blanks as per the requirement.

ü  Use EDTCDE(Z) to remove ‘,’ separator in the field value.



0009.00      A            OPENDT         8P 0       COLHDG('OPEN DATE')        
0010.00      A                                      EDTCDE(Z)                  
0011.00       * EDTCDE(Z) REMOVES COMMAS.. 

 

 


Example

Ø  EDTCDE (4)

 

This is useful if we are initializing a subfile. If the subfile field is decimal, then while initializing the subfile field will be filled with zeros. When we use EDTCDE (4), then the instead of getting filled with ‘0’, it is displayed as Blank field.

 

ORG field is initialized with zeros by default for a numeric field.


 


AMIT                   DISPLAY THE EDITABEL SUBFILE                  9/04/13  
                                                                     11/59/03  
                                                                               
                                                                               
    OPTION: 1 = NEW A/C ENTRY FOR PARTY, 2=EDIT, 4 = DELETE, 5 =DISPLAY        
                 _________________________________________________________      
                | ENTER NEW ACCOUNTS FOR PARTY P00000000001  IROBO        |          
    OPT   PAR   |                                                         |          
    1     IRO   | ORG   ACCOUNT NUMBER   CCY   ACC MANAGER    COUNTRY     |          
    __    IRO   |                                                         |      
    __    SHM   | 000    ___________     ___    _______       _____       |      
    __    AFT   | 000    ___________     ___    _______       _____       |      
    __    AMI   | 000    ___________     ___    _______       _____       |      
                | 000    ___________     ___    _______       _____       |   ...
                | 000    ___________     ___    _______       _____       |      
                |                                                  More...|      
                |                                                         |      
                | F12 = CANCEL                                            |      
                |_________________________________________________________|
                                                                               
                                                                               
                                                                                
  F3 = EXIT  

 

 

Now we use the keyword EDTCDE(4) to get rid of zeros.

 

 
A          R ACC_SFL                   SFL                      
A            A_ORG          3Y 0B 05 02EDTCDE(4)  >>>>>>>>>>>>              
A            A_ACC         12   B 05 09                         
A            A_CCY         03   B 05 25                          
A            A_MNGR        10   B 05 32                         
A            A_CNTRY       10   B 05 46                         
 *                                       

 

 

When we use EDTCDE (4), then the instead of getting filled with ‘0’, it is displayed as Blank field as shown below.


AMIT                   DISPLAY THE EDITABEL SUBFILE                  9/04/13  
                                                                     11/59/03  
                                                                                
                                                                               
    OPTION: 1 = NEW A/C ENTRY FOR PARTY, 2=EDIT, 4 = DELETE, 5 =DISPLAY        
                 _________________________________________________________         
                | ENTER NEW ACCOUNTS FOR PARTY P00000000001  IROBO        |          
    OPT   PAR   |                                                         |          
    1     IRO   | ORG   ACCOUNT NUMBER   CCY   ACC MANAGER    COUNTRY     |          
    __    IRO   |                                                         |      
    __    SHM   | ___    ___________     ___    _______       _____       |      
    __    AFT   | ___    ___________     ___    _______       _____       |      
    __    AMI   | ___    ___________     ___    _______       _____       |      
                | ___    ___________     ___    _______       _____       |   ...
                | ___    ___________     ___    _______       _____       |      
                |                                                  More...|      
                |                                                         |      
                | F12 = CANCEL                                            |      
                |_________________________________________________________|         
                                                                               
                                                                               
                                                                                
  F3 = EXIT                                                                    

 

 

 

Ø  EDTCDE(Y)

 

·         The Y edit code suppresses the farthest left zero of a date field.

·         It also suppresses the two farthest left zeros of a field that is seven positions long.

·         The Y edit code also inserts slashes (/) between the month, day, and year.

 




 

 







User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy