Call HLASM program from COBOL MVS program 
Author Message
 Call HLASM program from COBOL MVS program

I decided to write a COBOL MVS program which would pass several parameters
to an high level assembler program. Would anyone have some idea on that?

The programs are expected to run on OS/390 platform.

Thanks.



Sun, 17 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
Now, mind you, I am no Cobol expert.

The Cobol statement would be something like --

  CALL 'xxx' USING arg1, ...

and it is equivalent to this Assembler --

         CALL xxx,(arg1,...),VL


Quote:
>I decided to write a COBOL MVS program which would pass several parameters
>to an high level assembler program. Would anyone have some idea on that?

>The programs are expected to run on OS/390 platform.

>Thanks.

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Tue, 19 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:

>I decided to write a COBOL MVS program which would pass several parameters
>to an high level assembler program. Would anyone have some idea on that?

>The programs are expected to run on OS/390 platform.

>Thanks.

There really shouldn't be any problems or issues.  The one thing to think
about is the fact that the opposite (HLASM calling COBOL) *does* have some
issues about when the COBOL environment is set up.  So be a little careful
about "who's on top" of your application)


Tue, 19 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
A note about the parameters on the assembler side.  If register 1 = 0, no
parameters were passed.  If all parameters were passed by reference, register
1 will point to a parameter list.  After doing the using, register save, and
new save area, do a  LM 4,7,0(1) and registers 4-7 will point to the
parameters passed them.

Quote:

> I decided to write a COBOL MVS program which would pass several parameters
> to an high level assembler program. Would anyone have some idea on that?

> The programs are expected to run on OS/390 platform.

--
Warren Porter
---
Rainy Days OR Mondays Always Get Me Down.


Wed, 20 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:

>I decided to write a COBOL MVS program which would pass several parameters
>to an high level assembler program. Would anyone have some idea on that?

It is pretty simple. If the asm program is called from Cobol like this...

    CALL asmcode USING arg1 arg2 etc

Then the asm program will receive control (via standard linkage) with R1
pointing to a list of addresses. The first one is the address of arg1, the
second is the address of arg2 etc.

Quote:
>The programs are expected to run on OS/390 platform.

In that case you can probably save yourself a little bit of programming
effort by having your assembler code run under the control of LE. Go look at
the LE book on interlanguage calls. The CEEENTRY macro can be used to
perform entry linkage and obtain working storage (if required) and the
CEEEXIT macro can be used to return control to your calling program.

Enjoy!



Thu, 21 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
Hi

We do this all the time at Casegen - contact me if you need help.

Simon Cordingley
Casegen Systems Ltd
www.casegen.co.uk

Quote:

>I decided to write a COBOL MVS program which would pass several parameters
>to an high level assembler program. Would anyone have some idea on that?

>The programs are expected to run on OS/390 platform.

>Thanks.



Thu, 21 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
Aside from all the good answers given already, I have a couple of questions
for you to ponder.

1) Does the sub-program already exist ? If so then the only concern you should
have is providing the parameters it requires.

2) If you intend to write the assembly and need help on basic parameter list
stuff, do you know enough assembler to complete the task ?

3) Is assembly language the best language for the sub-program? Is there a
requirement that cannot be satisfied with COBOL ?

Quote:

> I decided to write a COBOL MVS program which would pass several parameters
> to an high level assembler program. Would anyone have some idea on that?

> The programs are expected to run on OS/390 platform.

> Thanks.



Fri, 22 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:

>Aside from all the good answers given already, I have a couple of questions
>for you to ponder.

>1) Does the sub-program already exist ? If so then the only concern you
should
>have is providing the parameters it requires.

Actually, the subprogram exist ... but need a little customization.

Quote:
>2) If you intend to write the assembly and need help on basic parameter
list
>stuff, do you know enough assembler to complete the task ?

>3) Is assembly language the best language for the sub-program? Is there a
>requirement that cannot be satisfied with COBOL ?

The subprogram need to output message from MVS console. I wonder if COBOL
program can do that.

Quote:


>> I decided to write a COBOL MVS program which would pass several
parameters
>> to an high level assembler program. Would anyone have some idea on that?

>> The programs are expected to run on OS/390 platform.

>> Thanks.



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
There is an Excellent Book (It Might be hard to find tho) wich explains this
and many more issues regarding Beside Calls from Any Programing language
using MVS Standard Linkage.
It is (If I recall properly... If not I am sure many other people reading
can correct me)
MVS Programing for Systems & Application Programmers
The Author is Carmine Cannatelo
It could teach anybody good Assembler Techniques. Very Good Value If you
Find it
Cheers, German


