EDTCDE (Edit Code) 用法归纳

时间:2016-01-13 ┊ 阅读:17,476 次 ┊ 标签: 编程 , 经验 , 设计

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.

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

  2. 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-

  1. 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-

  1. 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)

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

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

  4. 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.

edtcde.png
edtcde1.png

文章评论

已有2条评论

  1. right thing i need, thanks this page.

添加新评论

温馨提醒:如果您是第一次在本站留言,需要审核后才能显示哦!

相关文章

Whatsapp只能查看最近三天的聊天记录了怎么办?

Whatsapp只能查看最近三天的聊天记录了怎么办?

今天突然发现电脑上的WhatsApp只能查看最近3天的聊天记录了,显示要查看3天前的记录请到手机上查看。很是吃惊,以前一直是所有记录都自动同步到电脑版的啊,不论换电脑了还是换手机了,聊天记录从来没丢过。 查询一翻也没有找出来原因,怎么也同步不过去。 电脑版app重新安装了,也不行。 有个方法说...
阅读全文>>
ValueError: Error getting directory

ValueError: Error getting directory

ssl证书过期了 明明自动renew的 然后看log已经好久没更新成功了 查半天是当前server不信任远程连接 只能自己改代码 报错: 21-12-17 13:01:11 Generate CSR...amkevin.csr amkevin.csr generated. /home/www...
阅读全文>>
网页路径中的'.'和'..'还有'./'和'../'区别

网页路径中的'.'和'..'还有'./'和'../'区别

. 表示当前目录 .. 表示当前目录的上一级目录。 ./表示当前目录下的某个文件或文件夹,视后面跟着的名字而定 ../表示当前目录上一级目录的文件或文件夹,视后面跟着的名字而定。 例如: 文件夹 a 下面有 文件夹b c 和文件 d。 文件夹b下面有e.php 和文件f。 则e中的 . 表示...
阅读全文>>
Introduction to ILE RPG Activation Groups

Introduction to ILE RPG Activation Groups

Learn how activation groups can help your ILE RPG programs run more efficiently, how to specify the type of group to use, and closing and reclaimin...
阅读全文>>
popup.js怎么和content.js通信?[JQuery]

popup.js怎么和content.js通信?[JQuery]

这两天为了实现一个谷歌浏览器插件功能,研究了半天怎么让插件来改特定网页里的特定字段的值,而这个值又来自popup的网页预先设定,下一步实现动态加载,可以让更多组实现便利。 目的很简单,我们有一个list,需要填到网页的某个字段,当然是好几个,这些值是设定好的,网页系统我们没法改,input想...
阅读全文>>