fetchable assembler program with OS linkage

Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

fetchable assembler program with OS linkage

Postby Pedro » Thu Jul 07, 2016 6:03 am

How to do?

When I try
#pragma linkage(TEST3,OS,fetchable)    

I get:
WARNING CBC3508 PEDRO.MISC.SOURCE(TEST2):7                
Option os fetchable for #pragma linkage is not supported.  

But is there some trick to avoid binding the parts together into a composite load module?
Pedro Vera
User avatar
Posts: 543
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 35 times

Re: fetchable assembler program with OS linkage


Re: fetchable assembler program with OS linkage

Postby steve-myers » Wed Jul 13, 2016 11:22 am

I have been thinking about this for almost a week, and concluded - sorry - this is BS.

First, I could not decide if you are trying to use the pragma to define a program that is callable from JCL or it is calling a program using the JCL interface.

Case 1 -- you don't need the progma -

int mypgm(int argn, char **argc) ...

Look familar? The library pre parses the PARM text as though it was on a command line.

// EXEC PGM=thepgm,PARM='A B C'

argn = 4, argc[ 1 ] = A, and so on. I forget what argc[ 0 ] is set to, but it is set

Case 2. Now I don't do much mainframe C, but

struct osparm
  int len; // I don't know, off hand, how to define a 16 bit int, but that's what you want
  char text[100];

int routine( struct osparm);

Note: again, no pragma. What you need is already in the language.
Global moderator
Posts: 1817
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 176 times

Return to C, C++


  • Related topics
    Last post