Are you passing the parm as if it was coming from a main (i.e., EXEC PGM=) 
program?  If so you have to code the MetalC program as if it were a main 
routine and include a "main" procedure to be executed on entry.

To use a non-main MetalC routine you have to set up the MetalC stack and 
environment first, which may be easily done with a MetalC "main stub program" 
that just invokes your assembler program with an inline __asm CALL or BAS.  
"Normal" MetalC subroutines have an expectation that their stack is already set 
up and that they were called by a MetalC program that used MetalC parameter 
passing conventions and entry/exit logic.

Or you could use the NOPROLOG option (I may not be remembering that option name 
correctly, but there is something in MetalC that allows you to do that) for the 
MetalC subroutine and code the subroutine entry/exit logic yourself using a 
macro or inline __asm.  BTDT, works a charm.

Does that help?

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of John Parke
Sent: Tuesday, August 06, 2013 1:58 PM
To: [email protected]
Subject: Metal C - Parms from Assembler Program

Hi:

I am having a problem passing a parm from an Assembler program to a Metal-C
created Assembler routine. The main Assembler routine is loading R1 with the
address of the parameter list and then branching to the Metal-C routine. The
Metal-C routine abends with an 0C4. When I look to where R1 is pointing in the
dump, it appears to be where a program would pick up a parm if executed in
batch; i.e, parm=’someparm.’ But the C program is not a “main” program.
Can anybody point me in the right direction? I have read the manual repeatedly
and can’t see where I am going wrong.
I appreciate any help.
John

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to