View previous topic :: View next topic
|
Author |
Message |
Mohan Makana
New User
Joined: 07 Feb 2006 Posts: 18
|
|
|
|
Hi,
My input file's record length(LRECL) is 760 bytes. but the first record of the input file contained only 350 bytes of data. While READing input file in my program ...it is filling all 760 bytes with the current record data along with the immediate next record data. How do I have to stop this from happening...is this the problem with the input file or with the READ statement.
Thanks, |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What is the COBOL blocksize?
What is the file blocksize?
What is the COBOL recfm?
What is the file recfm?
What is the COBOL lrecl?
What is the file lrecl? |
|
Back to top |
|
|
Mohan Makana
New User
Joined: 07 Feb 2006 Posts: 18
|
|
|
|
Cobol :
BLOCK CONTAINS 0 CHARACTERS
RECORDING MODE IS V
LABEL RECORDS ARE STANDARD
----
Max. Record Length is 760 as it is using different layouts.
--------------------------------------------------------------------
JCL :
DCB=(RECFM=VB,LRECL=760,BLKSIZE=0,DSORG=PS) |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Mohan Makana wrote: |
My input file's record length(LRECL) is 760 bytes. but the first record of the input file contained only 350 bytes of data. While READing input file in my program ...it is filling all 760 bytes with the current record data along with the immediate next record data. How do I have to stop this from happening...is this the problem with the input file or with the READ statement. |
I can't think of how you can get a read statement to do that.
This sounds like the llbb at the front of the first record says that it is 760 bytes.
Take a hex dump of the block and look to confirm. |
|
Back to top |
|
|
Mohan Makana
New User
Joined: 07 Feb 2006 Posts: 18
|
|
|
|
Cobol :
BLOCK CONTAINS 0 CHARACTERS
RECORDING MODE IS V
LABEL RECORDS ARE STANDARD
----
Max. Record Length is 760 as it is using different layouts.
--------------------------------------------------------------------
JCL :
DCB=(RECFM=VB,LRECL=760,BLKSIZE=0,DSORG=PS)
Hi William,
Does it make any difference if we didn't specify
BLOCK CONTAINS 0 CHARACTERS in the above FD section.
Thanks |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Bill is talking about the preamble (first 4 bytes) in the record where you may find the recordlength of VB files. You can also investigate using TSO. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Mohan Makana wrote: |
Does it make any difference if we didn't specify
BLOCK CONTAINS 0 CHARACTERS in the above FD section. |
Not on an input file.
Again, you need to get a hex dump of at least the first 8 bytes of the first block (you did say it was the first record read, right?) so that you can verify the actual record length of the first record. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It would be interesting to see the code and the jcl that created this file. . . |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Hi,
Could you please post the assign-to clause of your input file.
May be that is creating problem.
Actually I encountered the same problem but not on mainframes .
when I was using PC cobol for practice sessions got same problem.
Thanks,
-kapil. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Check to DSN characteristics; just might say RECFM=FB |
|
Back to top |
|
|
|