dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use numeric PIC clause that incorporates a sign,
based on the format of the input field and the output field.
usually, one picks a format that is common to both input and output.
if the output field format is different than the input, I would sum with a variable declared the same as the output.
but, first step is determine the format of the input field and the output field,
then employ the usage clause that fits the format(s).
display, binary, packed-decimal - or float if it must be, with or without implied decimal (V), with appropriate sign separate, trailing clause if it is usage display.
Manuals at top of the page for COBOL will provide documentation
for the proper syntax for each of the different clauses. |
|