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 Usergroups Profile Log in to check your private messages Log in
 

 

FILE STATUS 39 while opening the file

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

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Sat Aug 25, 2007 2:19 am    Post subject: FILE STATUS 39 while opening the file
Reply with quote

In the JCL I have LRECL=360. and in the program I have 01 FD-outrec pic x(360)

this program gives an error while opening the file.

File status 39.

IGZ0201W A file attribute mismatch was detected. File XXXXFILE in program XXXXX01 had a record length of 361 and the file specified in the ASSIGN clause had a record length of 360.

Where is that 361 coming from?

Here is the program:


SELECT XXXXFILE ASSIGN TO DD2
ORGANIZATION IS SEQUENTIAL
FILE STATUS IS WS-OUTPUT-STAT.


FD XXXXFILE.
01 FD-OUTREC PIC X(360).


JCL:

//*
//DD2 DD DSN=PX01211.XXXXFILE.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// DCB=(SRCDSCB,RECFM=FB,LRECL=360),
// SPACE=(360,(100,80),RLSE),AVGREC=K
//*
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 3:13 am    Post subject:
Reply with quote

FBA?
Ignore the JCL, look at the actual file...
Or what do your writes look like?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 4:27 am    Post subject:
Reply with quote

CICS Guy,
I don't think he can tell you what his writes look like. He never gets it open.

but, the ops-sys is interpreting his dd statement as an allocation for a 361 byte lrecl. so, it is either SRCDSCB - overrides any lrecl? or AVGREC=K
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Sat Aug 25, 2007 1:20 pm    Post subject: Reply to: FILE STATUS 39 while opening the file
Reply with quote

The reason of this error genrerally when record legnth of logical records
and file is mismatch


In your case as per my assumption

you try to write the record in the opt file having record length

is 360 so there are following p0ssibilities to arise the 39 file-status:

1.you try ro write the input record having legnth (either <360 or >360)
different from output record first see the input or what are try to write check this
first

2.you check the file legth and there record structure you trying to write


---sachin borase
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 3:15 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
I don't think he can tell you what his writes look like. He never gets it open.
I was referng to the write statements......Just wondering .....
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Sat Aug 25, 2007 4:16 pm    Post subject:
Reply with quote

jz1b0c,

Are you using WRITE ... AFTER/BEFORE ADVANCING PAGE/nLINES in program. If yes, then the compiler may add one byte to length of the field description. In your case 360+1=361.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 5:52 pm    Post subject:
Reply with quote

shankar.v,

excellent point. I have misinterpreted the error message. After looking it up I image your suggestion may be accurate, since it does not seem to be a variable length record.

so, the dd statement should be RECFM=FBA,LRECL=361 ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 5:54 pm    Post subject:
Reply with quote

CICS Guy,

my appologies, you were also on the right track.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 6:12 pm    Post subject:
Reply with quote

Dick,

I was thinking that but I just couldn't see why anybody would specify carriage control on a 360 byte line..... icon_confused.gif

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 6:49 pm    Post subject:
Reply with quote

People use commands like WRITE AFTER without looking up what it means.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 7:00 pm    Post subject:
Reply with quote

Just what I was thinking.....
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Mon Aug 27, 2007 7:46 pm    Post subject:
Reply with quote

shankar.v

you are right. There was after advance in that program.
Thanks everyone..
Back to top
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Mon Aug 27, 2007 8:22 pm    Post subject:
Reply with quote

If you still get the mismatch record length, then try to add "Record contains 360 characters" that should solve it.
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 Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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