<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV id=yiv465325399>
<DIV id=yiv20160397>
<DIV>OK, PH List:</DIV>
<DIV> </DIV>
<DIV>This is what I've been able to ascertain, i.e. if anbody is interested and by the volume of traffic....</DIV>
<DIV> </DIV>
<DIV>I've tried two approaches - buildexternal with a 'share' and without a share'. </DIV>
<DIV> </DIV>
<DIV>With both it seems that zero, zilch, rien, nada, bupkas is happening in the C code:</DIV>
<DIV> </DIV>
<DIV>I've attached the C and the PH code sources and my buildexternals, etc.</DIV>
<DIV> </DIV>
<DIV>This cannot be that complicated but I haven't done this sort of stuff in 10 years...</DIV>
<DIV> </DIV>
<DIV>TIA and hoping for a reply</DIV>
<DIV> </DIV>
<DIV>screen cts_call_c activities entry, find<BR><BR><BR>temp t_prod_ok char*02<BR>temp t_temp_no int*04 size 2<BR>temp t_err_msg char*12<BR><BR>temp br_id char*08 <BR>temp ORD_ID int*08<BR>temp ORD_SEQ int*08<BR>temp SEND_TO_HOST char*08<BR>temp SEND_TO_PORT int*08<BR>temp TMP_PRINT_C_ERR char*08<BR><BR>file dummy primary<BR>access sequential<BR><BR>skip to 3<BR>title "Test 'C' <SPAN class=yshortcuts id=lw_1252536049_0 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">Subroutine</SPAN> Call" at ,2 centered<BR>skip to 5<BR>align (1,3,10)<BR>field t_temp_no label "Temp #"<BR>skip 1<BR>field t_err_msg label "Errmsg"
display<BR>cluster<BR>;==============================<BR><BR>procedure edit t_temp_no<BR>begin<BR>let t_prod_ok = "Y"<BR>let t_err_msg = "Passed"<BR>display t_err_msg<BR>info = "t_temp_no before " + ascii(t_temp_no,4) now response<BR>info = "t_prod_ok before " + t_prod_ok now response<BR>info = "t_err_msg before " + t_err_msg now response<BR>do external "CEDIT" (t_prod_ok, t_err_msg, value(t_temp_no))<BR>info = "t_temp_no after " + ascii(t_temp_no,4) now response<BR>info = "t_prod_ok after " + t_prod_ok now response<BR>info = "t_err_msg after " + t_err_msg now response<BR><BR>if t_prod_ok <> "Y" <BR>then display t_err_msg<BR>end<BR><BR>;procedure internal dsply_symbols<BR>;begin<BR>;run command "show symbol POS_BRANCH"<BR>;run command "show symbol POS_ORDER"<BR>;run command "show symbol POS_ORD_SEQ"<BR>;run command "show symbol POS_HOST"<BR>;run command "show symbol POS_PORT"<BR>;run command "show symbol
POS_PRINT_C_ERR"<BR>;<BR>;run command "WAIT 00:00:15"<BR>;end<BR><BR><BR>;PROCEDURE initialize <BR>;BEGIN<BR>;let br_id = "99"<BR>;let ORD_ID = 12345679<BR>;let ORD_SEQ = 1<BR>;let SEND_TO_HOST = "Y"<BR>;let SEND_TO_PORT = 1<BR>;let TMP_PRINT_C_ERR = "Z"<BR>;;get dummy using 1 sequential opt<BR>;;run command "WAIT 00:00:15"<BR>;IF SETSYSTEMVAL('POS_BRANCH', BR_ID,SYMBOL)<BR>;THEN NULL<BR>;IF SETSYSTEMVAL('POS_ORDER', ASCII(ORD_ID),SYMBOL)<BR>;THEN NULL<BR>;IF SETSYSTEMVAL('POS_ORD_SEQ', ASCII(ORD_SEQ ), SYMBOL )<BR>;THEN NULL<BR>;IF SETSYSTEMVAL("POS_HOST",TRUNCATE(SEND_TO_HOST),SYMBOL)<BR>;THEN NULL<BR>;IF SETSYSTEMVAL("POS_PORT",TRUNCATE(ASCII(SEND_TO_PORT)),SYMBOL)<BR>;THEN NULL<BR>;IF SETSYSTEMVAL("POS_PRINT_C_ERR", TMP_PRINT_C_ERR, SYMBOL )<BR>;THEN NULL<BR>;<BR>;do internal
dsply_symbols<BR>;return<BR>;end<BR></DIV>
<DIV>C Program:</DIV>
<DIV> </DIV>
<DIV> /*====================================================================<BR>*<BR>* COPYRIGHT (C) 1989, 1998 BY<BR>* <SPAN class=yshortcuts id=lw_1252536121_0 style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">DIGITAL EQUIPMENT CORPORATION</SPAN>, MAYNARD, MASS.*<BR>* This software is furnished under a license and may be used and copied<BR>* only in accordance with the terms of such license and with the<BR>* inclusion of the above copyright notice. This software or any other<BR>* copies thereof may not be provided or otherwise made available to any<BR>* other person. No title to and ownership of the software is hereby<BR>* transferred.<BR>*<BR>* The information in this software is
subject to change without notice<BR>* and should not be construed as a commitment by DIGITAL EQUIPMENT<BR>* CORPORATION.<BR>*<BR>* DIGITAL assumes no responsibility for the use or reliability of its<BR>* software on equipment which is not supplied by DIGITAL.<BR>*<BR>*<BR>* FACILITY:<BR>* INSTALL <BR>* <BR>*<BR>* ABSTRACT:<BR>* This is an example of a TCP/IP client using the IPC <BR>* socket interface.<BR>* <BR>*<BR>* ENVIRONMENT:<BR>* TCPIP V5.0 or higher<BR>*<BR>* This example is portable to Ultrix. The include<BR>* files are conditionally defined for both systems<BR>*<BR>* BUILD INSTRUCTIONS:<BR>*<BR>* To link in VAXC/VMS you must have the following<BR>*
entries in your .opt file:<BR>* sys$library:TCPIp$ipc.olb/lib<BR>* sys$share:vaxcrtl.exe/share<BR>*<BR>* For DEC C or DEC C++, compile /PREFIX=ALL and link via<BR>* $ link TCPIP$TCP_CLIENT_IPC<BR>*<BR>* To build this example program use commands of the form,<BR>*<BR>* using the DEC "C" compiler:<BR>*<BR>* $ cc/prefix=all TCPIP$TCP_CLIENT_IPC.C<BR>* $ link TCPIP$TCP_CLIENT_IPC<BR>* <BR>* using the DEC "C++" compiler:<BR>* <BR>* $ cxx/prefix=all/define=VMS TCPIP$TCP_CLIENT_IPC.C<BR>* $ link TCPIP$TCP_CLIENT_IPC<BR>* <BR>*
using the VAX "C" compiler:<BR>* <BR>* $ cc /vaxc TCPIP$TCP_CLIENT_IPC.C<BR>* $ link TCPIP$TCP_CLIENT_IPC, -<BR>* SYS$LIBRARY:TCPIP$IPC/LIB, -<BR>* SYS$INPUT/OPTIONS<BR>* SYS$SHARE:TCPIP$IPC_SHR/SHARE<BR>* SYS$SHARE:VAXCRTL.EXE/SHARE<BR>* <BR>* AUTHORS:<BR>* TCPIP Developer <BR>* Copied from TCP$IP_CLIENT_IPC.C and modified by RBW<BR>* CREATION DATE: April 15, 2000 <BR>*<BR>* MODIFICATION HISTORY:<BR>*<BR>* 4/26/02 - BICKELJ Changed from using one send_msg and <BR>* one
rcv_msg parameter to 6 send_msg and 2 rcv_msg. <BR>* Along with this, added the associatated trim/concat/splits.<BR>* NOTE - Also changed the receive call to the socket to use a hard constant<BR>* rather than strlen(rcv_msg) as was in original. Originally, the rcv_msg<BR>* var was passed as a parameter by Powerhouse. Powerhouse initialized the value<BR>* of the string automatically (to spaces). Now that the string is declared locally,<BR>* there is no value initialization - therefore strlen will not work (returns 0). This <BR>* does not apply to send_msg, since this is given a value before strlen() is called on it.<BR>*
CCN:2002-778<BR>*/<BR><BR><BR>/*<BR>*<BR>* INCLUDE FILES<BR>*<BR>*/<BR><BR>#if defined(VMS) || defined(__VMS)<BR>#include <stdlib.h><BR>#include <unixio.h><BR>#include <errno.h><BR>#include <types.h><BR>#include <stdio.h><BR>#include <socket.h><BR>#include <in.h><BR>#include <netdb.h> /* change hostent to comply with BSD 4.3*/<BR>#include <inet.h><BR>#include <descrip><BR>#include <perror><BR>#include <time><BR>#include <lib$routines><BR>#include <tcpip$inetdef.h> /* INET symbol definitions */<BR>#else<BR>#include <errno.h><BR>#include <sys/types.h><BR>#include <stdio.h><BR>#include <sys/socket.h><BR>#include <netinet/in.h><BR>#include
<netdb.h><BR>#include <arpa/inet.h><BR>#include <sys/uio.h><BR>#endif<BR>#include <string.h><BR><BR>/*<BR>*<BR>* <SPAN class=yshortcuts id=lw_1252536121_1>MACRO DEFINITIONS</SPAN><BR>*<BR>*/<BR><BR>#ifndef vms<BR>#define TRUE 1<BR>#define FALSE 0<BR>#endif<BR><BR>/*<BR>* Functional Description<BR>* <SPAN class=yshortcuts id=lw_1252536121_2>Subroutine</SPAN> CEDIT(prod_ok, err_msg, prod_no) <BR>*/<BR><BR>cedit(prod_ok, err_msg, prod_no) <BR><BR>char prod_ok[];<BR> <BR>char *err_msg;<BR><BR>short int prod_no;<BR><BR>/*<BR>This subroutine simulates an error check routine (c) <SPAN class=yshortcuts id=lw_1252536121_3>Cognos Inc</SPAN>.<BR>if the product number is greater than 7777 it returns an error message<BR>*/<BR><BR><BR>{<BR><BR>if (prod_no > 7777)
<BR><BR>{<BR><BR>/* <BR>insert error message:<BR>*/<BR><BR>strncpy(err_msg,"FAILED",13);<BR><BR>prod_ok[0] = 'N';<BR><BR>prod_ok[1] = '\0'; /* Null srting terminator */<BR>}<BR>}<BR>/* end-of-program */<BR></DIV>
<DIV> </DIV>
<DIV>CTS_ROOT:[WORK.PENNYJ]QKDRIVER.PHEXE;2 18 9-SEP-2009 14:54:05.84</DIV>
<DIV> </DIV>
<DIV>with buildexternal cedit cedit</DIV>
<DIV> </DIV>
<DIV>AND </DIV>
<DIV> </DIV>
<DIV>LINK/EXE=CTS_ROOT:[WORK.PENNYJ]QKDRIVER.PHEXE;/MAP=XXX/FULL CTS_ROOT:[WORK.PENNYJ]BLDEXT_SUBLIST.OBJ;,PH_LOCATION:ALPHA_DRIVER_MAINLINE.OBJ,SYS$DISK:[]CEDIT,PH_LOCATION:SUBR_TABLE_PSEC.OPT/OPTPSECT_ATTR=SUBR_TABLE,PIC,USR,OVR,REL,GBL,NOSHR,NOEXE,RD,WRT,NOVEC</DIV>
<DIV> </DIV>
<DIV>xxx.map</DIV>
<DIV> </DIV>
<DIV>Confused in PHX...</DIV>
<DIV> </DIV>
<DIV>TIA Again folks </DIV>
<DIV> </DIV>
<DIV><STRONG>John M Penney</STRONG></DIV>
<DIV><STRONG>1532 Fern Street SW</STRONG></DIV>
<DIV><STRONG>Olympia, WA 98502</STRONG></DIV>
<DIV> </DIV>
<DIV><STRONG>(360)789-8159</STRONG></DIV></DIV></DIV></td></tr></table><br>