I have 2 dimensional array with having 100 elements. So how
to find the 11th item in an array?

Answer Posted / ajay kumar ande

search for element "ajay" in name column using 2d array.suppose a table of 5*5,

procedure division
MOVE +1 TO I
PERFORM UNTILL I>5

MOVE +1 TO J
PERFORM UNTILL J>5

IF NAME = "AJAY"
DISPLAY "FOUND"
ELSE DISPLAY "NOT FOUND"

ADD +1 TO J
END-PERFORM

ADD +1 TO I
END-PERFORM

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of intialize verb?

866


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2272


What is report-item in COBOL?

800


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

518


Explain what you understand by passing by value.

807






Explain the configuration section of a cobol program with examples of syntax.

760


What is the difference between Call and a Link?

796


how do you reference the rrds file formats from cobol programs

944


Are you comfortable in cobol or jcl?

727


Which mode is used to operate the sequential file?

802


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

837


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1889


Which Search verb is equivalent to PERFORM…VARYING?

783


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

738


How you can read the file from bottom?

752