What is default program name?
What is default program name?
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?
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?
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is default program name?
You are mistaken in one sense. COBOL requires a program name -- from the Enterprise COBOL Language Reference manual:
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.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.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: What is default program name?
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.
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.
Re: What is default program name?
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.
Wish I could simulate a mainframe environment on my PC.
-
- Global Moderator
- Posts: 828
- Joined: Wed Sep 11, 2013 3:57 pm
Re: What is default program name?
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
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
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
Re: What is default program name?
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.
Re: What is default program name?
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
Nic
Re: What is default program name?
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.
-
- Global Moderator
- Posts: 828
- Joined: Wed Sep 11, 2013 3:57 pm
Re: What is default program name?
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
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
Re: What is default program name?
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.
http://zmainframes.com/viewtopic.php?f=45&t=512
2nd last link in his post.
Regards
Nic
Nic
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