View previous topic :: View next topic
|
Author |
Message |
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Anuj,
Carriage control is the first byte in a print record. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
Thanks a lot everyone..
I have removed ADVANCING clause from my code.
Its working fine.
Thanks once again
Sandhya.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for providing the update
d |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
|