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
 

 

COBOL Version 6.1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Virendra Shambharkar

New User


Joined: 26 Aug 2015
Posts: 50
Location: India

PostPosted: Tue Nov 01, 2016 11:24 am    Post subject: COBOL Version 6.1
Reply with quote

Hi,

Is COBOL version 6.1 available for use ? I looked for a migration guide for COBOL 6.1 but did not come across any . I might be missing something.

Are there still some dependencies which have not been met before 6.1 can be used?

Any pointers will be helpful.

Thanks,
Virendra
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Tue Nov 01, 2016 11:44 am    Post subject: Reply to: COBOL Version 6.1
Reply with quote

You could have found out Yourself by googling with "cobol 6.1" to land at
http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=897&letternum=ENUS216-059

the main dependency is ... Your organisation decision to upgrade
Back to top
View user's profile Send private message
Virendra Shambharkar

New User


Joined: 26 Aug 2015
Posts: 50
Location: India

PostPosted: Tue Nov 01, 2016 11:49 am    Post subject: Reply to: COBOL Version 6.1
Reply with quote

Thanks a lot. I came across document for 6.1 including the performance improvements . I was looking for documents along this lines which are available for 5.1

http://www.ibm.com/support/knowledgecenter/SSQ2R2_9.0.1/com.ibm.ent.cbl.zos.doc/migrate/igy5mg10.pdf

Thank you once again.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Tue Nov 01, 2016 12:55 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

a very simple google search with IBM COBOL LIBRARY would have take You

http://www-01.ibm.com/support/docview.wss?uid=swg27036733


and clicking on the PDF link would have showed what You were looking for

http://publibfp.boulder.ibm.com/epubs/pdf/igy6mg10.pdf
Back to top
View user's profile Send private message
Virendra Shambharkar

New User


Joined: 26 Aug 2015
Posts: 50
Location: India

PostPosted: Tue Nov 01, 2016 2:09 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

Thank you very much. Have a great day ahead.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Nov 01, 2016 5:45 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

Moving from V5 to V6 is very straightforward. Moving to V6 from V4 or earlier is very similar to the move to V5.

The need to use PDSEs, a COBOL V5+ produces Program Objects, which cannot be stored in a PDS.

Bad data, and the way V4 and earlier worked with bad data.

Bad programs, and the way V4 and earlier worked with bad programs.

There are some new compiler options to consider, some are intended as migration aid (to spot bad data). There's RULES. Some new language constructs (EXIT PERFORM, EXIT PARAGRAPH, EXIT SECTION, for instance, but don't use them).
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 4:41 pm    Post subject: Re: Reply to: COBOL Version 6.1
Reply with quote

Bill Woodger wrote:
... Some new language constructs (EXIT PERFORM, EXIT PARAGRAPH, EXIT SECTION, for instance, but don't use them).

May I please know why not to use the new constructs?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 08, 2017 4:47 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

They are all GO TOs, wrapped up in fanciness, with no named target.

Code:

PERFORM PROGA THRU PROGC-EXIT

PROGA.
....
Somecondition
    EXIT PARAGRAPH
PROGB.
....
PROGC.
...
PROGC-EXIT.
    EXIT.


Where does EXIT PARAGRAPH go to?

Think about what someone may expect it to do, then look at the 6.1 Language Reference and see what actually happens.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 7:18 pm    Post subject: Re: Reply to: COBOL Version 6.1
Reply with quote

Bill Woodger wrote:
They are all GO TOs, wrapped up in fanciness, with no named target.

Code:

PERFORM PROGA THRU PROGC-EXIT

PROGA.
....
Somecondition
    EXIT PARAGRAPH
PROGB.
....
PROGC.
...
PROGC-EXIT.
    EXIT.


Where does EXIT PARAGRAPH go to?

Think about what someone may expect it to do, then look at the 6.1 Language Reference and see what actually happens.

I just ran a test with the above. EXIT PARAGRAPH passed the control to the first statement in PROGB paragraph.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 08, 2017 8:52 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

Correct. And is that "expected" by most people? And when you see it, are you certain it was what was intended?

Not what anyone would want to try to understand :-)

Oh, and a paragraph/SECTION doesn't have to be PERFORMed. So someone could just use it to get out of any old place they happened to be in. Or, is that line of code then someone assuming "this will only exit if the paragraph is PERFORMed".

Then let's have a nice nested in-line PERFORM with EXIT PERFORM or EXIT PERFORM CYCLE. Great fun.

Is everyone going to use them with care and attention? Because if they would, they'd be people who could structure their programs without having to need to use them...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8088
Location: East Dubuque, Illinois, USA

PostPosted: Wed Mar 08, 2017 9:00 pm    Post subject:
Reply with quote

If you start coding programs with EXIT PARAGRAPH or EXIT PERFORM (with or without CYCLE) -- who uses SECTION these days? -- then you might as well throw a few ALTER statements in your code as well to keep things "fun"!
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 11:33 pm    Post subject: Reply to: COBOL Version 6.1
Reply with quote

I'm wondering why IBM has introduced these constructs recently.

Didn't they expect these are really needed as an enhancement to the language?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Mar 09, 2017 12:13 am    Post subject: Re: Reply to: COBOL Version 6.1
Reply with quote

Gnanas N wrote:
I'm wondering why IBM has introduced these constructs recently.

Didn't they expect these are really needed as an enhancement to the language?


They are from the 2002, superseded, now 2014 COBOL Standard.

I think it's an attempt to make COBOL more "recognisable" with regard to other languages.

As you may have guessed, I don't think they are at all a good idea. "GO TO" gets a bad reputation, then we introduce a "secret GO TO", where it is not necessarily clear when it will go, or where it will arrive, and consider it a "structured" construct, so all is OK...

IBM asks people what they want added to Enterprise COBOL. Presumably someone (probably who doesn't know COBOL) thought this was a good idea to add...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8088
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 09, 2017 12:41 am    Post subject:
Reply with quote

I suspect someone thought to emulate a C / C++ break statement in COBOL, without considering all the ramifications.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Mar 09, 2017 12:41 am    Post subject:
Reply with quote

DECs DIBOL had a CALL statement much like COBOLs PERFORM, but it had no concept of an exit paragraph name, so the only way to exit the CALLd paragraph without executing the following statements was to EXIT PARAGRAPH. DIBOL became DBL and changed ownership since then.
Back to top
View user's profile Send private message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 86
Location: India

PostPosted: Fri Mar 10, 2017 10:58 am    Post subject:
Reply with quote

Adding on to Gnanas's question on why the new constructs, I remember a discussion on Compiler Café (at IBM DeveloperWorks) on these lines where Mr. Woodger had shared detailed insights on their usage, I am not able to spot that link currently, but it was on similar lines as this link: https://www.ibm.com/developerworks/community/forums/html/topic?id=f2ee4f5a-8c5b-4508-b1f8-6e1195b4fa54&ps=25

And had more details. It is a good read though for anyone trying to understand the 'why' in detail; a search should yield the correct link.
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 Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 2 Tue May 09, 2017 6:31 pm


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