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
 

 

Mismatch error 39 in my cobol+DB2 program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Mismatch error 39 in my cobol+DB2 program
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: 8053
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 24, 2008 8:39 pm    Post subject:
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

Senior Member


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

PostPosted: Sat Oct 25, 2008 3:07 am    Post subject:
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

Site Director


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

PostPosted: Sat Oct 25, 2008 3:26 am    Post subject:
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: 8053
Location: East Dubuque, Illinois, USA

PostPosted: Sat Oct 25, 2008 4:27 am    Post subject:
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

Site Director


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

PostPosted: Sat Oct 25, 2008 6:34 am    Post subject: Reply to: Mismatch error 39 in my cobol+DB2 program
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    Post subject: Reply to: Mismatch error 39 in my cobol+DB2 program
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

Site Director


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

PostPosted: Tue Oct 28, 2008 11:29 am    Post subject: Reply to: Mismatch error 39 in my cobol+DB2 program
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: 1703
Location: Australia

PostPosted: Tue Oct 28, 2008 2:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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