Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?

Answers were Sorted based on User's Feedback



01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / 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

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / satish

01 a pic -9(5) value -12345

Answer : either of the below :

01 a pic -9(5) value -12345 will working without any
changes or
01 a pic 9(5) value -12345 leading seperate

Is This Answer Correct ?    2 Yes 0 No

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / saravana

01 A pic s9(5) value -12345
01 B pic -9(5)
PROCEDURE DIVISION
MOVE A TO B
DISPLAY B
STOP RUN

o/P:
-12345

Is This Answer Correct ?    2 Yes 0 No

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / sowjanya

give like below.

DISPLAY A SIGN LEADING SEPARATE.

Is This Answer Correct ?    1 Yes 0 No

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / mr.perfect

01 A pic s9(5) value -12345
01 B pic +9(5)
PROCEDURE DIVISION
MOVE A TO B
DISPLAY B
STOP RUN

o/P:
-12345

Will this work?

Is This Answer Correct ?    1 Yes 0 No

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / anil prajapati

For displaying sign in the result we have to declare a
variable with negative sign symbol
e.g. 01 b pic -9(5).

in this variable we will this value

Is This Answer Correct ?    0 Yes 0 No

01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i ..

Answer / sreejith

01 a pic -9(5) value -12345
or
01 a pic x(6) value '-12345'

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More COBOL Interview Questions

how to transfer the file from pc to mainframe??

3 Answers  


OCCURS clause is used in the DATA DIVISION on data names at (a) 01 level (b) 77 level (c) 88 level (d) any level from 02 to 49

13 Answers   TCS,


In an EVALUATE statement, can I give a complex condition on a when clause?

2 Answers  


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


How many maximum number of procedures can we write in one COBOL program?

5 Answers  


88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above

5 Answers   TCS,


What is the significance of 'above the line' and 'below the line'?

2 Answers   Nokia,


SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WILL REPEATED AND I HAVE TO PASS 'E' IN PLACE OF 'A'ALONG THAT STRING.

2 Answers   Wipro,


What is Static,Dynamic linking ?

2 Answers  


What is Static and Dynamic linking ?

3 Answers  


how to display the dataset information?

2 Answers  


how to transfer the file from pc to mainframe??

4 Answers  


Categories