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

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?

Clearly English is not your first language, but "some idea on" what?

     Your decision? Fine, go ahead

     Writing a COBOL program? Fine, go ahead

      Writing a COBOL program to pass parameters to an Assembler program? Fine;
go ahead

Are you asking for help? If so, can you give us more information? I mean, it's
possible, so what's the problem?

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

Makes no difference.

Quote:

>Thanks.

Well, you're welcome. But we haven't done anything for you yet.

Cheers,

Steve Comstock
Telephone: 303-393-8716
www.trainersfriend.com

256-B S. Monaco Parkway
Denver, CO 80224
USA



Tue, 19 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

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?

>Clearly English is not your first language, but "some idea on" what?

>     Your decision? Fine, go ahead

>     Writing a COBOL program? Fine, go ahead

>      Writing a COBOL program to pass parameters to an Assembler program?
Fine;
>go ahead

>Are you asking for help? If so, can you give us more information? I mean,
it's
>possible, so what's the problem?

Actually, I'm asking for help. I know that I can use the CALL "program"
USING parm statement to pass parameters from COBOL to another subprogram.
But how can I get the parameter from assembler?

- Show quoted text -

Quote:

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

>Makes no difference.

>>Thanks.

>Well, you're welcome. But we haven't done anything for you yet.

>Cheers,

>Steve Comstock
>Telephone: 303-393-8716
>www.trainersfriend.com

>256-B S. Monaco Parkway
>Denver, CO 80224
>USA



Wed, 20 Jun 2001 03:00:00 GMT  
 Call HLASM program from COBOL MVS program
You are not actually passing the parameters to the subroutine. You are only
passing the address of the addresses of the parameters.  For example:

01  p1  PIC  S9(9) COMP
01  p2  PIC  S9(9) COMP.
CALL 'ASM1' using p1 p2 .

On entering ASM1, Register 1 contains a single address of a parameter block (of
varying length - 4 bytes/parameter). To get addressibility to the parameters:
  L R5,0(R1)
  L R6,4(R1)
etc.

This is functionally equivilent to COBOL's
LINKAGE SECTION
01  p1  PIC  S9(9) COMP
01  p2  PIC  S9(9) COMP.
PROCEDURE DIVISION USING p1 p2.

Regards,
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?

> >Clearly English is not your first language, but "some idea on" what?

> >     Your decision? Fine, go ahead

> >     Writing a COBOL program? Fine, go ahead

> >      Writing a COBOL program to pass parameters to an Assembler program?
> Fine;
> >go ahead

> >Are you asking for help? If so, can you give us more information? I mean,
> it's
> >possible, so what's the problem?

> Actually, I'm asking for help. I know that I can use the CALL "program"
> USING parm statement to pass parameters from COBOL to another subprogram.
> But how can I get the parameter from assembler?

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

> >Makes no difference.

> >>Thanks.

> >Well, you're welcome. But we haven't done anything for you yet.

> >Cheers,

> >Steve Comstock
> >Telephone: 303-393-8716
> >www.trainersfriend.com

> >256-B S. Monaco Parkway
> >Denver, CO 80224
> >USA



Wed, 20 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  
 
 [ 23 post ]  Go to page: [1] [2]

 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