# MCG : Natural optimizer compiler

**URL:** <https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [July 20, 2009, 3:44pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733 "2009-07-20T15:44:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balaryan1](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Balaryan1](https://techcommunity.softwareag.com/u/Balaryan1)\
**Post date:** [July 20, 2009, 3:44pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733/1 "2009-07-20T15:44:22Z")

</div>

Hi All,

Can anyone give me a clear picture about MCG ?

I just know it is Machine code generator. 🙂 ( Believe, not more than that,)

What it will do in Programs, as it relates to prove any efficiency performance of the program. ?

If i set options MCG = ON / OFF, what it will do??

kindly give some info on the same.

Advance thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 20, 2009, 4:58pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733/2 "2009-07-20T16:58:02Z")

</div>

Where possible it generates machine code out of your Natural code to use less cpu and make your program execute faster.

For detailed information please take a look here → [url][http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat425mf/noc\_mf/noc\_mf-over.htm[/url]](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat425mf/noc_mf/noc_mf-over.htm%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![Balaryan1](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Balaryan1](https://techcommunity.softwareag.com/u/Balaryan1)\
**Post date:** [July 21, 2009, 4:06pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733/3 "2009-07-21T16:06:02Z")

</div>

Hi Mogens,

Thanks for ur reply and info,

So in order to confirm the same, you mean to say if i set OPTIONS MCG = ON, then my program statements will convert into machine code during execution of ONLINE / BATCH…

Which leads to Performance improvement …

If i dint set to ON, it will consider only Object code and proceed further… Right ??

pls correct me, if i am wrong.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 21, 2009, 7:08pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733/4 "2009-07-21T19:08:15Z")

</div>

MCG=ON switches on optimization with default options. There is several options you can select.

The machine code is generated when you compile (stow) your program.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:57pm UTC](https://techcommunity.softwareag.com/t/mcg-natural-optimizer-compiler/90733/5 "2021-04-02T14:57:16Z")

</div>


