<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>&nbsp;</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>&nbsp;</DIV>
<DIV>I've tried two approaches - buildexternal with a 'share' and without a share'. </DIV>
<DIV>&nbsp;</DIV>
<DIV>With both it seems that zero, zilch, rien, nada, bupkas is happening in the C code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>I've attached the C and the PH code sources and my buildexternals, etc.</DIV>
<DIV>&nbsp;</DIV>
<DIV>This cannot be that complicated but I haven't done this sort of stuff in 10 years...</DIV>
<DIV>&nbsp;</DIV>
<DIV>TIA and hoping for a reply</DIV>
<DIV>&nbsp;</DIV>
<DIV>screen cts_call_c activities entry, find<BR><BR><BR>temp t_prod_ok&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char*02<BR>temp t_temp_no&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int*04 size 2<BR>temp t_err_msg&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char*12<BR><BR>temp br_id &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char*08 <BR>temp ORD_ID&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int*08<BR>temp ORD_SEQ&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int*08<BR>temp SEND_TO_HOST&nbsp;&nbsp;&nbsp; char*08<BR>temp SEND_TO_PORT&nbsp;&nbsp;&nbsp; int*08<BR>temp TMP_PRINT_C_ERR&nbsp;&nbsp;&nbsp; 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&nbsp; " + ascii(t_temp_no,4) now response<BR>info = "t_prod_ok after&nbsp; " + t_prod_ok now response<BR>info = "t_err_msg after&nbsp; " + t_err_msg now response<BR><BR>if t_prod_ok &lt;&gt; "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 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = "99"<BR>;let ORD_ID&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = 12345679<BR>;let ORD_SEQ&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = 1<BR>;let SEND_TO_HOST&nbsp;&nbsp;&nbsp; = "Y"<BR>;let SEND_TO_PORT&nbsp;&nbsp;&nbsp; = 1<BR>;let TMP_PRINT_C_ERR&nbsp;&nbsp;&nbsp; = "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>&nbsp;</DIV>
<DIV>&nbsp;/*====================================================================<BR>*<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; COPYRIGHT (C) 1989, 1998 BY<BR>*&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <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&nbsp; copied<BR>* only&nbsp; in&nbsp; accordance&nbsp; with&nbsp; the&nbsp; terms&nbsp; of&nbsp; such&nbsp; license and with the<BR>* inclusion of the above copyright notice.&nbsp; This software or&nbsp; any&nbsp; other<BR>* copies&nbsp; thereof may not be provided or otherwise made available to any<BR>* other person.&nbsp; No title to and ownership of&nbsp; the&nbsp; software&nbsp; is&nbsp; hereby<BR>* transferred.<BR>*<BR>* The information in this software is
 subject to change&nbsp; without&nbsp; notice<BR>* and&nbsp; should&nbsp; not&nbsp; be&nbsp; construed&nbsp; as&nbsp; a commitment by DIGITAL EQUIPMENT<BR>* CORPORATION.<BR>*<BR>* DIGITAL assumes no responsibility for the use or&nbsp; reliability&nbsp; of&nbsp; its<BR>* software on equipment which is not supplied by DIGITAL.<BR>*<BR>*<BR>*&nbsp; FACILITY:<BR>*&nbsp;&nbsp;&nbsp; INSTALL <BR>*&nbsp; &nbsp; &nbsp; <BR>*<BR>*&nbsp; ABSTRACT:<BR>*&nbsp;&nbsp;&nbsp; This is an example of a TCP/IP client using the IPC <BR>*&nbsp;&nbsp;&nbsp; socket interface.<BR>*&nbsp; &nbsp; &nbsp; <BR>*<BR>*&nbsp; ENVIRONMENT:<BR>*&nbsp;&nbsp;&nbsp; TCPIP V5.0 or higher<BR>*<BR>*&nbsp;&nbsp;&nbsp; This example is portable to Ultrix. The include<BR>*&nbsp;&nbsp;&nbsp; files are conditionally defined for both systems<BR>*<BR>*&nbsp; BUILD INSTRUCTIONS:<BR>*<BR>*&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;To link in VAXC/VMS you must have the following<BR>*&nbsp; &nbsp;
 &nbsp;&nbsp;&nbsp;entries in your .opt file:<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sys$library:TCPIp$ipc.olb/lib<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sys$share:vaxcrtl.exe/share<BR>*<BR>*&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;For DEC C or DEC C++, compile /PREFIX=ALL and link via<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ link TCPIP$TCP_CLIENT_IPC<BR>*<BR>*&nbsp; &nbsp; To build this example program use commands of the form,<BR>*<BR>*&nbsp; &nbsp; &nbsp; &nbsp; using the DEC "C" compiler:<BR>*<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ cc/prefix=all TCPIP$TCP_CLIENT_IPC.C<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ link TCPIP$TCP_CLIENT_IPC<BR>*&nbsp; &nbsp; <BR>*&nbsp; &nbsp; &nbsp; &nbsp; using the DEC "C++" compiler:<BR>*&nbsp; &nbsp; <BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ cxx/prefix=all/define=VMS TCPIP$TCP_CLIENT_IPC.C<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ link TCPIP$TCP_CLIENT_IPC<BR>*&nbsp; &nbsp; <BR>*&nbsp; &nbsp; &nbsp;
 &nbsp; using the VAX "C" compiler:<BR>*&nbsp; &nbsp; <BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&nbsp; cc /vaxc TCPIP$TCP_CLIENT_IPC.C<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&nbsp; link TCPIP$TCP_CLIENT_IPC, -<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYS$LIBRARY:TCPIP$IPC/LIB, -<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYS$INPUT/OPTIONS<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYS$SHARE:TCPIP$IPC_SHR/SHARE<BR>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYS$SHARE:VAXCRTL.EXE/SHARE<BR>*&nbsp; &nbsp; <BR>*&nbsp; AUTHORS:<BR>*&nbsp;&nbsp;&nbsp; TCPIP Developer&nbsp;&nbsp;&nbsp; <BR>*&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;Copied from TCP$IP_CLIENT_IPC.C and modified by RBW<BR>*&nbsp; CREATION DATE: April 15, 2000 <BR>*<BR>*&nbsp; MODIFICATION HISTORY:<BR>*<BR>*&nbsp;&nbsp;&nbsp; 4/26/02 - BICKELJ Changed from using one send_msg and <BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; one
 rcv_msg parameter to 6 send_msg and 2 rcv_msg. <BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Along with this, added the associatated trim/concat/splits.<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NOTE - Also changed the receive call to the socket to use a hard constant<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; rather than strlen(rcv_msg) as was in original.&nbsp; Originally, the rcv_msg<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; var was passed as a parameter by Powerhouse.&nbsp; Powerhouse initialized the value<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; of the string automatically (to spaces).&nbsp; Now that the string is declared locally,<BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; there is no value initialization - therefore strlen will not work (returns 0).&nbsp; This <BR>*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; does not apply to send_msg, since this is given a value before strlen() is called on it.<BR>*&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp; CCN:2002-778<BR>*/<BR><BR><BR>/*<BR>*<BR>*&nbsp; INCLUDE FILES<BR>*<BR>*/<BR><BR>#if defined(VMS) || defined(__VMS)<BR>#include&nbsp; &lt;stdlib.h&gt;<BR>#include&nbsp; &lt;unixio.h&gt;<BR>#include&nbsp; &lt;errno.h&gt;<BR>#include&nbsp; &lt;types.h&gt;<BR>#include&nbsp; &lt;stdio.h&gt;<BR>#include&nbsp; &lt;socket.h&gt;<BR>#include&nbsp; &lt;in.h&gt;<BR>#include&nbsp; &lt;netdb.h&gt;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; /* change hostent to comply with BSD 4.3*/<BR>#include&nbsp; &lt;inet.h&gt;<BR>#include&nbsp; &lt;descrip&gt;<BR>#include&nbsp; &lt;perror&gt;<BR>#include&nbsp; &lt;time&gt;<BR>#include&nbsp; &lt;lib$routines&gt;<BR>#include&nbsp; &lt;tcpip$inetdef.h&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;/* INET symbol definitions */<BR>#else<BR>#include &lt;errno.h&gt;<BR>#include &lt;sys/types.h&gt;<BR>#include &lt;stdio.h&gt;<BR>#include &lt;sys/socket.h&gt;<BR>#include &lt;netinet/in.h&gt;<BR>#include
 &lt;netdb.h&gt;<BR>#include &lt;arpa/inet.h&gt;<BR>#include &lt;sys/uio.h&gt;<BR>#endif<BR>#include &lt;string.h&gt;<BR><BR>/*<BR>*<BR>*&nbsp;&nbsp;&nbsp;<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)&nbsp;&nbsp;&nbsp; <BR>*/<BR><BR>cedit(prod_ok, err_msg, prod_no)&nbsp;&nbsp;&nbsp; <BR><BR>char &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; prod_ok[];<BR>&nbsp; &nbsp;&nbsp;&nbsp;<BR>char &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *err_msg;<BR><BR>short int&nbsp;&nbsp;&nbsp; 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 &gt; 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'; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* Null srting terminator */<BR>}<BR>}<BR>/* end-of-program */<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>CTS_ROOT:[WORK.PENNYJ]QKDRIVER.PHEXE;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp; 9-SEP-2009 14:54:05.84</DIV>
<DIV>&nbsp;</DIV>
<DIV>with buildexternal cedit cedit</DIV>
<DIV>&nbsp;</DIV>
<DIV>AND </DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV>xxx.map</DIV>
<DIV>&nbsp;</DIV>
<DIV>Confused in PHX...</DIV>
<DIV>&nbsp;</DIV>
<DIV>TIA Again folks&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>John M Penney</STRONG></DIV>
<DIV><STRONG>1532 Fern Street&nbsp;SW</STRONG></DIV>
<DIV><STRONG>Olympia, WA&nbsp; 98502</STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>(360)789-8159</STRONG></DIV></DIV></DIV></td></tr></table><br>