Page 1 of 1
What is default program name?
Posted: Sun May 04, 2014 9:09 pm
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?
Re: What is default program name?
Posted: Sun May 04, 2014 10:31 pm
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.
Re: What is default program name?
Posted: Mon May 05, 2014 8:01 pm
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.
Re: What is default program name?
Posted: Tue May 06, 2014 12:34 pm
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.
Re: What is default program name?
Posted: Tue May 06, 2014 12:55 pm
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
Re: What is default program name?
Posted: Tue May 06, 2014 1:41 pm
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.
Re: What is default program name?
Posted: Tue May 06, 2014 3:12 pm
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.
Re: What is default program name?
Posted: Thu May 08, 2014 1:37 pm
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.
Re: What is default program name?
Posted: Thu May 08, 2014 2:33 pm
by enrico-sorichetti
probably starting from here might make things easier
https://wotho4.ethz.ch
Re: What is default program name?
Posted: Thu May 08, 2014 3:40 pm
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.