EDTCDE (Edit Code) 用法归纳
时间:2016-01-13 ┊ 阅读:21,348 次 ┊ 标签: 编程 , 经验 , 设计
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.
文章评论
已有2条评论
添加新评论
温馨提醒:如果您是第一次在本站留言,需要审核后才能显示哦!
right thing i need, thanks this page.
u r wlc.