IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COBOL Version 6.1


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Virendra Shambharkar

New User


Joined: 26 Aug 2015
Posts: 55
Location: India

PostPosted: Tue Nov 01, 2016 11:24 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 01, 2016 11:44 am
Reply with quote

You could have found out Yourself by googling with "cobol 6.1" to land at
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: 55
Location: India

PostPosted: Tue Nov 01, 2016 11:49 am
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

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 01, 2016 12:55 pm
Reply with quote

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

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


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

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: 55
Location: India

PostPosted: Tue Nov 01, 2016 2:09 pm
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Nov 01, 2016 5:45 pm
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: 792
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 4:41 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 08, 2017 4:47 pm
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: 792
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 7:18 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 08, 2017 8:52 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Mar 08, 2017 9:00 pm
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: 792
Location: Chennai, India

PostPosted: Wed Mar 08, 2017 11:33 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 09, 2017 12:13 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 09, 2017 12:41 am
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
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: 88
Location: India

PostPosted: Fri Mar 10, 2017 10:58 am
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: 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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top