EDTCDE (Edit Code) 用法归纳

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

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.

添加新评论

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

相关文章

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

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

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

终于用上了专业版的PyCharm含激活方法链接[Python]

就直接上图片吧: 激活方法链接:https://www.cnblogs.com/pupilheart/p/9734124.html
阅读全文>>
如何使SyntaxHighlighter长代码自动换行[js/css]

如何使SyntaxHighlighter长代码自动换行[js/css]

用SyntaxHighlighter高亮代码,最近发现下面有个滚动条不好看, 代码太长造成的,去掉滚动条让长代码能自动换行,就好了。 打开样式表shCoreDefault.css 22行,把white-space: pre !important;改为white-space: pre-wrap ...
阅读全文>>
邮件发送失败小结Deferred: Connection timed out with[Port 25]

邮件发送失败小结Deferred: Connection timed out with[Port 25]

一直在忙,尽管没有忙出什么成果,也不知道忙了啥。 周末了,终于有时间看了一下自己的小服务器,发现邮件提醒好久没有发出来了. 赶紧看了一下maillog,发现: Jul 1 15:35:02 ebs-xxx sendmail[18015]: w5UK022f017326: to=<xxx...
阅读全文>>
简易中英小词典iDict v1.0发布[Github开源]

简易中英小词典iDict v1.0发布[Github开源]

用wpf写了一个小词典,方便自己使用。 功能: 简易查词 最小化系统托盘 设置开机启动 本站下载 Github下载 Github 源码 词典是用python爬的iciba词库,基本够用了。 下面是python抓取词典源码,现学现用。python上手就是简单。 # -*- codin...
阅读全文>>