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
What are literals?
What are the different data types in cobol?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What is inspect in cobol ?
Which mode is used to operate the sequential file?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
Define cobol?
State the various causes of s0c1, s0c5 and s0c7.
What is the difference between Global and External Variables?
Write some characteristics of cobol as means of business language.
Write down the divisions of cobol program?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
What is the Purpose of POINTER Phrase in STRING command in COBOL?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
What is the use of intialize verb?