01 a pic s9(5) value -12345,
if we disply a , the sign will overpunched with last digit
but i need to get the miuns sign in the result?
Answer Posted / david
you will need two variables. Variable A where you put your
computation and variable B which will be displayed:
01 a pic s9(5) value -12345.
01 b pic -9(5).
or 01 b pic -zzzz9.
or 01 b pic 99999-.
or 01 b pic z(5)-.
or 01 b pic ----9.
MOVE A TO B.
DISPLAY B.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
how do you reference the printer file formats from cobol programs
What is link edit in cobol?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
How arrays can be defined in COBOL?
How do get the result of your program directly on your pc?
A table has two indexes defined. Which one will be used by the SEARCH?
What is perform what is varying?
how do you reference the esds vsam file formats from cobol programs
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What are the different open modes available in cobol?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
In COBOL, what is the different between index and subscript?