Quote:


>>Aside from all the good answers given already, I have a couple of
questions
>>for you to ponder.

>>1) Does the sub-program already exist ? If so then the only concern you
>should
>>have is providing the parameters it requires.

>Actually, the subprogram exist ... but need a little customization.

>>2) If you intend to write the assembly and need help on basic parameter
>list
>>stuff, do you know enough assembler to complete the task ?

>>3) Is assembly language the best language for the sub-program? Is there a
>>requirement that cannot be satisfied with COBOL ?

>The subprogram need to output message from MVS console. I wonder if COBOL
>program can do that.


>>> I decided to write a COBOL MVS program which would pass several
>parameters
>>> to an high level assembler program. Would anyone have some idea on that?

>>> The programs are expected to run on OS/390 platform.

>>> Thanks.



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:



[snipped first part, but it is excellent - after all, he had a good teacher
  at a good school  :-)]

Quote:
>>3) Is assembly language the best language for the sub-program? Is there a
>>requirement that cannot be satisfied with COBOL ?

>The subprogram need to output message from MVS console. I wonder if COBOL
>program can do that.

DISPLAY whatever UPON CONSOLE is how to do it in COBOL. If you need
a response from the operator, ACCEPT whatever FROM CONSOLE.

ObASM370:  If you need to call a WTO program, it probably has two parameters,
the length of the text and the text itself.

Later,
Ray

--
M. Ray Mullins (http://www.lerctr.org/~mrm/) from Roseville, California
California Transit Publications - your one stop shop for transit marketing,
publications, planning and web services at http://www.catransit.com/     TIPs:
http://socaltip.lerctr.org http://norcaltip.lerctr.org http://cencaltip.lerctr.org



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:


>>3) Is assembly language the best language for the sub-program? Is there a
>>requirement that cannot be satisfied with COBOL ?

>The subprogram need to output message from MVS console. I wonder if COBOL
>program can do that.

  DISPLAY xxxx UPON CONSOLE
      or
  ACCEPT xxxx FROM CONSOLE

work just fine with any MVS COBOL (however, many shops don't like this - but
it certainly should be allowed whenever a WTOR is allowed in Assembler)



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program

Quote:

>   DISPLAY xxxx UPON CONSOLE
>       or
>   ACCEPT xxxx FROM CONSOLE

> work just fine with any MVS COBOL (however, many shops don't like this - but
> it certainly should be allowed whenever a WTOR is allowed in Assembler)

Many shops disable it entirely!

I have worked where UPON CONSOLE wasn't necessary - and their printed
consoles would sometimes have somebody's COBOL loop displaying until the
operators killed the job!!



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program


Quote:
>The subprogram need to output message from MVS console. I wonder if COBOL
>program can do that.

I know 50 other people are going to answer this, but:

DISPLAY "OUTPUT MESSAGE" UPON CONSOLE.



Sat, 23 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
I don't know if I understand your question correctly.  If you  mean that your
Cobol program is going to call an Assembler program then the answer is pretty
straight forward.

The MVS convention is for the calling program, in this case COBOL to pass the
address in register 1 of a list of addresses of the passed parameters.  COBOL
will do this for you automatically.  The Assembler program  gets the address
of the passed parameters by again using register 1.  Just remember that R1
points to a  list of addresses of the passed parameters and not the actual
parameters themselves. Each address is 4 bytes long, so that the first address
is pointed to by R1, the 2nd address is at the address in R1 + 4, etc.

The last parameter address will have it's high order bit set to x'80' ,
however this isn't a concern if you're always passing a fixed number of
arguments.

I hope I understood your question and provided some help.

John

Quote:

> I decided to write a COBOL MVS program which would pass several parameters
> to an high level assembler program. Would anyone have some idea on that?

> The programs are expected to run on OS/390 platform.

> Thanks.



Wed, 27 Jun 2001 03:00:00 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. Call HLASM program from COBOL MVS program

2. Calling a non-COBOL program from a COBOL program on OS/390

3. Call "COBOL" program from REXX MVS

4. Calling a COBOL program from a PL/1 program

5. rexx program calling cobol program

6. Call CSP program from COBOL program

7. Calling a COBOL program from a PL/1 program

8. Trace Cobol/MVS (LE/MVS) dynamic CALL

9. Calling external program from MVS REXX

10. MVS/TSO: access (COBOL) program

11. MVS/TSO: access (COBOL) program

12. Tape load/unload from within a Cobol/MVS program

 

 
Powered by phpBB® Forum Software