How do you define a table/array in COBOL?

Answer Posted / anil prajapati

Table/array can be defined in cobol by using occurs with
times clause

like
working-=storage section.
01 tab1 value 'anilkumarprajapati'.
03 tab2 pic x(3) occurs 6 times indexed by i.
procedure division.

display tab2(i).
stop run.

output will be dsiplayed like

ani
lku
....

Is This Answer Correct ?    23 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2362


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1043


What are the different data types in cobol?

1048


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8675


What is a SSRANGE and NOSSRANGE?

1121


What kind of error is trapped by on size error option?

960


What is amode(31)

915


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.

1350


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

851


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

850


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

905


How to know whether the module is dynamical or statistical?

870


Define cobol?

1075


What is the difference between PIC 9.99 and PIC9v99?

1036


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

1031