Can we access the a[0] in the array ?

Answers were Sorted based on User's Feedback



Can we access the a[0] in the array ?..

Answer / mandozai

In cobol array starts with 1 not with 0

Is This Answer Correct ?    20 Yes 0 No

Can we access the a[0] in the array ?..

Answer / sandy

Not possible. It will throw compilation error.

Is This Answer Correct ?    8 Yes 2 No

Can we access the a[0] in the array ?..

Answer / jai ho

i think it will send soc4 abend bcoz a[0]
is out of bound.

Correct me

Is This Answer Correct ?    4 Yes 0 No

Can we access the a[0] in the array ?..

Answer / suresh ramaiyan

It will give compilation time error, as the compiler knows
the value of subscript when compile the program.
ex: A[0]

if you are accessing the same by subscript variable, then
it will give run time error.
ex: A[ws-cnt]

Is This Answer Correct ?    3 Yes 0 No

Can we access the a[0] in the array ?..

Answer / i go crazy

The compilation should be done with the compiler option SSRANGE. If NOSSRANGE is used, then we can use A(0) without any issue.

Is This Answer Correct ?    3 Yes 0 No

Can we access the a[0] in the array ?..

Answer / dev

Can u explain why it throws compilation error?

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More COBOL Interview Questions

can we write paragraph in area B .....

4 Answers   L&T,


hi is there any means of deletin a record from a ps usin cobol not using jcl?eg if i am reading a record and if some condition is matched tat particular record must be deletd fom the ps

5 Answers   iNautix,


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


How do you submit JCL via a Cobol program?

5 Answers   IBM,


Why did you choose to work with ibm mainframe cobol programming?

0 Answers  






In which area will you utilize 88 level items in 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,


Give some examples of command terminators?

0 Answers  


i want to enter the name 'pandu' into ur table how?

1 Answers   Fidelity,


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

0 Answers   Accenture,


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


Categories