Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Run "Hello world" COBOL program in mainframes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Run "Hello world" COBOL program in mainframes
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

Senior Member


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

PostPosted: Sat Nov 22, 2008 11:42 am    Post subject:
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    Post subject: Reply to: HELLO WORLD PROGRAM
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

Senior Member


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

PostPosted: Sat Nov 22, 2008 11:59 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:02 pm    Post subject: Reply to: HELLO WORLD PROGRAM
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    Post subject: Reply to: HELLO WORLD PROGRAM
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:06 pm    Post subject: Reply to: HELLO WORLD PROGRAM
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: 456
Location: Belgium

PostPosted: Sat Nov 22, 2008 1:38 pm    Post subject:
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: 258

PostPosted: Sat Nov 22, 2008 2:29 pm    Post subject:
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    Post subject: Reply to: "Hello world" COBOL program in the real
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: 258

PostPosted: Sat Nov 22, 2008 2:41 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Nov 22, 2008 2:44 pm    Post subject: Reply to: "Hello world" COBOL program in the real
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
http://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

Senior Member


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

PostPosted: Sun Nov 23, 2008 12:04 am    Post subject:
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

Site Director


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

PostPosted: Sun Nov 23, 2008 12:56 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sun Nov 23, 2008 1:05 am    Post subject: Reply to: "Hello world" COBOL program in the real
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

Site Director


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

PostPosted: Sun Nov 23, 2008 1:11 am    Post subject: Reply to: "Hello world" COBOL program in the real
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: 456
Location: Belgium

PostPosted: Sun Nov 23, 2008 4:13 am    Post subject:
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: 456
Location: Belgium

PostPosted: Sun Nov 23, 2008 4:16 am    Post subject:
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

Site Director


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

PostPosted: Sun Nov 23, 2008 5:55 am    Post subject: Reply to: "Hello world" COBOL program in the real
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: 1288
Location: Chennai, India

PostPosted: Mon Nov 24, 2008 12:41 am    Post subject: Reply to: "Hello world" COBOL program in the real
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us