How compiler works?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

How compiler works?

Postby amitkool29 » Thu Apr 10, 2008 7:16 pm

Hi all,
LIke in C programming, when C compiler reads int x; a memory area of 4 bytes gets reserved for variable x.
Similarly how the PERFORM and IF statements are executed in cobol compiler?
amitkool29
 
Posts: 1
Joined: Thu Apr 10, 2008 8:31 am
Has thanked: 0 time
Been thanked: 0 time

Re: How compiler works?

 

Re: How compiler works?

Postby CICS Guy » Thu Apr 10, 2008 11:18 pm

The PERFORM sets up looping logic and the IF generates compare logic.
For more detail, write a very simple short program with the verbs you are wanting to understand and look at the generated Assembler code....
CICS Guy
 
Posts: 255
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How compiler works?

Postby dudu325 » Thu Aug 21, 2008 11:40 am

Hi CICS Guy,

How could we view the generated assembler code? could you please help me with more details?
Thanks
dudu325
 
Posts: 2
Joined: Thu Aug 21, 2008 11:14 am
Has thanked: 0 time
Been thanked: 0 time

Re: How compiler works?

Postby pi17388 » Sat Sep 13, 2008 10:05 pm

Displaying the compiler generated assembler code is controlled by compiler options -- the specific option depends on the compiler version. For instance, in OS/VS Cobol the option would be coded as "PMAP".
pi17388
 
Posts: 6
Joined: Tue Feb 19, 2008 9:33 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post