I have a sequential file of 100 records. How do I load the
records into a two dimensional array ?

Answer Posted / neilsh

It should be
01 xyz
05 pqr occurs 2 times indexed by i
07 abc occurs 50 times indexed by j
09 rec pic x(40).

so it would be like 50 occurance of rec and then 2 occurance
of abc

50 + 50 = two divisions

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

826


i need a small 3d program using inline and outline.

1640


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1931


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

644






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.

1119


What is rmode(any) ?

686


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

714


how to move the records from file to array table. give with code example

2221


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


What are the different rules of SORT operation?

701


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1808


Write the code implementing the perform … varying.

646


What are the different data types in cobol?

800