View previous topic :: View next topic
|
Author |
Message |
muralikrishnan_new
New User
Joined: 02 Jun 2013 Posts: 15 Location: India
|
|
|
|
Hi,
I am trying to declare 58K for external FD item in my cobol program. But it throws error as mentioned below
Code: |
FD INDATA EXTERNAL
RECORD CONTAINS 58000 CHARACTERS
RECORDING MODE F
BLOCK CONTAINS 0 RECORDS
DATA RECORD IS INFILE.
|
Code: |
The minimum calculated record size of file "INDATA" was greater
than the maximum allowable size 32767. 32767 was assumed.
|
www.tek-tips.com/viewthread.cfm?qid=426037
trying to search compiler option to override the limit. Could you please help me on it.
Thanks,
Murali
[/code] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There is no such compiler override. COBOL does not support record lengths longer than 32767. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Poor Design, How does anybody don't know this and made this decision? may you tell us more about the content or what are you doing with this file in a program?
An alternate could be to use DFSORT and break record into two and then pass it to cobol program and then build an array and then process it. or use CICS MQ |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
But it throws error as mentioned below |
Terminology is critical in IT, where similar terms may mean very different things. You CANNOT "throw" an error in COBOL -- maybe in Java on the mainframe, but in general mainframes do not "throw" errors -- period. You are COMPLETELY wrong in using this phrase with reference to a COBOL program. You may get an ABEND, or (as in your case) get a compiler error, but nothing got thrown. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Quote: |
but nothing got thrown |
I throw a fit when I can't get my desired results. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
OK, we'll make an exception for you. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I assume you mean an exception :-) |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Would this be a specification exception? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
The record size limit is imposed because z/OS data management is limited to a maximum record length of 32760 bytes. This limit is imposed for two reasons.- z/Architecture I/O hardware is limited to a maximum physical record size of 65535 bytes. However, the arithmetic is done using z/Architecture signed half word arithmetic, which is limited to 32767 bytes.
- 32760 is a multiple of 8.
Logical records in data sets using spanned variable length records can be 32767 bytes, which is why 32767 is allowed. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And you can use VSAM for (considerably) longer than 32767. However, just because you can, does not mean it is a good idea in all cases.
Get the file redesigned. Preferably use records which do not exceed 27998 bytes in length. If you have more data, it is wildly simple to treat multiple actual records as a single amount of logical data. |
|
Back to top |
|
|
|