What are decleratives in COBOL ?



What are decleratives in COBOL ?..

Answer / pavan

Declaratives provide special section that are executed when
an exceptional condition occurs. They must be grouped
together and coded at the beginning of procedure division
and the entire procedure division must be divided into
sections. The Declaratives start with a USE statement. The
entire group of declaratives is preceded by DECLARIVES and
followed by END DECLARITIVES in area A. The three types of
declaratives are Exception (when error occurs during file
handling), Debugging (to debug lines with 'D' coded in w-s
section) and Label (for EOF or beginning...) declaratives.

Is This Answer Correct ?    14 Yes 3 No

Post New Answer

More COBOL Interview Questions

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!" What will be the result ? (a) A=88.10, B=32.754 (b) A=87.00 B=32.754 (c) A=87.10 B=32.754 (d) ERROR!!! will be DISPLAYed on the screen.

3 Answers   TCS,


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


how will u code parm parameter and where pls ?

3 Answers   DELL,


What are different file OPEN modes available in COBOL?

4 Answers   Sun Life,


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,






What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


without performing any operations on a file how can i know whether it contains data or not

2 Answers  


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.

1 Answers   Mind Tree,


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


plz,could any one tell me? what about EBCDIC in cobol?briefly?

1 Answers  


Categories