Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ERROR Status code 46

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
kvamsy

New User


Joined: 14 Apr 2009
Posts: 10
Location: chennai

PostPosted: Wed May 06, 2009 3:26 pm    Post subject: ERROR Status code 46
Reply with quote

Cobol statement as mentioned below is correct or not?

READ XX-FILE NEXT
AT END MOVE "Y" TO WF-EOF-XXFILE-FLAG.

XX-file is opened as input mode, and giving error as below,

"ERROR READING XXFILE STATUS CODE: 46 "

Please help to sort this out?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8151
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 06, 2009 3:32 pm    Post subject:
Reply with quote

Did you look up the 46 file status? What did you try to fix it? The COBOL statement as coded is perfectly valid -- but may or may not work, depending on how the rest of the code is written.
Back to top
View user's profile Send private message
kvamsy

New User


Joined: 14 Apr 2009
Posts: 10
Location: chennai

PostPosted: Wed May 06, 2009 3:39 pm    Post subject: Reply to: ERRO status code 46
Reply with quote

I haven't tried anything because I don't know how to clear that one, Program flows like this

1)Opening a file with input mode,
2)cheking the statment as mentioned earlier
3) whether the file status is good or EOF continue
Else
Giving error status code as 46 , In the whole program I am using only one time read of XX-file ,

file declared as below
SELECT XX-FILE
ASSIGN TO ASEXTI01
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS NDX2-KEY-XX
FILE STATUS IS FILE-STATUS-DB
FILE-STATUS-DB-VSAM
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8151
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 06, 2009 3:51 pm    Post subject:
Reply with quote

The 46 file status means
Quote:
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.
Since the file is dynamically accessed, how did you establish the current record pointer BEFORE using the READ NEXT statement? READ NEXT is only valid when you've done a START or READ on the file already -- you cannot use it until then.
Back to top
View user's profile Send private message
kvamsy

New User


Joined: 14 Apr 2009
Posts: 10
Location: chennai

PostPosted: Wed May 06, 2009 4:06 pm    Post subject: Reply to: ERRO status code 46
Reply with quote

When we use this Rad next it will read from Next, Initially we have a low value record.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8151
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 06, 2009 4:19 pm    Post subject:
Reply with quote

Quote:
Initially we have a low value record.
How do you know this? Did you initialize the buffer? Do you have the LE run time option set to initialize storage? If neither of these is true, then you need to be aware that memory will not necessarily be initialized to LOW-VALUES. And what, by the way, does memory value have to do with setting the current record pointer for the READ NEXT in the VSAM file?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 0 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm

Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us