Re: bad sample code?



Thanks

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@xxxxxxxxxxx] On
Behalf Of Chuck Arney
Sent: Friday, June 27, 2008 5:13 PM
To: IBM-MAIN@xxxxxxxxxxx
Subject: Re: bad sample code?

Why? If RETCODE is negative there was an error on the call and there is
no socket returned.

Chuck Arney
illustro Systems International, LLC
http://www.illustro.com
Access 3270 data from anywhere with z/XML-Host
Access 3270 apps from the web with z/Web-Host
Access CMS minidisks from z/OS or z/VSE with CMSACCess
Voice: 214-800-8900 X#0562
Fax: 214-451-6394
* * * * * * * * * * * * * * * *
This e-mail is private and may be confidential and is for the intended
recipient only. If misdirected, please notify us by telephone and
confirm that it has been deleted from your system and any copies
destroyed. If you are not the intended recipient you are strictly
prohibited from using, printing, copying, distributing or disseminating
this e-mail or any information contained in it.
* * * * * * * * * * * * * * * * * * * * * * * * * *
We use reasonable measures to virus scan all E-mails leaving illustro
but no warranty is given that this E-mail and any attachments are virus
free. You should ensure you have adequate measures in place for your own
virus checking.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@xxxxxxxxxxx] On
Behalf Of Ward, Mike S
Sent: Friday, June 27, 2008 4:43 PM
To: IBM-MAIN@xxxxxxxxxxx
Subject: bad sample code?

I was looking at the sample code(ezacicas) in sezainst listed
below for cics sockets programming. The takesocket is supposed to
return
the socket number in retcode+2 a halfword. If that's the case and
socket
number 1 was returned in retcode+2 wouldn't the error check after the
call be incorrect?

CALL EZASOKET,(SOCTSOCK,SOCKET_TO_TAKE,CLIENTID_LSTN,
X
ERRNO,RETCODE),VL,MF=(E,PARMLIST)
*
L R5,ERRNO Check for successful call
L R6,RETCODE Check for successful call
MVC MSGCMD,SOCTSOCK Set the API name
C R6,ZERO Is it less than zero
BL SOCERR Yes, go display error and terminate
STH R6,SRV_SOCKID Save the taken socket descriptor


Errno ds f
Retcode ds f

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

==========================
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity
to which they are addressed. If you have received this email in error please notify the system manager. This message
contains confidential information and is intended only for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient
you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this
information is strictly prohibited.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

.



Relevant Pages

  • Re: bad sample code?
    ... If RETCODE is negative there was an error on the call and there is ... no socket returned. ... We use reasonable measures to virus scan all E-mails leaving illustro ... Subject: bad sample code? ...
    (bit.listserv.ibm-main)
  • Re: WSASend()
    ... There's a glaring error in the sample code - the socket is not ... overlapped I/O is so you can service multiple sockets efficiently. ... > data to the client until the client disconnects. ...
    (microsoft.public.win32.programmer.networks)
  • Re: WSASend()
    ... > There's a glaring error in the sample code - the socket is not ... particularly partial to "Network Programming for Microsoft Windows" by Jones ... > overlapped I/O is so you can service multiple sockets efficiently. ...
    (microsoft.public.win32.programmer.networks)
  • Re: TcpClient work on emulator but fail in real PocketPC
    ... Socket programming was working as suggested as I tried a sample code from the ... sample code section - Signature Caputure which was using socket instate of ... Maybe you want to use TcpClient in the real program. ...
    (microsoft.public.dotnet.framework.compactframework)
  • fails to connect to gtalk (TLS)
    ... require 'openssl' ... socket = TCPSocket.new ... puts "Start connect" ... while the sample code runs pretty ok on windows with ruby stable ...
    (comp.lang.ruby)