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")
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇: Cobol常用数据类型及存储方式小结
