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
 

 

Compiler option for override the external data item in FD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Fri Jul 08, 2016 12:09 pm    Post subject: Compiler option for override the external data item in FD
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.   


http://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: 7931
Location: Bellevue, IA

PostPosted: Fri Jul 08, 2016 3:04 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1624
Location: NY,USA

PostPosted: Fri Jul 08, 2016 7:21 pm    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Fri Jul 08, 2016 8:25 pm    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Sat Jul 09, 2016 12:40 am    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Sat Jul 09, 2016 12:54 am    Post subject:
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Sat Jul 09, 2016 4:05 am    Post subject: Reply to: Compiler option for override the external data item in FD
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: 1746
Location: Bloomington, IL

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

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

Active User


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

PostPosted: Sat Jul 09, 2016 1:07 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Sat Jul 09, 2016 3:43 pm    Post subject: Reply to: Compiler option for override the external data item in FD
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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