COBOL compiler error IGYDS1267

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

COBOL compiler error IGYDS1267

Post by diwz » Thu Mar 07, 2013 11:27 am

I am compiling a COBOL program and got an error while trying to increase the OCCURS clause in WORKING STORAGE SECTION.

"IGYDS1267-S The size of the "WORKING-STORAGE SECTION" exceeded the compiler limit of 128 megabytes of memory. Execution results are unpredictable. "

I checked the IBM technote(troubleshooting) page

http://www-01.ibm.com/support/docview.w ... wg21220835

It says to use EXTERNAL clause in working storage section. I have not used this clause before. Is it recommended to use this clause when needed or any other solution is available?. I am checking the IBM library. Meanwhile if someone who encountered the same issue can help me, that will be great.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Mar 07, 2013 12:08 pm

OK, so first explain why you need more than 128mb of Working-Storage and whether you can reduce it?

Is it a called program, or the main program.

There are various ways "around" it if necessary, but the first thing is to see if it is necessary.

diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

Post by diwz » Thu Mar 07, 2013 1:10 pm

There is a business requirement for the existing program to increase the OCCURS XXXX TIMES clause for accomodating, processing one more table data. That is why it needs more than 128 MB(reasoned it when I got this error). Since it is an existing program which is running live without issue for no of years with more business logic. I can't reduce it without thorough analysis.

It is main program.

By the way, I tried with EXTERNAL clause during compilation by giving

01 WS-XXXXX EXTERNAL
05 TABLE-DATA OCCURS XXXXX TIMES

Compilation goes thru fine. Is it okay to use EXTERNAL or as you said I can try various ways if it is necessary. Please advise.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Mar 07, 2013 1:24 pm

You have three main choices. A LOCAL-STORAGE SECTION, EXTERNAL or "acquiring" storage from Language Environment.

For a main program, the LOCAL-STORAGE will act exactly like having an "extra" WORKING-STORAGE. This is what I'd go for.

diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

Post by diwz » Thu Mar 07, 2013 1:59 pm

I am going to try with LOCAL-STORAGE SECTION. Why don't you prefer EXTERNAL. As it can be used by other programs at run time?.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Mar 07, 2013 2:54 pm

Mainly is unless people at the site are used to using EXTERNAL there is going to be a larger element of "uncertainty" about it. The LOCAL-STORAGE for a main program is more like an "extra WORKING-STORAGE" without having to wonder about the details.

The LOCAL-STORAGE is initialised by Cobol each time the program is entered. This is why it would not work in a program entered more than once.

The WORKING-STORAGE is initialised by Cobol the first time a program is entered. If a program is entered only once, WORKING-STORAGE and LOCAL-STORAGE are equivalent, each with their own separate 128mb, which should be enough for you.

As they are, for a main program, the same, this is why I'd go with LOCAL-STORAGE - it is the simplest, and won't get other people wondering "what's all that about?".

diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

Post by diwz » Thu Mar 07, 2013 4:05 pm

It is working without any issue now. I have removed EXTERNAL and using LOCAL-WORKING SECTION now.

Thanks Williams for guiding on this issue.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others