View previous topic :: View next topic |
Author |
Message |
Arunprasad.K Beginner

Joined: 18 Jan 2006 Posts: 18 Topics: 5 Location: Chennai, India
|
Posted: Tue Nov 07, 2006 9:03 am Post subject: File status 46 |
|
|
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.  |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Nov 07, 2006 9:47 am Post subject: |
|
|
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 |
|
 |
Arunprasad.K Beginner

Joined: 18 Jan 2006 Posts: 18 Topics: 5 Location: Chennai, India
|
Posted: Tue Nov 07, 2006 9:47 am Post subject: |
|
|
Guys sorry if i have confused you !!
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 |
|
 |
Arunprasad.K Beginner

Joined: 18 Jan 2006 Posts: 18 Topics: 5 Location: Chennai, India
|
Posted: Tue Nov 07, 2006 10:04 am Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Nov 07, 2006 11:09 am Post subject: |
|
|
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 |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Wed Nov 08, 2006 7:29 am Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 08, 2006 7:52 am Post subject: |
|
|
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 |
|
 |
|
|