Page 1 of 2

Calling user defined BIF in C from RDMLX Lansa Function

Posted: Sun Oct 14, 2018 10:33 pm
by mbulka
Hi Everybody

I have trouble with Calling user defined BIF in C (service program) from RDMLX Lansa Function

I have defined my own User defined BIF.

I have written RDMLX function to execute this BIF.

Unfortunatelly, It seems that the parameters are not passed to the C. When I try to get number of passed arguments, I received zero.

I have received number of arguments from the definition (its 7), this works.

But, the arguments passed by USE Builtin not.

Please, can you tell me, what I am doing wrong ?

Thank you in advance.
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Sun Oct 14, 2018 10:41 pm
by mbulka
Is there any special need for ACTGRP ?

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Thu Oct 18, 2018 2:27 am
by mbulka
I think not.

I have prepared User BIF function, which is executed from generated C (respectively service program in C with the same name).

Can you please provide me cook book example of necessary definition in my C BIF program executed ?

I have implemented C Skeleton, but don’t know exactly, how to define input parameters in C and how to get them from the memory buffer (pointer)
I have used U_BIF_ macros to get it, but I think, I don’t have correct input parameters defined in my BIF in C as I am not C programmer well experienced and I am not sure about the required structure including vector list
I have arguments
character nickName
list1
list2
and returns :
return code
return message

I know, there is 3 DS and parameters, any information C example of necessary items to be defined in my C BIF would be kind of really help in the progress.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Thu Oct 18, 2018 8:12 am
by mbulka
Still no success.
There should be pointer set to memory to get the values by U_BIF_ macros ?

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Thu Oct 18, 2018 10:20 am
by KevinW
Have you looked at the LANSA Application Design Guide manual? There is at least one C example there in the chapter entitled "Create Your Own Built-In Functions". There would appear to be 3 examples in C there.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Fri Oct 19, 2018 6:33 am
by mbulka
Yes. I do. Still no success.
I know, that there is U_BIF_STANDARD_PARAMETERS in it.
I have used it.
But, I am not able to get vector
Do you have some example, how to read vector in C ?

Any help will be much appreciated.
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Fri Oct 19, 2018 9:46 am
by KevinW
mbulka wrote:
But, I am not able to get vector
Do you have some example, how to read vector in C ?
What LANSA construct are you meaning when you refer to "vector"?

Aren't there examples of getting at fields, RDML lists and RDMLX lists in the documentation previously cited?

You may need to supply your BIF definition and your C for us to see what is happening.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Tue Oct 23, 2018 4:26 am
by mbulka
When you debug C program generated for RDMLX Lansa function, there is for Working List comment in Lansa generated C code for RDMLX Lansa function in Lansa automatically service program written in C :
/* Prepare builtin argument values vector list */
X_BIF_Arg_156[0] = V_FIELD_NICK;
X_BIF_Arg_156[1] = V_FIELD_TYPE;
X_BIF_Arg_156[2] = V_LIST_LIST_1;
X_BIF_Arg_156[3] = V_LIST_LIST_2;
X_BIF_Arg_156[4] = V_FIELD_Q;
X_BIF_Arg_156[5] = V_FIELD_W;
X_BIF_Arg_156[6] = V_LIST_VAL_LIST;

/* Prepare builtin return values vector list */

X_BIF_Ret_156[0] = V_FIELD_Y_RETC;
X_BIF_Ret_156[1] = V_FIELD_Y_TEXTL;


Execute_User_BIF( pX_Ids, pX_Pro, pX_Fun, &(X_BIF_156), NO,pX_Fld, pX_List,
X_BIF_Arg_156, 2, X_BIF_Ret_156 );

I need to know, what means the comment /* Prepare builtin argument values vector list */ to understand, how to read it in executed BIF.
I understand, that I can get arguments by U_BIF_STANDARD_ARGUMENTS, but how to get the values in C from the vector ?
I cannot find any example.
This has been prepared by this generated service program and it has been send to program. I need to know, how to get this vector values (working list values).
So, it is Vector in C
This vector has been sent into my C program and I need example, how to read this Working List there.
Can you please provide me an example of Vector generated in Lansa generated C ?

