MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File status 46

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Arunprasad.K
Beginner


Joined: 18 Jan 2006
Posts: 18
Topics: 5
Location: Chennai, India

PostPosted: Tue Nov 07, 2006 9:03 am    Post subject: File status 46 Reply with quote

My input file has 4 records for each key so i have 4 consecutive read statements for each key and checking my EOF condition at every fourth read.

Suppose i have a ssn of 111-111-1111 then that ssn will have 4 consecutive records.

But while reading the first record it is reading a blank line. So it affect the entire process and abending in U4038 with file status 46.

My input DSN attributes are as follows.

DCB=(LRECL=137,BLKSIZE=0,RECFM=FBA),
SPACE=(CYL,(500,500),RLSE)

Any help will be highly appreciated. Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Nov 07, 2006 9:47 am    Post subject: Reply with quote

You need to extend your programming techniques to include Looping. Repeatively coded reads means that you have to have PERFECT input. There is no such thing. You need a loop which:
  • Start of loop
    • read a record
    • if end of file - go to end of job
    • determine if you are looking for a 1st, 2nd, 3rd, 4th
    • determine if the current record is a 1st,2nd,3rd,or 4th
    • react appropriately.
    • go to Start of loop
  • end of job

_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Arunprasad.K
Beginner


Joined: 18 Jan 2006
Posts: 18
Topics: 5
Location: Chennai, India

PostPosted: Tue Nov 07, 2006 9:47 am    Post subject: Reply with quote

Guys sorry if i have confused you !! Smile

I am using the below read statement. The variable for IN1-EOF-SWITCH is not set to 'y' even after EOF.


READ INPUT1-FILE INTO LINE-2-OF-IN1
AT END MOVE 'Y' TO IN1-EOF-SWITCH
END-READ

Regards
Back to top
View user's profile Send private message Send e-mail
Arunprasad.K
Beginner


Joined: 18 Jan 2006
Posts: 18
Topics: 5
Location: Chennai, India

PostPosted: Tue Nov 07, 2006 10:04 am    Post subject: Reply with quote

dbzTHEdinosauer,

You are correct no there is no perfect input, but here i am manupulating the input. I should have mentioned in my first post. My apologies.

I am using the above mentioned read statement consecutiveiy for 4 times.

And one more update, it is not reading a blank line at the top as i mentioned in my previous post.

Please have a look at my read statement and let us know if found any errors.

Or please let us know any other possible reason for this error?

Regards.
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Nov 07, 2006 11:09 am    Post subject: Reply with quote

are you using USING Procedure statements?
are you using the file-status clause in the Select ?

and I am still confused. you said that you where only checking for end condition after fourth read. if you don't have mod4 number of records and you only checked every 4th, it is understandable. You need to check your file-status.

If this read statement
Quote:
READ INPUT1-FILE INTO LINE-2-OF-IN1
AT END MOVE 'Y' TO IN1-EOF-SWITCH
END-READ

is the only read statement in your program I see nothing wrong.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Wed Nov 08, 2006 7:29 am    Post subject: Reply with quote

Shouldn't there be a read statement for all four lines, not just line 2?
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 08, 2006 7:52 am    Post subject: Reply with quote

the poster needs to supply additional info. the little that has been provided suggests that there are major design/logic errors remaining to be found in the rest of the code.

to receive a file-status 46 means severe logic error.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group