Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Direct Table Lookup

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Greetings, I am attempting to write a program that has

2, 2 dimensional tables. The tables are the same, 2 colums, 9 rows

so, if we had

colum 1 colum 2
1 a
2 b
3 c

and what not...in the input file you have the number 1, from that number you have to pull A out of the other colum then use A as the colum 1 figure, so you'd have

colum 1 colum 2
a New York
b Seattle

and what not...i'm not sure what to do, I know I am getting the redefines wrong, and the procedure division wrong,

Thank you for your help

Dash
 
It is difficult for us to tell whether you are getting the redefines and the procedure division wrong, because you have not shown us your code. #-) Betty Scherber
Brainbench MVP for COBOL II
 
Sometimes when we have large areas to redefine we define the size of the record as one large block and then redefine it.

01 My-file-area.
05 Full-Storage pic x(500).
05 Record-type-1 redefines Full-Storage.
10
10
10
.
.
.
If you get the file areas not equal you will either get a warning indicating the redefine is smaller or an error indicating it is too large. This may be a compiler option that has to be turned on. At least that is what I think will happen.

There are probably utilities that can read the file description size, but not everyone has all the bells and whistles. When you throw a bunch of packed fields in there and few more smaller redefines it can get confusing. If you do not like my post feel free to point out your opinion or my errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top