LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 22 Jun 2009 17:06:06 -0700
Reply-To:   feenberg <feenberg@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   feenberg <feenberg@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Read/write access to a Socket
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

I've been experimenting with filename I/O using sockets, and found that there seems to be a difficulty when one writes to a socket before reading from it. For example this job writes a line to the "echo" port of a system, and wants to read it back from the same port.(Yes, the echo port is working on this system). :

filename echosock socket 'nber3.nber.org:7'; data; file echosock; put 'stuff to echo'; infile echosock; input; file log; put _infile_; run;

Even before the socket is opened, SAS generates an error message:

ERROR: The FILE and INFILE statements are out of proper order for update processing. The INFILE statement must be specified before the FILE statement.

Of course I am not doing UPDATE processing (AFAICT). The documentation for sockets is at http://tinyurl.com/mz35oz but it doesn't mention anything about reading and writing to the same socket. I didn't realize it was allowed until I read the Proceedings paper at http://tinyurl.com/leqygc and while I can get those examples to work, they always read a banner before writing to the socket. I have a feeling the error message may just be overzealous error checking.

Daniel Feenberg 617-588-0343 feenberg@gmail.com


Back to: Top of message | Previous page | Main SAS-L page