how to call a PL/1 *FUNCTION* from rexx?



IBM's Command List programming language & Restructured Extended Executor

how to call a PL/1 *FUNCTION* from rexx?

Postby lostcontinent » Thu Nov 10, 2011 3:34 pm

hi to all,
I know how to call a PL/1 prom a loadlib, eg.
address tso
"call 'MY.LOADLIB(TEST)' '/"parm"'"

and read the result from a file that was written by the PL/1-module.

But how do I invoke a call to a PL/1-funktion?
PL1FCT: PROC(PRM) RETURNS(CHAR(10));
  DCL PRM CHAR(255);
  DCL RES CHAR(10) INIT('');
  /* do something */
  RETURN(RES);
END PL1FCT;


How does the call to PL1FCT from REXX has to look like?
I want to store the result in a rexx variable.

lc
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to call a PL/1 *FUNCTION* from rexx?

Postby lostcontinent » Thu Nov 10, 2011 5:51 pm

could you please give me a hint: which FM? (earlier post deleted)

I found nothing in TSO Command reference, TSO/REXX User Guide and TSO/REXX Reference
(or did at least not know the keywords to search for, I was looking for "pl/1")
thanks,
lc
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to call a PL/1 *FUNCTION* from rexx?

Postby MrSpock » Thu Nov 10, 2011 7:38 pm

From what I know, your best bet will be to look at the ADDRESS LINKPGM command, since it's supposed to be able to handle a call to any program that uses standard linkage functions. However, I read some topics in my search that mention that PL/1 doesn't follow those standards.

I don't know where your exec will ultimately run, but have you considered maybe using the ISPF Variable Pool as a way to exchange data between your programs (i.e. using the ISPF VPUT and VGET Services), or using temporary VIO datasets?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post