Any example of vector read of input parameter will be much appreciated

What I can find is :
U_BIF_DECLARE_LIST_POINTER (pListArg1)

X_LIST_COUNT lEntrys = 0 ; /* Instead of X_SHORT sEntrys = 0; */
X_LONG lAverage = 0;

/* ------------------------------------- */
/* Set list pointer and get entry count */
/* ------------------------------------- */

U_BIF_SET_ARG_LIST_POINTER (pListArg1, 0)
U_BIF_GET_LIST_CURRENT_ENTRYS (pListArg1, lEntrys)
...
...

for (lCurrentEntry = 1; lCurrentEntry <= lEntrys; lCurrentEntry ++)
{
U_BIF_GET_ENTRY_FROM_LIST (pListArg1, lCurrentEntry, chFound)
U_BIF_GET_LIST_COLUMN_AS_LONG (pListArg1, 0, lValue)
dTotal = dTotal + lValue;
}
lAverage = dTotal / lEntrys;
}

But I have received ZERO or minus value for the U_BIF macro get_list_current_entrys

Thank you in advance.
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Tue Oct 23, 2018 9:21 am
by KevinW
Here is the example that probably applies to your situation from the manual.
1. The RDML from the example:


define field(#number1) type(*dec) length(7)
define field(#number2) type(*dec) length(7)
define field(#mean) type(*dec) length(7)

request fields(#number1 #number2)
use ud_average with_arg(#number1 #number2) to_get(#mean)


2. Receiving the with_arg values in C:

X_LONG lArg1;
X_LONG lArg2;
X_LONG lAverage;

/* ------------------------------------- */
/* Get argument 1 (C convention is 0) */
/* and argument 2 (C convention is 1) */
/* and compute their average */
/* ------------------------------------- */

U_BIF_GET_ARG_AS_LONG (0,lArg1)
U_BIF_GET_ARG_AS_LONG (1,lArg2)

3. Sending the to_get value back from C:

/* ------------------------------------- */
/* Return the result in return value 1 */
/* (C convention is 0) */
/* ------------------------------------- */

U_BIF_SET_RET_FROM_LONG (0, lAverage);

What you need to do is only use the supplied C macros as shown in the examples from the supplied include file x_bif000.h to reference the field vectors (the number of the argument or return value as counted from 0 as shown above). If you are using lists you will need to decide if they are RDML or RDMLX and follow the relevant other example. The internal workings of LANSA are shielded by the use of these macros.

Have you included the x_bif000.h as shown in the examples? Have you started your C from one of the examples? Have a look at the x_bif000.h for the macros available for getting the field vectors as various C types, and also the macros available for RDML and RDMLX lists.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Wed Oct 24, 2018 4:38 am
by mbulka
Hi Kevin

Thank you for your answer.

Yes,
I have included x_bif000.h in my C program
I use BIF macros, but the result from
is zero.
The reason why is the list of parameters in Lansa function is not in the good order.

I have used The Lansa function enabled for RDMLX
even if the Working List used is the same technique like for RDML in Lansa function.


How I get the fields from the list :

1) definition of List in C , resp. Where you have definition of pListArg1
2) get number of entries in the list
3) get attributes from the list
So, something like this :

U_BIF_DECLARE_LIST_POINTER (pListArg1)
...
...
/* set pointer to the beginning of parameters, 0 is the beginning */
U_BIF_SET_ARG_LIST_POINTER (pListArg1, 0)
X_LIST_COUNT lcTotalEntries = 0 ; /* Instead of X_SHORT sEntrys = 0; */
U_BIF_GET_LIST_CURRENT_ENTRYS (pListArg1, lEntrys)
...
...
/* get number of ARGuments Count */
U_BIF_GET_ARGUMENT_COUNT (lArguments)

/* get ARGuments passed is Zero here, Why ? */
X_SHORT lPassed = 0 ;
U_BIF_ARGUMENT_PASSED (lPassed);


/* retrive first argument */
U_BIF_GET_ARG_AS_VCHAR (0, ..)
/* retrive second argument */
U_BIF_GET_ARG_AS_VCHAR (1, ..)
...
/* retrieve list here - so, I get argument for list - depends on lEntrys and including some logic in it */

if (lEntrys > 0)
{
X_LIST_COUNT lCurrentEntry;
X_CHAR chFound;
....

for (lCurrentEntry = 1; lCurrentEntry <= lEntrys; lCurrentEntry ++)
{
U_BIF_GET_ENTRY_FROM_LIST (pListArg1, lCurrentEntry, chFound)
U_BIF_GET_LIST_COLUMN_AS_LONG (pListArg1, 0, lValue)
dTotal = dTotal + lValue;
}
...
}
etc.

I have seen the example like this https://docs.lansa.com/14/en/lansa065/c ... i_0015.htm

The reason why lEntrys is Zero was the bad sequence in Lansa function parameters.

lPassed - I don't know



Thank you in advance, Kevin
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Wed Oct 24, 2018 9:45 am
by KevinW
Hi Miroslav,

I can't code your user defined BIF in C for you, but I can point out a few things from what you have written:

Miroslav wrote:
I have arguments
character nickName
list1
list2
and returns :
return code
return message
So here you say you have 3 arguments and 2 returns.

Miroslav wrote of the LANSA generated code to call the user defined BIF:
/* Prepare builtin argument values vector list */
X_BIF_Arg_156[0] = V_FIELD_NICK;
X_BIF_Arg_156[1] = V_FIELD_TYPE;
X_BIF_Arg_156[2] = V_LIST_LIST_1;
X_BIF_Arg_156[3] = V_LIST_LIST_2;
X_BIF_Arg_156[4] = V_FIELD_Q;
X_BIF_Arg_156[5] = V_FIELD_W;
X_BIF_Arg_156[6] = V_LIST_VAL_LIST;

/* Prepare builtin return values vector list */

X_BIF_Ret_156[0] = V_FIELD_Y_RETC;
X_BIF_Ret_156[1] = V_FIELD_Y_TEXTL;
So here LANSA is generating 7 arguments and 2 returns. A bit different to your original statement. We'll go on, assuming that the LANSA generated version of arguments and returns is correct.

Miroslav wrote of his user defined BIF C code:
U_BIF_DECLARE_LIST_POINTER (pListArg1)
...
...
/* set pointer to the beginning of parameters, 0 is the beginning */
U_BIF_SET_ARG_LIST_POINTER (pListArg1, 0)
X_LIST_COUNT lcTotalEntries = 0 ; /* Instead of X_SHORT sEntrys = 0; */
U_BIF_GET_LIST_CURRENT_ENTRYS (pListArg1, lEntrys)
...
...
/* get number of ARGuments Count */
U_BIF_GET_ARGUMENT_COUNT (lArguments)

/* get ARGuments passed is Zero here, Why ? */
X_SHORT lPassed = 0 ;
U_BIF_ARGUMENT_PASSED (lPassed);


/* retrive first argument */
U_BIF_GET_ARG_AS_VCHAR (0, ..)
/* retrive second argument */
U_BIF_GET_ARG_AS_VCHAR (1, ..)
...
/* retrieve list here - so, I get argument for list - depends on lEntrys and including some logic in it */

if (lEntrys > 0)
{
X_LIST_COUNT lCurrentEntry;
X_CHAR chFound;
....

for (lCurrentEntry = 1; lCurrentEntry <= lEntrys; lCurrentEntry ++)
{
U_BIF_GET_ENTRY_FROM_LIST (pListArg1, lCurrentEntry, chFound)
U_BIF_GET_LIST_COLUMN_AS_LONG (pListArg1, 0, lValue)
dTotal = dTotal + lValue;
}
Your 3rd, 4th & 6th arguments appear to be lists. I cannot tell if they are RDML or RDMLX lists.

In this code, you are attempting to treat the 1st argument as a list.

To get addressability to the 1st list you use (3rd argument or counted as number 2 in C 0-based counting), you should do something like:
U_BIF_SET_ARG_LIST_POINTER (pListArg1, 2).

Be aware that if the UD BIF is defined as Terminates between calls NO, then it will be called to shut it down when the function that uses it shuts down, probably with no arguments or return values.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Thu Oct 25, 2018 6:33 am
by mbulka
Thank you, Kevin

I would like to get also 1st argument nickName
So, without setting pointer or with
I need to do
U_BIF_GET_ARG_AS_VCHAR (0, nickName)
in case, that nickName is 1st argument, right ?
nickName is character len 10

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Thu Oct 25, 2018 9:20 am
by KevinW
Hi Miroslav,

How do you want to deal with nickName in your C?

U_BIF_GET_ARG_AS_VCHAR(0, vchNickName)

will get the nickname as a null terminated string, so you will have to have previously defined vchNickName as something like:

X_VCHAR vchNickName[10 + 1];

If you need it as a 10 character buffer then you will need to do something extra involving either strlen or searching for the null terminator of the string and copying up to the string end and blanking the rest.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Fri Oct 26, 2018 5:05 am
by mbulka
Hi Kevin

Thank you very much for your information, much appreciated

I would like to kindly ask you, if I would like to get the values from the List1 and prepare for RPG call,

/* definitions */
U_BIF_DECLARE_LIST_POINTER (pListArg1)
...
X_VCHAR vchStringLocal[2000 + 1];
X_VCHAR vchDelimiter[3] = ", ";

/* 3rd argument is List1, so : */
U_BIF_SET_ARG_LIST_POINTER (pListArg1, 2)
U_BIF_GET_LIST_CURRENT_ENTRYS (pListArg1, lEntrys) /* lEntrys = 11 , count of values is 11, OK */
if (lEntrys > 0)
{
X_LIST_COUNT lCurrentEntry; /* Instead of X_SHORT sCurrentEntry; */
X_CHAR chFound;

/* Process all list entries */
for (lCurrentEntry = 0; lCurrentEntry < lEntrys; lCurrentEntry ++) /* get from 1st to 11 */
{
memset(vchTemp257, ' ', 200); /* initialisation of vchTemp257 */
chFound = ' ';
chType = ' ';
ulLen = 0;
sDec = 0;
sByteLen = 0;
U_BIF_GET_ENTRY_FROM_LIST (pListArg1, lCurrentEntry,
chFound)

U_BIF_GET_LIST_COLUMN_ATTRIBS (pListArg1,lCurrentEntry,chType,ulLen,sDec,sByteLen)
if (chType == X_TYPE_ALPHA)
{
U_BIF_GET_LIST_COLUMN_AS_VCHAR (pListArg1, (X_SHORT)lCurrentEntry, vchTemp257)

}

strcat(vchTempWork,vchStringLocal);
strcat(vchTempWork,vchDelimiter);
}
I need to send all these values from my C to RPG, which should be DS DIM(11) - multidimensional Data Structure prepared from the List1 in my C program.
I know, how to get, fill in RPG, there is no problem with that, but how to prepare and send this from my C program.

There should be some C technique, how to do that, but I don't know the similar type in C for multidimensional data structure.

Thank you in advance
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Fri Oct 26, 2018 9:59 am
by KevinW
Hi Miroslav,
To answer your immediate question, declare a C struct as a type that reflects the layout of the RPG multi occurrence data structure. Then declare an array of that data type that reflects the maximum occurrences of the RPG multi occurrence data structure. Fill that array, then use the array as the parameter. You may have to ensure that your structure is packed, I'm not sure.

<not exact C syntax>
typedef struct _DATAS
{
X_CHAR vchName;
X_DEC50 dec50Number;
...
} DATAS

DATAS Datas[99];

strcpy( Datas[0].vchName, vchName );
Datas[0].dec50Number = iNumber;
...
strcpy( Datas[1].vchName, vchName );
Datas[1].dec50Number = iNumber;
...
RPGPgm( vchNickName, Datas ... );




Taking a step back from the immediate, the overall story is:
You want to be able to call an RPG program from an RDMLX function, where the RPG program accepts one or more parameters as multi occurring data structures.
Someone (you?) has decided that the only way to do this is via a user defined BIF coded in C.
You are not a very experienced C programmer.

If you are only calling one RPG program, the lists only contain RDML type fields and have less than 9999 entries and you can change the RPG program then:
Make the BIF an RDML(X) BIF.
Have the RDML(X) BIF call an RDML function.
Have the RDML function call the RPG program, defining lists there that reflect the RPG multi occurrence data structures.
Change the RPG program to accept the RDML list as the multi occurrence data structure and the additional parameters that are passed by the RDML program for the list.
This is (calling RPG from an RDML function with a list) is documented in the Technical Reference Guide, Call command, PASS_LST parameter.
No C involved.

If you are doing something else, continue on and ignore this suggestion.

Hope this helps

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Fri Oct 26, 2018 6:08 pm
by mbulka
Thank you Kevin to point me in. I will do.

I prepare processing for RDMLX Lansa BIF.
If I am correct from what I see in the guide, I have to use C service program as the RDMLX generates C.

I have already RDML variant with RPG in the place.

Thank you in advance
Kind Regards
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Tue Oct 30, 2018 9:49 am
by mbulka
Hi Kevin

I have this part to be done. I can post, if interested for somebody.

I would like to kindly ask you for one more thing.

Return of argument, return values.

I expect to return both, so no matter, if user BIF has defined parameters as ARG or RET. I need to return both.

In practice,
I did not find, how to retrieve List1 back to LANSA function and I would like to be sure.

I understand, that there is instruction U_BIF_SET_GOOD_RETURN;
or resp. U_BIF_SET_BAD_RETURN; in case of error. That's clear.

More, what I understand, I need to :

For the single value
U_BIF_SET_RET_FROM_VCHAR (0, vchNickName);
etc.


I don't know for the List1

I found, there is U BIF macro U_BIF_SET_RET_LIST_POINTER with description
Initializes a list pointer that has been previously declared by U_BIF_DECLARE_LIST_POINTER(_L).
_A is the return value number of the Built-In Function return value that contains the working list. If _A is invalid, or return value _A is not required, a fatal error will result, terminating the Built-In Function.

But not clear, how to apply
I did not find any example for returning the list back from C program to Lansa function.

Is there any technique, how to do this in my C program ?
Thank you in advance
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Tue Oct 30, 2018 10:48 am
by KevinW
Hi Miroslav,

So List1 is an argument, and you want to change it in some way (add entries, update entries, delete entries) and have those changes returned to the calling RDMLX.

I have this feeling that you change it in your C code by using the appropriate macros and do nothing else. I cannot find the documentation that this is so. Try it and see.

If that does not work, you may need a separate return list where you use the macro that you found, U_BIF_SET_RET_LIST_POINTER, and then build the return list from the argument list in your C.

Hope this helps.

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Wed Oct 31, 2018 12:17 am
by mbulka
Hi Kevin

I would like to summarized with you to be sure regarding lists in retrieve phase back from my C to Lansa function.

List1 is the one I send to and return without any update, delete, insert.
List2 - another case, there will be update

If I understand correctly,
it does mean, that :

1) All (ARG, RET parameters) are arguments, resp. from the point of return it is RET.
2) List1 returned will be automatically retrieved to Lansa function.
List2 should be updated etc. using U_BIF_SET_RET_LIST_POINTER
List2 contains X_VCHAR parameter, so it does mean, I need to go through the List2 in my C and use U_BIF_SET_LIST_COLUMN_FROM_VCHAR
, next one is integer, I will need to use U_BIF_SET_LIST_COLUMN_FROM_LONG ? I do not see on
https://docs.lansa.com/14/en/lansa065/c ... i_0025.htm
for integer.

Im trying to find by myself, but I would like to ensure with you to be sure.

One more question, please.
I would like to get attributes of my Lansa fields from the Lansa function.
This is in DC@F40V1 .
If I would like to get for partition, process, function
I need to retrieve it from U_BIF_STANDARD_PARAMETERS ? (3 data structures, which are send to executed program from Lansa function)

In my RPG is this in fields DC@P#I , DC@CPI , DC@CFI
I need also for my C (for RDMLX), this way ? >

static struct X_IDS * pX_Ids = pX_NULL;
static struct X_PRO X_Pro;
static struct X_FUN X_Fun;
static struct X_PRO * pX_Pro = pX_NULL;
static struct X_FUN * pX_Fun = pX_NULL;

int main( int argc, char *argv[] )
{
struct X_IDS_RPG * pX_Ids_RPG;
struct X_EDS_RPG * pX_Eds_RPG;
struct X_PRIDS_RPG * pX_PrIds_RPG;
struct X_IDS_RPG * pX_Ids_RPG_SAV;
struct X_EDS_RPG * pX_Eds_RPG_SAV;
struct X_PRIDS_RPG * pX_PrIds_RPG_SAV;
struct X_PARM X_Parm[40];
X_SHORT scX_Parm = 0;
int ReturnCountsArgvPos[40];
X_VCHAR vchFunction[X_FUNCTION_NAME_LEN+1]
X_INT iReturnCode;

pX_Ids_RPG = (struct X_IDS_RPG *)argv[1];
pX_Eds_RPG = (struct X_EDS_RPG *)argv[2];
pX_PrIds_RPG = (struct X_PRIDS_RPG *)argv[3];

etc.

pX_Fun->vchName for the name of the function
pX_Pro->vchName for the name of the process
pX_Pro->vchDesc for the process description

but, how for the name for Partition and Language ?
Please, How to get these values, please ?


Thank you in advance
Have a nice day
Kind Regards,
Miroslav

Re: Calling user defined BIF in C from RDMLX Lansa Function

Posted: Wed Oct 31, 2018 10:21 am
by KevinW
Miroslav wrote:
1) All (ARG, RET parameters) are arguments, resp. from the point of return it is RET.
2) List1 returned will be automatically retrieved to Lansa function.
List2 should be updated etc. using U_BIF_SET_RET_LIST_POINTER
List2 contains X_VCHAR parameter, so it does mean, I need to go through the List2 in my C and use U_BIF_SET_LIST_COLUMN_FROM_VCHAR
, next one is integer, I will need to use U_BIF_SET_LIST_COLUMN_FROM_LONG ? I do not see on
https://docs.lansa.com/14/en/lansa065/c ... i_0025.htm
for integer.
1) I am not sure what you mean by this. Non-list arguments are unchanged on return to the RDMLX code from the BIF. As stated previously, I think list type arguments can be changed via the macros.
2) If List1 is an argument to the BIF and is not changed by the BIF then on return to the RDMLX code it should be unchanged.
3) (I think you meant for a 3) List2 is an argument and you want to change it in the BIF. As it is not a return value, and you would have already established addressability via U_BIF_SET_ARG_LIST_POINTER, you don't need to do it via U_BIF_SET_RET_LIST_POINTER. You will need to use the various U_BIF_SET_LIST_COLUMN_FROM_XXXX macros to set the entry column values, in particular U_BIF_SET_FROM_LONG for integer.

