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

01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would be stored in b.

15 Answers   ACS,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


Can we call a CICS program from a batch program or viceversa?If so, how?

3 Answers  






how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


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

0 Answers   DELL,


what is the difference between start and startbr?

2 Answers  


Difference between next and continue clause

4 Answers   Kanbay,


what is SYNCHRONIZATION?

3 Answers   Syntel,


What is Pic 9v99 Indicates in COBOL?

0 Answers   SwanSoft Technologies,


Categories