Highlighted
Absent Member.
Absent Member.
494 views

Sequential Line to Index

 I have a line sequential file that I am wanting to convert to an indexed file.  This is just for my own edification.  I am using the classic data tools to do the conversion.  My index is the social security number which begins at position 32 and is 9 characters long.  The sequential file has variable length records with a max length of 66 characters.  When I do the conversion, it ask for minimum of 41 and max of 66 which I use.  The conversion goes through without any problem.  When I open the file using the data tools I can see the ssn highlighted as the primary key.  However, when I read the file into my cobol program, I am constantly getting a 4/7 open error.  Any suggestions on why this is happening or what I need to do differently when doing the conversion?

 

Thanks.

0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: Sequential Line to Index

Standard file status code 47 usually means "READ or START operation has been tried on a file not opened INPUT or I-O".

Daniel

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Sequential Line to Index

I have the file set as Open I-O.
0 Likes
Highlighted
New Member.

RE: Sequential Line to Index

What operating system are you using? It sounds like it might be a permissions setting.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Sequential Line to Index

After the OPEN statement execution, did you get a successful file status code?  Ideally 00.

Daniel

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.