define comp?

Answers were Sorted based on User's Feedback



define comp?..

Answer / syam

"COMP" in Cobol = Binary storage format(if -ve bit is ON,
if +ve bit is OFF)
COMP-1 = Single precision floating point. Uses 4 bytes.
COMP-2 = Double precision floating point. Uses 8 bytes.
COMP-3 = packed decimal format. Uses 4 bytes.


Example 01 WS-VAR USAGE COMP-1.

Is This Answer Correct ?    3 Yes 0 No

define comp?..

Answer / syam

COMP = Compare in RPG, to compare two fields value.

AA = 01
BB = 02


C AA COMP 01 99 (found)
C BB COMP AA 99 (not found)

99 = on not found
99 = off found



Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL400 Interview Questions

What are fillers?

0 Answers  


seqence numbers in cobol

0 Answers   TCS,


How can i change the below code in SQL to cobol/400? EXEC SQL SELECT COUNT(*) INTO : WS-COUNT FROM Db file WHERE Field 1 = : WS-VAR AND Field 2 = : WS-USERID END-EXEC * EVALUATE TRUE WHEN SQLCODE = +000 MOVE WS-COUNT TO Copybook field WHEN SQLCODE = +100 MOVE ZEROES TO Copybook field

2 Answers  


How can i change the below code in SQL to cobol/400? EXEC SQL SELECT COUNT(*) INTO : WS-COUNT FROM Db file WHERE Field 1 = : WS-VAR AND Field 2 = : WS-USERID END-EXEC

2 Answers   HP,


Explain the difference between section, paragraph and sentences?

0 Answers  






Explain the difference between comp & comp-3?

0 Answers  


Trying to help a friend... How do you code screen I/O without a DDS? I know it can be done, because for a short time, I worked for a company that did it. It was just too long ago for me to remember what was involved.

1 Answers  


what is the difference between SEARCH and SEARCHALL?

2 Answers  


Explain what all the conditiones required for using open opcode on a file?

0 Answers  


how array can be declare in cobol?

6 Answers  


Define redefine?

0 Answers  


Explain the input procedure?

0 Answers  


Categories