IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COBOL File Status Code - 39


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 3:13 am
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: 6966
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 4:27 am
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
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: 2146
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 3:15 pm
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
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: 6966
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 5:52 pm
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: 6966
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 5:54 pm
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: 2146
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 6:12 pm
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: 6966
Location: porcelain throne

PostPosted: Sat Aug 25, 2007 6:49 pm
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: 2146
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 7:00 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top