How is sign stored in a COMP field ?

Answers were Sorted based on User's Feedback



How is sign stored in a COMP field ?..

Answer / dev

the most significant bit is used as a sign bit if it is set
then the field is negetive if not than positive

Is This Answer Correct ?    23 Yes 1 No

How is sign stored in a COMP field ?..

Answer / anil prajapati

it is stored in most significant bits

Is This Answer Correct ?    11 Yes 1 No

How is sign stored in a COMP field ?..

Answer / dimpy17

for negative value,2;s compliment is taken.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?

1 Answers   Hewitt,


what is the purpose of linkage section?

10 Answers  


How to solve SOC7. I have the cobol coded as below 01 A PIC 9(4). 01 AIN REDEFINES A. 05 AIN1 PIC S9(4) 01 B PIC 9(4)V99. 01 BIN REDEFINES B. 05 BIN1 PIC S9(4)V99. PROCEDURE DIVISION. START-PARA. INITIALIZE A AIN B BIN. ACCEPT A B. DISPLAY 'VALUE OF A=' A. DISPLAY 'VALUE OF B=' B. DISPLAY 'VALUE OF BIN1=' BIN1. DISPLAY 'VALUE OF AIN1=' AIN1. COMPUTE AIN1 = BIN1 - AIN1. DISPLAY 'VALUE OF AIN1=' AIN1. When i'm executing this code i'm getting SOC7 for A = 12 & B=34. Can someone explain SDSF OUTPUT DISPLAY TCOM058R JOB05458 DSID 102 LINE 0 COLUMNS 02- 81 COMMAND INPUT ===> SCROLL ===> CSR ********************************* TOP OF DATA ********************************** VALUE OF A=12 VALUE OF B=34 VALUE OF BIN1=34 VALUE OF AIN1=12 CEE3207S The system detected a data exception (System Completion Code=0C7). From compile unit PROG1 at entry point PROG1 at statement 29 at compile +000004CE at address 00007ECE. Please address how to solve this issue Thanks in advance.

1 Answers  


How can we increase the size of an existing PDS to include more no. of modules.

3 Answers  


What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. 05 MM PIC 99. 05 YY PIC 99. (a) Nothing is wrong. (b) Under W-DATE all level 05 items are having a PIC 99 but level 01 has PIC X(6). (c) PIC can't be specified for a group item. (d) DD, MM, and YY are invalid datanames.

6 Answers   Mphasis, TCS,






Discuss about changing dataset name in proc.

0 Answers  


I want to declare a field with data type Double in my COBOL program. how shall i do that ?

5 Answers  


for an INITIALIZE and what keyword allows for an override of the default.

2 Answers  


1.What is the default print format in cobol?

5 Answers   HSBC,


What is CALL statement in COBOL?

4 Answers  


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


what is qualification on occurs clause?

2 Answers  


Categories