If so how? any sample code?
AJS
I can't remember the author, but the following is an example of calling
IRXEXCOM to update a REXX variable from a C program.
/*********************************************************************
C/370 example of calling IRXEXCOM.
This program can be called as a subroutine/function or as a command.
It sets the variable FOOBAR to 12345
**********************************************************************/
#include <stdio.h>
#include <stdlib.h>
/*********************************************************************
declares for calling TSO/E REXX routines
**********************************************************************/
typedef long IRXRTN_TYP ();
#pragma linkage(IRXRTN_TYP,OS)
/*********************************************************************
useful constants
**********************************************************************/
#define HIBIT 0x80000000
/*********************************************************************
declares for calling IRXEXCOM
**********************************************************************/
struct IRXEXCOM_PARMS {
char * parm1;
long parm2;
long parm3;
struct SHVBLOCK * parm4;
struct ENVBLOCK * parm5;
long * parm6;
};
IRXRTN_TYP * irxexcom;
#define IRXEXCOM "IRXEXCOM"
/*********************************************************************
declares for SHVBLOCK
**********************************************************************/
struct SHVBLOCK {
struct SHVBLOCK * shvnext;
long shvuser;
char shvcode;
char shvret;
long shvbufl;
char * shvnama;
long shvnaml;
char * shvvala;
long shvvall;
};
#define SHVBLEN 32
#define SHVFETCH 'F'
#define SHVSTORE 'S'
#define SHVDROPV 'D'
#define SHVSYSET 's'
#define SHVSYFET 'f'
#define SHVSYDRO 'd'
#define SHVNEXTV 'N'
#define SHVPRIV 'P'
#define SHVCLEAN 0x00
#define SHVNEWV 0x01
#define SHVLVAR 0x02
#define SHVTRUNC 0x04
#define SHVBADN 0x08
#define SHVBADV 0x10
#define SHVBADF 0x80
main()
{
long int retcode;
char * irxexcom_id = IRXEXCOM;
struct IRXEXCOM_PARMS parameter_list;
struct SHVBLOCK localshvblock;
struct SHVBLOCK * localshvblockaddr;
char * variablename = "FOOBAR";
char * variablevalue = "12345";
localshvblockaddr = &localshvblock;
localshvblock.shvnext = NULL;
localshvblock.shvuser = 0;
localshvblock.shvcode = SHVSYSET;
localshvblock.shvret = SHVCLEAN;
localshvblock.shvbufl = 0;
localshvblock.shvnama = &variablename??(0??);
localshvblock.shvnaml = strlen(variablename);
localshvblock.shvvala = &variablevalue??(0??);
localshvblock.shvvall = strlen(variablevalue);
parameter_list.parm1 = &irxexcom_id??(0??);
parameter_list.parm2 = 0;
parameter_list.parm3 = 0;
parameter_list.parm4 = (struct SHVBLOCK *)
((long int) localshvblockaddr | HIBIT);
irxexcom = (IRXRTN_TYP *) fetch(IRXEXCOM);
retcode = irxexcom(parameter_list.parm1,
¶meter_list.parm2,
¶meter_list.parm2,
parameter_list.parm4);
printf("Return code from IRXEXCOM=%d\n",retcode);
printf("SHVRET =0x%x\n",localshvblock.shvret);
AJS
Stuart Grace <Stug...@att.com> wrote in message news:<3D74FA2E...@att.com>...