What is the default value(s) for an initialize? What keyword will allow for an override of the default?



What is the default value(s) for an initialize? What keyword will allow for an override of the defau..

Answer / Anshu Prabha

In COBOL, when you initialize a data item with no specific value, it defaults to '0' (zero) for numeric items and an empty string ('') for alphanumeric items. To override this default value, you can use the ASSIGN clause within the initialization statement.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

How do you define a variable of comp-1 and comp-2?

1 Answers  


Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?

7 Answers   Bank Of America, Mind Tree,


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1 Answers  


I encountered an error when I move spaces to a numeric field?What should I do to move spaces on that field?help please.

9 Answers  


Why would you use find and get rather than to obtain?

1 Answers  


HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


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,


What are the two search techniques ?

2 Answers   iGate,


1) can we display the index?

3 Answers   ADP, IBM,


I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest

2 Answers   IBM,


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?

2 Answers   IBM, Wipro,


Categories