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 difference between cobol and cobol/400

1 Answers   HCL,


Can we use icetool in cobol program?

3 Answers  


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


how will u code parm parameter and where pls ?

3 Answers   DELL,


Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???

5 Answers   IBM,






in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......

2 Answers   IBM,


What is the difference between structured cobol programming and object alternativelyiented cobol?

0 Answers  


In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?

1 Answers   CSC,


what is s013u000 for?

1 Answers   Hewitt,


What is amode(24)?

0 Answers  


how to change picture class of copy book variable inside program?

2 Answers  


There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?

2 Answers  


Categories