Solved

Does IBM mainframe deals with Pcode and then with EXE ?

Posted on 2011-02-14
10
698 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Eduardo Fuerte
  • 5
  • 5
10 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 34891108
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?
0
 

Author Comment

by:Eduardo Fuerte
ID: 34891780
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 ?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 34891928
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?
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:Eduardo Fuerte
ID: 34892303
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 ?



0
 
LVL 57

Accepted Solution

by:
giltjr earned 250 total points
ID: 34892672
O.K. clipper is the closest thing:

Technically the output from the compile step is object code, I would assume that is the same thing as pCode.

The object code is the actual executable machine language for your program.

The linkage editor takes the object code from your program makes the actual load module.

The load module may include other code that your program calls or may be needed by the enviroment you are executing in.

You can think of CICS as a application server. It needs specfic things in the load module, so the linkage editor merges that information with your program.

Now, the mainframe can use other programming languages.  For example, CICS can also execute PL/I, Fortran, assembler, C/C++, Java, and a few others that I may not be aware of.

When executing Java, it does it like any other J2EE server.
0
 

Assisted Solution

by:Eduardo Fuerte
Eduardo Fuerte earned 0 total points
ID: 34895613
Hello

Your reply is very clear.
But just one last doubt: CICS itself calls a Java (or Fortran) module ?

Thanks.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 34903434
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.
0
 

Author Comment

by:Eduardo Fuerte
ID: 34906194
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.
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 34936293
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.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 34937151
--> 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.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question