EDTCDE (Edit Code) 用法归纳

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

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.

添加新评论

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

相关文章

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

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

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

T480自动关机无法启动(解决办法)

周五升级更新后,用一会就关机,还开不了,怎么按开机键也没有反应。 周六折腾一上午,拔电源,断电,20秒复位,把电池都拿下来了。都不行。 下午实在没办法了,给售后打电话让拿去检测一下。 然后拿售后去了,给检测一会没问题,说内存不干净给擦一下好了,开机正常了。 付款50块检测费,开心的拿回家,一...
阅读全文>>
office2016 产品已激活 却同时显示需要激活(解决办法)

office2016 产品已激活 却同时显示需要激活(解决办法)

直接上命令吧: c:\Program Files\Microsoft Office\Office16>cscript.exe ospp.vbs /dstatus Microsoft (R) Windows Script Host Version 5.812 版权所有(C) Microso...
阅读全文>>
Excel 2016打开xls文件显示空白的解决办法

Excel 2016打开xls文件显示空白的解决办法

问题描述: 安装Office 2016后,正版激活一直挺好的,不过今天发现,双击EXCEL旧版本文件打开后显示为空白。 上网搜索一翻,终于知道问题所在,可能和昨天的一个office更新有关。 解决办法: 开始——运行——regedit 修改HKEY_CLASSES_ROOT\Excel.She...
阅读全文>>
如何绕过登录抓取js动态加载网页数据[Python]

如何绕过登录抓取js动态加载网页数据[Python]

今天经历了一翻折腾,把一个需要登录网站并js动态加载的数据一一给抓下来了。 首先,登录时有cookie,我们需要把cookie保存下来,用urllib2构建request时加入header信息,这时还多了一点,虚构了浏览器信息,让服务器以为是正常的浏览器发起的请求,这样可以绕过简单的反爬虫策略...
阅读全文>>