What is default program name?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

What is default program name?

Post by Vibha »

Hi,

I'm new to COBOL and have not got the access to system yet. Though I got to know that in COBOL program name is not mandatory, if so then what is the default program name when we don't assign it?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is default program name?

Post by Robert Sample »

You are mistaken in one sense. COBOL requires a program name -- from the Enterprise COBOL Language Reference manual:
3.1.1 PROGRAM-ID paragraph






The PROGRAM-ID paragraph specifies the name by which the program is known and assigns selected program attributes to that program. It is required and must be the first paragraph in the identification division.
However, if a name is not provided to the linkage editor / binder for the PDS member name of the load library, TEMPNAME will be assigned as the default.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: What is default program name?

Post by William Collins »

It is an easy thing to experiment with once you have access to a system. Compile a program without PROGRAM-ID and post the compiler diagnostics you get.

For fun, also write a program which uses CALL identifier (rather than CALL literal). Experiment with setting identifier to things which they are not allowed to be to be a valid program-name.

You will get little benefit by just asking someone these types of things, but the process of experimentation can be useful to you if you do it yourself.
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

Re: What is default program name?

Post by Vibha »

Thanks Robert and William. I'll try this as soon as I get a mainframe access.

Wish I could simulate a mainframe environment on my PC.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 828
Joined: Wed Sep 11, 2013 3:57 pm

Re: What is default program name?

Post by enrico-sorichetti »

You have two alternatives ...

the Hercules Emulator
( hardware emulator, You will have to provide-install the operating system )
http://www.hercules-390.org

the z390 simulator
http://www.z390.org
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

Re: What is default program name?

Post by Vibha »

I findit tough to follow the instructions for Hercules. I'm not sure if I'll be ablr to make it work. Will try z390.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: What is default program name?

Post by nicc »

You could try one of the turnkey Hercules offerings - Anuj posted a link the other day. I got it up and running with almost no problems. The problems arise when you get logged on - no ISPF and, so far, I find what documentation there is for the options available is a bit lacking. Example, I created and ran an IEFBR14 job and thought it got saved in the PDS but when I looked the job was not there. More playing required. But if you are a newbie to IBM mainframe - of any level - then Hercules would, probably, not be the best way to go.
Regards
Nic
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

Re: What is default program name?

Post by Vibha »

Thanks nicc. I've tried to follow up instructions provided by Anuj at this Forum http://zmainframes.com/viewforum.php?f=45 but I find it tough to follow. I got the hercules installed but to get the working OS under it...is nightmare.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 828
Joined: Wed Sep 11, 2013 3:57 pm

Re: What is default program name?

Post by enrico-sorichetti »

probably starting from here might make things easier

https://wotho4.ethz.ch
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: What is default program name?

Post by nicc »

Actually, apologies, I got it wrong - Enrico posted the link
http://zmainframes.com/viewtopic.php?f=45&t=512
2nd last link in his post.
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”