<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Garamond;
        panose-1:2 2 4 4 3 3 1 1 8 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Garamond;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Hi John, I haven’t
looked closely at the code below and I haven’t looked at buildexternal in
eons, but, a couple quick suggestions<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Does the logical
qkdriver point to where your qkdriver file is?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>For the command buildexternal,
try specifying the library for the second parameter and the qkdriver file in
the third parameter. Make sure to include full device and directory.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Not sure about your
quick code, but, just through a designer procedure in there with one line do
external cedit or whatever the name is. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Sorry, can’t
help with the C code.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Hope this helps some.<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 color=blue face=Garamond><span
style='font-size:12.0pt;font-family:Garamond;color:blue'>Lorry</span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
powerh-l-bounces+llitman=manitoba-ehealth.ca@lists.sowder.com
[mailto:powerh-l-bounces+llitman=manitoba-ehealth.ca@lists.sowder.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Penney, John<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, September 09,
2009 5:46 PM<br>
<b><span style='font-weight:bold'>To:</span></b> power-l<br>
<b><span style='font-weight:bold'>Subject:</span></b> C Call OpenVMS</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0>
<tr>
<td valign=top style='padding:0in 0in 0in 0in'>
<div id=yiv465325399>
<div id=yiv20160397>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>OK, PH List:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>This is what I've been able to ascertain, i.e. if
anbody is interested and by the volume of traffic....<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I've tried two approaches - buildexternal with a
'share' and without a share'. <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>With both it seems that zero, zilch, rien, nada,
bupkas is happening in the C code:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I've attached the C and the PH code sources and my
buildexternals, etc.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>This cannot be that complicated but I haven't done
this sort of stuff in 10 years...<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>TIA and hoping for a reply<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>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><span style='cursor:hand'
id="lw_1252536049_0">Subroutine</span></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<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>C Program:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> /*====================================================================<br>
*<br>
* COPYRIGHT
(C) 1989, 1998 BY<br>
* <span class=yshortcuts><span
style='background-attachment:scroll;background-position-x:0%;background-position-y:
0%;cursor:hand' id="lw_1252536121_0">DIGITAL EQUIPMENT CORPORATION</span></span>,
<st1:place w:st="on"><st1:City w:st="on">MAYNARD</st1:City>, <st1:State
w:st="on">MASS.</st1:State></st1:place>*<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><span id="lw_1252536121_1">MACRO
DEFINITIONS</span></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><span id="lw_1252536121_2">Subroutine</span></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><span
id="lw_1252536121_3">Cognos Inc</span></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 */<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>CTS_ROOT:[WORK.PENNYJ]QKDRIVER.PHEXE;2
18 9-SEP-2009 14:54:05.84<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>with buildexternal cedit cedit<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>AND <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>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<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>xxx.map<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Confused in PHX...<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>TIA Again folks <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><strong><b><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>John M Penney</span></font></b></strong><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><st1:Street w:st="on"><st1:address w:st="on"><strong><b><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>1532 Fern
Street SW</span></font></b></strong></st1:address></st1:Street><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><strong><b><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>Olympia</span></font></b></strong></st1:City><strong><b><font
face="Times New Roman">, <st1:State w:st="on">WA</st1:State> <st1:PostalCode
w:st="on">98502</st1:PostalCode></font></b></strong></st1:place><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><strong><b><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>(360)789-8159</span></font></b></strong><o:p></o:p></p>
</div>
</div>
</div>
</td>
</tr>
</table>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>