I have a occurs for 100 times but it has executed 101 time
what could be the reason?

Answers were Sorted based on User's Feedback



I have a occurs for 100 times but it has executed 101 time what could be the reason?..

Answer / niki

Change Compiler ioption NO SSrange to ssrange. But the
Default is NO SSRANGE.

IF U Use Compiler option SSrange, then whenever the
subscript exceeds its declared
number it will give a Eroor.
for example :
A variable is declared like this...

01 field1.
02 field2 pic x(10) occurs 10 times.
Oputput will be

then field2(1) ......field2(10) is allowed when it exceeds
it will give error
ex: field2(11) ----- erro msg will be displayed

Is This Answer Correct ?    14 Yes 0 No

I have a occurs for 100 times but it has executed 101 time what could be the reason?..

Answer / babjee talluri

we use compiler option is SSREANGE , it is used to array
boundary checking, by default NOREANGE,

Is This Answer Correct ?    5 Yes 0 No

I have a occurs for 100 times but it has executed 101 time what could be the reason?..

Answer / arun gopal

Logical error!!.. check the logic to see if the logic which
performs that section is coded properly to exit at the
bondary condition.

Is This Answer Correct ?    5 Yes 2 No

I have a occurs for 100 times but it has executed 101 time what could be the reason?..

Answer / rajesh_m13

Initialization Error..!

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

What is tne need to use sub programs in Cobol?

3 Answers   HSBC,


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


What is the usage of comp fields in cobol?

0 Answers  


how to fetch the record before the last record in a cobol file( its a huge file and if the key field is not known)

5 Answers   IBM,


What is 66 level number and where it is used in real time by software developers?

2 Answers   ITC Indian Tobacco Company, TCS,






What is the difference between PIC 9.99 and 9v99?

7 Answers  


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


Can a Search can be done on a table with or without Index?

0 Answers  


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


How is sign stored in a comp-3 field?

7 Answers  


What is file status 39 ?

10 Answers   JPMorgan Chase,


What is the Purpose of Pointer in the string?

0 Answers  


Categories