Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing data from assembler to cobol

Status
Not open for further replies.

andymc1

Programmer
Jun 28, 2002
23
CH
Does anyone know how to do this, I think this is accomplished using pointers but I can't remember exactly how, example code would be really helpful...but of course all help much appreciated

cheers
Andy
 
Hi Tom

this is on z/OS, using Assembler(don't know the version) and Cobol (Enterprise Z/OS) where a third party software, specifically a BMC product written in assembler is attempting to LINK to a cobol program as a submodule in batch from one of its exits. The cobol program has been written to accept the linkage parms purely as we would cobol to cobol i.e. as a block of data. This isn't working, the call to the cobol module is takign a couple of minutes to complete and we are getting very little info back. I need to know how the cobol program should be attempting to reference the data created by the assembler program in a DSECT and if anyone knows how the assembler program should be invoking the cobol(is LINK OK??). All help much appreciated.

cheers
Andy
 
Andy,
Have you put any display statements etc. into the Cobol program so that you can be sure the program is actually being entered?

Does it complete, or abend?

Marc
 
I suspect you may have some issues related to LE here. Unless the calling program is running in an LE environment, it has to specifically setup the LE environment before calling any COBOL code that relies on LE (as I think all of the currently supported compilers do). If it doesn't, you'll have to write an Assembler stub to do that before invoking your COBOL program.

Doesn't the BMC documentation provide any help?

Regards.

Glenn
 
Thanks for the responses so far, am leaving for the day, but to answer Marc and 3gm, yes there have been displays put into the cobol pgm but unfortnately its not my module, its not even under our teams control so I can't mess about with it too much, as far as I know its reaching the cobol module. Sorry to be vague but I've never had to know how to do this before and sort of got roped into this issue out of my own interest...Also I agree with the thought that there might be some LE issues but supposedly this had been checked out and the environment is set up but obviously we now have to check again. As for the BMC documentation well erm...I was trying to avoid wading through sleep inducing paper but it seems destined to be my job tomorrow...Have remembered a bit more about how I thought this should be done and shouldn't we have pointers in the linkage which reference the assembler dsect and from there reference the data...could be embarrassingly wrong??? Anyway thanks again for the help so far.
 
Hi Andy,

You say it's not working. How so? Abend code, msgs?

What's the invoking stmt in the BAL pgm? How's the Linkage Sect coded in the COBOL pgm. What's the USING phrase in the PROCEDURE DIVISION stmt?

With this kind of info we may see something that can help, or at least get the ball rolling.

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 
If your Assembler program is *NOT* "LE-conforming" that I don't know what to do or ssuggest. Assuming that it IS LE-conforming, then the place to start for information on passing information between assembler and COBOL is in the LE "ILC" manual. specifically, look at:



which is

"Passing Arguments between HLL and Assembler Routines"

Bill Klein
 
Thanks Guys, this is now working, the assembler program was LE conforming, and the cobol program was changed as per the manual in WMK's message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top