In Cobol, to test “null or empty” we use “NOT = SPACE [ AND/OR ] LOW-VALUE” ? Which is it?

后端 未结 4 1895
名媛妹妹
名媛妹妹 2021-02-20 02:22

I am now working in mainframe, in some modules, to test

Not null or Empty

we see : NOT = SPACE OR LOW-VALUE The chief

4条回答
  •  感情败类
    2021-02-20 03:07

    It is worth noting that the value null is not always the same as low-value and this depends on the device architecture and its character set in use as determined by the manufacturer. Mainframes can have an entirely different collating sequence (low to high character code and symbol order) and symbol set compared to a device using linux or windows as you have no doubt seen by now. The shorthand used in Cobol for comparisons is sometimes used for boolean operations, like IF A GOTO PAR-5 and IF A OR C THEN .... and can be combined with comparisons of two variables or a variable and a literal value. The parser and compiler on different devices should deal with these situations in a standard (ANSI) method but this is not always the situation.

提交回复
热议问题