Link to home
Start Free TrialLog in
Avatar of Eduardo Fuerte
Eduardo FuerteFlag for Brazil

asked on

Does IBM mainframe deals with Pcode and then with EXE ?

Hi Experts

Making a Cobol/ CICS application
Does IBM mainframe deals with Pcode and then with EXE ?
If so, Is it optional to make the EXE ? (I mean: it could run pcode)

Thanks in advance
Avatar of giltjr
giltjr
Flag of United States of America image

What do you mean by "pcode?"

Just like on a PC some languages must be compiled into binary executable form before they can be executed.  Other languages are interperted at execution time.

COBOL is one of multiple languages that must be compiled into binary executable prior to being run.

Does that help?
Avatar of Eduardo Fuerte

ASKER

Hello

If I well undesrtood Cobol (like several other languages) follow that steps:

Cobol/CICS code  =>
                      Compilation (that generates what I meant pCode)  =>
                                                                             Linkedition (that generates executable binary code)

Thath's right ?
Well there are a few different definitions for "pCode" out there.

The output from the compile step is the executable code, which is equivalent to an ".exe" file in the Window world.

      source code --> compile program --> ".exe"

The link edit step does not create the binary code, the compile step creates the binary code.  

The linkedit step takes the binary code and creates the program module.

What programming languages are you familiar with?
Hello

Well I've been using Visual FoxPro / PHP/ more recently....

But your example  has made me remember  Clipper 5.2 (DOS) - do you know ?

.PRG  =>  Compiled to pCode  => Then Linkedited with Libraries => .EXE

That's right ?



ASKER CERTIFIED SOLUTION
Avatar of giltjr
giltjr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points.  Just as a F.Y.I., I read up on clipper and p-code at:

     http://en.wikipedia.org/wiki/Clipper_%28programming_language%29

It seems that p-code is not really truly executable machine code.   From the description p-code sounds more like "compiled java" is really not comiplied code.  They both seem to be source code that is "translated" to a more compact form of code that still needs to be interperted by another program.  Compiled Java code, and from the sounds of p-code, is still machine/OS independent and can be copied to any machine any OS and still run.

True binary compiled code can only run on the machine and OS that it was compiled to run under.
 
The output from a Cobol compiler is machine and OS specific.
Very good. This difference is remarkable.  (Cliiper and Cobol uses pseudo code with another concept than Java)
I'm planning another question in Mainframe context.
Please disconsider my last interaction. After a better reading it's not necessary.

I'm planning to return here to obtain another topic details.

Thank very much.
--> But just one last doubt: CICS itself calls a Java (or Fortran) module ?

I missed this part  I'm not 100% sure what you mean, but:

CICS can execute Java or Fortran program, or a few other languages like C/C++ or PL/I.

So if you have a Fortran program, you compile it into a executable, define it as needed to CICS and CICS will be able to excute it.

If you have a Java program, you define it to CICS and CICS will execute it.  Well actually CICS will execute the JRE and the JRE executes the Java program.