Miroslav wrote:
One more question, please.
I would like to get attributes of my Lansa fields from the Lansa function.
This is in DC@F40V1 .
If I would like to get for partition, process, function
I need to retrieve it from U_BIF_STANDARD_PARAMETERS ? (3 data structures, which are send to executed program from Lansa function)

In my RPG is this in fields DC@P#I , DC@CPI , DC@CFI

/snip of C stuff

pX_Fun->vchName for the name of the function
pX_Pro->vchName for the name of the process
pX_Pro->vchDesc for the process description

but, how for the name for Partition and Language ?
Please, How to get these values, please ?
There is more than one question here :).
No need to retrieve attributes of column fields from DC@F40. Use U_BIF_GET_LIST_COLUMN_ATTRIBS and U_BIF_GET_LIST_COLUMN_NAME. Apart from lists, why would you need to know the characteristics of the arguments or return variables? You are writing the C BIF.

Have you seen U_BIF_LANSA_PROCESS and U_BIF_LANSA_FUNCTION (and _DESC versions of these?)

As far as Partition and Language, I thought that were both available in pX_Ids (->vchPartition and ->vchLangCode, both null terminated strings).

You may want to raise an enhancement for LANSA to provide these values as macros - U_BIF_LANSA_PARTITION & U_BIF_LANSA_CURRENT_LANG perhaps.

HTH