[Info-vax] yet another sys$qiow question

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Tue Aug 11 19:10:02 EDT 2015


On 2015-08-11 22:38:57 +0000, kc at kayceesoftware.com said:

> this is slightly related issue only as it pertains to the same serial 
> comm to a card reader.
> to refresh: vms 8.4 IA64, tcpip 5.7 ECO 5, C 7.3-018
> sys$qiow working fine now and seems very stable, my problem was getting 
> the terminator mask correct.
> 
> I've been reading on sockets and will be converting to that mode soon 
> for another project and probably change this serial code at that point.
> 
> BUT, in researching a very random NAK of my comm, i've found that the 
> CRC sometimes calcs a line feed (LF, ox0a), and the stored string shows 
> ONLY the LF i put in it....but the message that ends up at the card 
> reader has CRLF, which is then rejected as invalid.
> The terminal port (TNA1) is set pasthru, the VMS IO Ref Manual says 
> IO$M_NOFORMAT and TT2$M_PASTHRU are basically the same.
> So, is it the TT driver, or tcp, or something else converting the LF to CRLF?
> And....what flag(s) do I need to set to have full passthru?


You're going to have to narrow down which application code path is 
generating that string.

It's probably that there are different code-paths here, or there's a 
path which doesn't initialize a shared structure, or one that doesn't 
set NOFORMAT, etc.

FWIW, I've found sockets much easier, and much more maintainable.    
While I'd usually recommend following Beej over what the OpenVMS 
examples show — the OpenVMS examples tend to be pretty dusty — there 
are some socket source examples provided with TCP/IP Services:

$ dir tcpip$examples:*.c

Directory SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP]

TCPIP$ECHO_SERVER_PLUS.C;1              TCPIP$SCTP_CLIENT.C;1
TCPIP$SCTP_CLIENTX.C;1                  TCPIP$SCTP_SELECT_SERVER.C;1
TCPIP$SCTP_SERVER.C;1                   TCPIP$TCP_CLIENT_QIO.C;1
TCPIP$TCP_CLIENT_SOCK.C;1               TCPIP$TCP_SERVER_QIO.C;1
TCPIP$TCP_SERVER_QIO_AUXS.C;1           TCPIP$TCP_SERVER_SOCK.C;1
TCPIP$TCP_SERVER_SOCK_AUXS.C;1          TCPIP$UDP_CLIENT_QIO.C;1
TCPIP$UDP_CLIENT_SOCK.C;1               TCPIP$UDP_SERVER_QIO.C;1
TCPIP$UDP_SERVER_SOCK.C;1

Total of 15 files.



-- 
Pure Personal Opinion | HoffmanLabs LLC




More information about the Info-vax mailing list