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

Compiler option for override the external data item in FD


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 15
Location: India

PostPosted: Fri Jul 08, 2016 12:09 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jul 08, 2016 3:04 pm
Reply with quote

There is no such compiler override. COBOL does not support record lengths longer than 32767.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Jul 08, 2016 7:21 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jul 08, 2016 8:25 pm
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat Jul 09, 2016 12:40 am
Reply with quote

Quote:
but nothing got thrown

I throw a fit when I can't get my desired results. icon_evil.gif icon_lol.gif
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 Jul 09, 2016 12:54 am
Reply with quote

OK, we'll make an exception for you.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Jul 09, 2016 4:05 am
Reply with quote

I assume you mean an exception :-)
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sat Jul 09, 2016 10:11 am
Reply with quote

Would this be a specification exception?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sat Jul 09, 2016 1:07 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Jul 09, 2016 3:43 pm
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top