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

Mismatch error 39 in my cobol+DB2 program


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Oct 24, 2008 7:46 pm
Reply with quote

Hi All,

I am getting file mismatch error 39 in my cobol+DB2 program.
I have declared output file in FD section as follows
Code:
FD REPORT-FILE                                 
    BLOCK CONTAINS 0 RECORDS                   
    RECORDING MODE IS F.                       
01 REPORT-RECORD       PIC X(80).   

In the JCL, I have declared as follows
Code:
//RPTFILE  DD DSN=TSHRCI.RNRP149.RECRPT.OUT,             
//            DISP=(NEW,CATLG,DELETE),                   
//            UNIT=TESTCI,SPACE=(CYL,(1,1),RLSE),       
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)     

Error giving as
A file attribute mismatch was detected. File REPORT-FILE in program RNRP149 had a record length of 81 and
the file specified in the ASSIGN clause had a record length of 80.

I am not able to trace out where the problem is.
Could anyone help me out on this.

Thanks in advance..

Sandhya.

Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 24, 2008 8:39 pm
Reply with quote

Turn off the ADV option in your COBOL program compile. Or take the WRITE REPORT-RECORD AFTER ADVANCING and remove the AFTER ADVANCING clause from the code.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Oct 25, 2008 3:07 am
Reply with quote

Robert,

I got a question here now,

Would having a LINAGE clause in FD entry casuse the same ?

I understand, the ADVANCING phrase of the WRITE statement, or the presence of a LINAGE clause on the file, causes a carriage control character to be generated in the record that is written. My concern is - where that Carriage contorl character is introduced in this case? at the end-of-the-page ? or it also alter the LRECL ?

And I believe, ADV option is default- one needs to use NOADV if s/he has already adjusted the record length to include 1 byte for the printer control character ?

Please assist.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Oct 25, 2008 3:26 am
Reply with quote

Hi Anuj,

Carriage control is the first byte in a print record.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Oct 25, 2008 4:27 am
Reply with quote

Anuj, I don't believe that LINAGE clause or the ADVANCING clause will cause the byte to be added; only the ADV compiler option will do that. I haven't tested this with the current compiler to be sure, though. However, if you put something like
Code:
WRITE OUT-RECORD FROM WS-LINE-01 AFTER ADVANCING 1
and NOADV is the compiler option, you'd better not have anything in column one of WS-LINE-01 because you're not going to see it -- carriage control takes over column 1.

With ADV, the LRECL of the file is affected -- hence the o/p error message indicating 81 byte file length but only 80 bytes is defined to the program. And hence Sandhya's trouble finding the error; if you don't look closely at the MAP output you won't see the difference.

And while ADV is the default as delivered, I've seen shops set NOADV to be the default for reasons of their own (usually due to the record length issue).

Back in the 1403 printer days, carriage control was actually handled by a paper tape on the printer -- depending on which values were on the tape you could skip to the next 1/4th or 1/3rd page. I once emptied a 3000-sheet box of paper in under a minute by skipping to a location that wasn't on the paper tape; I had paper coming straight out 3 feet from the printer.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Oct 25, 2008 6:34 am
Reply with quote

Quote:
emptied a 3000-sheet box of paper in under a minute by skipping to a location that wasn't on the paper tape;

Ah, the dreaded "skip to the end of the box" channel . . .

Also, a reminder to some operators that certain jobs really did need their own carriage tape rather than the "standard" carriage tape. . .

d
Back to top
View user's profile Send private message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Tue Oct 28, 2008 11:23 am
Reply with quote

Thanks a lot everyone..

I have removed ADVANCING clause from my code.
Its working fine.


Thanks once again

Sandhya..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 28, 2008 11:29 am
Reply with quote

Good to hear it is working - thank you for providing the update icon_smile.gif

d
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Oct 28, 2008 2:12 pm
Reply with quote

All the fun with the carriage control tape (punching holes in the carriage tape) went when we moved onto FCB's.


Gerry
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Error when install DB2 DB2 2
Search our Forums:

Back to Top