Questions tagged [metalc]

Denotes questions regarding the IBM® z/OS® XL C compiler subset "**Metal C**", which is designed to be used in system-level programming contexts (as exits and/or mixed with assembler code).

Denotes questions regarding the IBM® z/OS® XL C compiler subset "Metal C", which is designed to be used in system-level programming contexts (as exits and/or mixed with assembler code). The compiler does not use the IBM z/OS standard Language Environment (LE), which is for the most part incompatible with code that executes in these system contexts. Rather, it has its own Standard C run-time library subset, either linked in or executed via system calls.

More information is available here.

9 questions
4
votes
4 answers

using WTO to print from with in Metal C

I’m trying to use the WTO instruction from with in Metal C to print out "Hello World" to my job log. This is based on the example in section 1.2.3.5 of the z/OS V1R10.0 Metal C Programming Guide and Reference It appears when I use WTO I am having…
Jared
  • 39,513
  • 29
  • 110
  • 145
3
votes
4 answers

problems with memset in Metal C

I’m trying to initialize the Metal C environment with the following code, but get the following errors on the memset line. ERROR CCN3275 IMIJWS0.METAL.SAMPLIB(MEM):6 Unexpected text ')' encountered. ERROR CCN3045 IMIJWS0.METAL.SAMPLIB(MEM):6 …
Jared
  • 39,513
  • 29
  • 110
  • 145
2
votes
1 answer

Parameter Passing - Non-standard Linkage

I am a long time assembler programmer, moving into the world of Metal C. I am very much a C novice, so my terminology may reflect the stuff that I know vs. the stuff that I am learning. It will certainly color how I understand things. I am trying…
1
vote
1 answer

Is there a way to get the IBM XL C/C++ Compiler, Metal Option to make an __asm DS declaration at the global scope _NOT_ be an EXTERNAL?

I am creating several similar (but not the same) invocations of the list form of the WTO macro in the global scope of my program: __asm( "xxxUtilsStaticWtp WTO TEXT=*,ROUTCDE=(11),LINKAGE=,MF=L \n" // Static list…
1
vote
1 answer

IBM z/OS Metal C - Can I create a #define macro that includes #pragma statements?

-- Update 20200114: New version of #define Entry macro and new results Another newbie sort of question here. I'm trying to create a #define macro that I can use to generate the entry to a routine along with it's #pragma prolog() and #pragma…
1
vote
1 answer

Trying to make "bilingual macros" between z/OS HLASM and XL C/C++ metal C compiler

I am trying to figure out how to include both HLASM and Metal C definitions for the same DSECT/struct in a single dataset/file. Before trying this, I tried what I described in How do I go about making this work with a #include? It works fine when…
1
vote
1 answer

How do I go about making this work with a #include? It works fine when dropped straight into the code

I have a block of code that I want to #include in my z/OS Metal C program, it works fine when it's just part of the program, but when I put it into a .h file and #include it, the code won't compile. I have successfully gotten this code to work…
0
votes
1 answer

z/OS Metal C assemble failing only when I use my own prolog/epilogs

I have a Metal C program where I am trying to add some static data via an __asm(“…” : DS(staticdata)) statement, but I am having some issues with the generated assembler code. When I use my own prolog and epilog code, I get: 0007E6 …
0
votes
1 answer

How to parametrize single string containing # in C preprocessor?

I want to create parameterized preprocessor macro for IBM Metal C Prolog. The initial unparametrized form is #pragma prolog(Foo, " #MCPROLG MAIN=(YES,16,132)") The real prolog is more complex, but for the sake of the question the important part is…
voyta
  • 60
  • 3
  • 8