IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Run "Hello world" COBOL program in mainframes


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amanpuri

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Sat Nov 22, 2008 11:13 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Nov 22, 2008 11:42 am
Reply with quote

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
View user's profile Send private message
Amanpuri

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Sat Nov 22, 2008 11:45 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Nov 22, 2008 11:59 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:02 pm
Reply with quote

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
View user's profile Send private message
Amanpuri

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Sat Nov 22, 2008 12:06 pm
Reply with quote

I'll try to do this and revert back.Thanks for your help.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:06 pm
Reply with quote

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
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Nov 22, 2008 1:38 pm
Reply with quote

Complex !!
Are you kidding?
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Sat Nov 22, 2008 2:29 pm
Reply with quote

"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
View user's profile Send private message
Amanpuri

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Sat Nov 22, 2008 2:35 pm
Reply with quote

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
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Sat Nov 22, 2008 2:41 pm
Reply with quote

libray is called xxxx.sceesamp. xxxx is site dependent. Sorry I can't be of more help.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Nov 22, 2008 2:44 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Nov 23, 2008 12:04 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 23, 2008 12:56 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sun Nov 23, 2008 1:05 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 23, 2008 1:11 am
Reply with quote

Suggest we stop wasting time on the "complexity" of source code that was not requested in the first place. . . .

d
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Nov 23, 2008 4:13 am
Reply with quote

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
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Nov 23, 2008 4:16 am
Reply with quote

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. icon_smile.gif

Bye

Pierre
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 23, 2008 5:55 am
Reply with quote

Not to worry icon_smile.gif

No harm meant, no foul taken icon_wink.gif

d
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Nov 24, 2008 12:41 am
Reply with quote

Hello Dick,

Quote:
Suggest we stop wasting time on the "complexity" of source code that was not requested in the first place. . . .


Point Taken icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts SH256/MD5 Checksum in Mainframes JCL JCL & VSAM 14
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top