cobol runtime error 46 for cobol 85 
Author Message
 cobol runtime error 46 for cobol 85

Hi,

When I run my COBOL program I get a file status code 46. How do I go
about solving that error. I am using ACUCOBOL-GT on  UNIX .

Please Help!

Thank you



Sun, 27 Feb 2005 20:32:29 GMT  
 cobol runtime error 46 for cobol 85


Quote:
> Hi,

> When I run my COBOL program I get a file status code 46. How do I go
> about solving that error. I am using ACUCOBOL-GT on  UNIX .

> Please Help!

I believe that  a file status code of 46 indicates (quote from the
manual)

Status 4/6    A sequential READ statement was attempted on a file
open in the input or I-O mode and no valid next    
record had been established because:  
1.  The preceding READ statement was unsuccessful  
but did not cause an at end condition              
2.  The preceding READ statement caused an at end  
condition.                                          

You are probably trying to read the file after an "AT END" has
happened.

Check your code to see what the problem is.

--
Lorne Sunley



Sun, 27 Feb 2005 23:41:09 GMT  
 cobol runtime error 46 for cobol 85

Quote:

> Hi,

> When I run my COBOL program I get a file status code 46. How do I go
> about solving that error. I am using ACUCOBOL-GT on  UNIX .

File status '46' is a logic error in your program.  You are trying to
do a sequential READ of the 'next' record when there is no 'current'
record at that time.

When a file is OPENed the 'current' record is just before the first
record in the file so a sequential read will read the first, and set
this to 'current'.

After reading the last record on the file another sequential read will
give an 'AT END' and the 'current' record will be undefined.

After a random read or a START that failed 'INVALID KEY' the 'current'
position is also undefined.

So 46 is indicating that you have tried to do a sequential read after
'AT END' or 'INVALID KEY' has occurred.



Mon, 28 Feb 2005 05:43:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Runtime Problem about RM/COBOL 85

2. rm/cobol 85 runtime: I need one..

3. COBOL 74 v's COBOL 85 Usage

4. COBOL 74 vs COBOL 85

5. COBOL 74 vs COBOL 85

6. R/M COBOL 85 to COBOL-WOW Conversion

7. First Semester problrm: simple cobol rm cobol / 85 problem with subprograms

8. COBOL-68 to COBOL-85 conversion

9. cobol 85 vs cobol II ???

10. COBOL 85 Vs COBOL II

11. COBOL 85 - compiler error

12. RM/COBOL-85 ERROR STATUS 39,01

 

 
Powered by phpBB® Forum Software