View previous topic :: View next topic
|
Author |
Message |
Amanpuri
New User
Joined: 09 Oct 2008 Posts: 10 Location: Pune, India
|
|
|
|
Hi Friends,
Could anybody tell me how to run the "hello world" COBOL program in the real mainframes. What all JCL code we need(like Compile JCL, Link JCL) to run the COBOL Program. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.
*
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
DATA DIVISION.
FILE SECTION.
PROCEDURE DIVISION.
MAIN-LOGIC SECTION.
BEGIN.
DISPLAY "Hello world!" LINE 15 POSITION 10.
STOP RUN.
MAIN-LOGIC-EXIT.
EXIT. |
Suggest start reading Manuals please, they are linked via the link name "IBM Manuals" on every page of this site. |
|
Back to top |
|
|
Amanpuri
New User
Joined: 09 Oct 2008 Posts: 10 Location: Pune, India
|
|
|
|
Hi,
Thanks for the program, but actually i want to know that how to run the COBOL program in the real mainframes i.e. what all JCL codes we need to run the program. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
1. First you write the code as above.
2. Then you need to compile/link-edit it. Not trying to sound rude - are you just starting with Mainframes ? If yes, please talk with your peers, for this step JCLs are standards & they are local to respective shops. Usually shops are using version control tools now, such as Chnage Man, Endvaour etc.
3. Then you need a JCL which will call this program to EXECute it. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Amanpuri,
Quote: |
Thanks for the program, but actually i want to know that how to run the COBOL program in the real mainframes i.e. what all JCL codes we need to run the program. |
First,
- Code a SAMPLE program
- Compile using the compile jcl (which runs a compile program)
- Link it using a LINK jcl (IEWL is one such linker available)
- Run it using a Run JCL
Compile would create a object module and Load module would be created as a result of linking.
Search the forum for the sample compile and link JCl's. |
|
Back to top |
|
|
Amanpuri
New User
Joined: 09 Oct 2008 Posts: 10 Location: Pune, India
|
|
|
|
I'll try to do this and revert back.Thanks for your help. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Anuj,
You have made the program complex by adding (BEGIN, FILE SECTION and CONFIGURATION SECTION ) . Any specific reason for including these statements? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Complex !!
Are you kidding? |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
"Hello World"program is a sample program delivered by IBM and used to test that the installation of the compiler was successful. If you have found the sample code look in the SCEESAMP library for member CEEWIVP |
|
Back to top |
|
|
Amanpuri
New User
Joined: 09 Oct 2008 Posts: 10 Location: Pune, India
|
|
|
|
Hi nevilh,
Thanks for suggestion, but plz tell me where would i get the CEEWIVP member means Is there any PDS which contains this member?I'm not able to find the SCEESAMP library. Please elaborate more on this. |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
libray is called xxxx.sceesamp. xxxx is site dependent. Sorry I can't be of more help. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Aman Puri !
before replying I checked Your profile... ( where You listed your skills )
no offense meant, but You are much on the beginner' s side
look at
www.simotime.com/
in the jcl and cobol connections, You will find a clear explanation of a few things,
but remember, we do not know your standards and your software levels
the only certain source for compile jcl' s is your organization |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Aaru,
The way question was framed I thought to give a skeleton of a full COBOL Program - nothing much to think about. May be this is what are you looking for:
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
MAIN.
DISPLAY 'Hello, world.'.
STOP RUN. |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
TS did not ask for the code. . .
What TS asked for is:
Quote: |
What all JCL code we need(like Compile JCL, Link JCL) to run the COBOL Program. |
The answer was given early - this should come from peers or someone else who compiles on that system. There will be standard jcl already in use.
TS should not be given jcl here as it will not be complete/correct for that system. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Ped,
Quote: |
Complex !!
Are you kidding?
|
No I am Not. This could have been written simpler.
Check Anuj's post, You would understand. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Suggest we stop wasting time on the "complexity" of source code that was not requested in the first place. . . .
d |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Aaru,
( I don't want to start a bad discussion - be sure ).
But it is not because a program can be written simpler that the program is complex.
Have a nice week-end. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Sorry Dick,
I posted my last response before reading your request.
But I repeat : what I said is very low importance, and without stress.
Quite then.
Bye
Pierre |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Not to worry
No harm meant, no foul taken
d |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Hello Dick,
Quote: |
Suggest we stop wasting time on the "complexity" of source code that was not requested in the first place. . . . |
Point Taken |
|
Back to top |
|
|
|