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

Mixing Cobol and C++


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

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Wed Nov 24, 2010 8:58 pm
Reply with quote

We have a legacy Cobol program that calls an Assembler routine dynamically for table handling functions. We want to convert this Assembler routine to C/C++. That is no big problem. the problem comes in when the C++ is running in 64 bit mode. This requires that the C++ be set up as XPLINK. However, the Language Environment manuals state that a Cobol dynamic call of an XPLINK function is not supported.

I have tried creating a small Assembler module as "glue" code but the parameters passed into C++ end up being junk.

Has anyone addressed any similar problems of mixing Cobol and C++ dynamically?

TIA
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 24, 2010 9:03 pm
Reply with quote

why C++ and why 64bits
do You have a <doctors> prescription for that ? icon_biggrin.gif

in one of Your previous post we discussed about C not C++
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 24, 2010 9:03 pm
Reply with quote

HLASM can run above the bar, so why C or C++?

COBOL will NEVER be above the bar in the near future but perhaps, one day.

Is this a management directive?

Bill
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 24, 2010 9:08 pm
Reply with quote

/sillyness on
C++ is for lame programmers
they can legally tell that they did not make errors... they just inherited them
/sillyness off
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Wed Nov 24, 2010 9:09 pm
Reply with quote

We have already converted the Assembler to 64 bit and that runs just fine.

They want to convert to C so that future maintenance might be easier. Us old Assembler types are starting to die off and they are thinking down the road.

They have no desire to have Cobol above the bar. This is a table handling subourtine and it now handles some very big tables -3GB plus.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 24, 2010 9:17 pm
Reply with quote

Well, I can't help from here. I'm not that literate in C.

This sounds like one of those management decisions, like "If our Assembler person gets hit by a bus, who will maintain this routine".

Of course, these are the builtin-in scare tactics that they use for justification.

But, as I eluded to, COBOL will never be above the bar and won't go beyond AMODE 31. However, never versions of Enterprise PL/I can go above the bar.

Assembler will always be around, long after we're all dust in the wind, so this seems like an overreaction.

You could pass this on to your next Journeyman? icon_wink.gif

Bill
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Nov 25, 2010 3:03 pm
Reply with quote

Bill O'Boyle wrote:
This sounds like one of those management decisions, like "If our Assembler person gets hit by a bus, who will maintain this routine".
This sentence was actually told in some of your meetings, Bill...or...?

I had a good laugh, however...icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Nov 25, 2010 3:16 pm
Reply with quote

Grant Goodale wrote:
This requires that the C++ be set up as XPLINK. However, the Language Environment manuals state that a Cobol dynamic call of an XPLINK function is not supported.
Grant - I'm not very sure and have never tried this, however, may be this part of the manual can help you The only way a COBOL routine can call an XPLINK-compiled routine is if the caller is compiled with the Enterprise COBOL for z/OS or COBOL for OS/390 & VM compiler with the DLL compiler option, and the target of the call is in a separate DLL, or vice versa. though as you said, COBOL Dynamic Call to XPLINK is not supported..is just the next line manual.

Another links: www-03.ibm.com/systems/z/os/zos/installation/zos_cobol_faqs.html
publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ceea400/clcccb3.htm
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 25, 2010 9:29 pm
Reply with quote

Hi Anuj,

Quote:
This sentence was actually told in some of your meetings, Bill...or...?
This is often heard in meetings and in one-on-one converstion.

When someone has knowledge that would be needed but has not been distributed (meeting or e-mail or other document) they might say something like: "If i get hit by a bus, the cd with the data is in my cabinet".

They don't really expect to get hit by a bus, but this is used generically to refer to a sudden unexpected absence icon_smile.gif
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
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