identification division.
program-id. test-class.
data
division.
working-storage section.
01 a pic
999.
01 b pic
99999.
procedure
division.
001-paragraph.
display
"enter the literal abc".
accept
a.
display
"a is declared pic 999 = " a.
compute
b = a + 1.
display "b = abc + 1 = " b.
if a is
numeric display "a is numeric"
else
display "a is not numeric".
if b is
numeric display "b is numeric"
else
display "b is not numeric".
accept
omitted.
stop run.
* OUTPUT
* enter the
literal abc
* abc
* a is
declared pic 999 = abc
* b = abc + 1
= 01000
* a is not
numeric
* b is
numeric