Code for PROGRAM OF CHECKING A SIGN CLAUSE in Cobol
identification division.
program-id. scond.
data division.
01 num1 pic s99.
01 num2 pic s9.
01 num pic -999.
01 ndec pic s9v9 value -1.5.
01 pdec pic s9v9 value +1.5.
procedure division.
move +23 to num1.
display "num1 is " num1.
move -23 to num1.
display "num is " num1.
move num1 to num.
display "num is "num.
move 'b' to num1.
display "num is " num1.
move '1a' to num1.
display "num is " num1.
display "ndec is " ndec.
display "pdec is " pdec.
stop run.