当前位置:编程学习 > wap >>

DFSORT——前三位不等于0(COMP-3, COMP)

Requirement: The first 3 not equal to 0


(1) 01 WS-A PIC S9(09) COMP-3.
Analysis:
S9(09) COMP-3, X'000000', range is 999999999- and 999999999+
Check the 3 leftmost digits, then the range will be 000000999- and 000000999+

There are 2 solutions here:
1. COND=(1,5,PD,LT,-000000999,OR,1,5,PD,GT,+000000999)
2. COND=(1,2,PD,NE,0,AND,3,2,PD,NE,0,AND,5,2,PD,NE,0)

(2) 01 WS-B PIC S9(09) COMP.
Analysis:
S9(09) COMP, X'F0F0F0'

1. COND=(1,2,EQ,X'F0',AND,3,2,EQ,X'F0',AND,5,2,EQ,X'F0')

补充:移动开发 , 其他 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,