Greetings, Hey, What signals the end of the record for the READX function? I am testing an email message to be piped (STDIN) into my PASCAL program and everything works, except for one individual from a remote email server. The first email he sends to me works fine, but all other emails he sends in, my readx function only reads in the first 535 bytes. I am wondering if his email server or email application is somehow putting in extraneous characters which triggers the READX to stop reading in the email message fully. Keep in mind that my PASCAL program is launched everytime so I don't think it is anything in my program as far as initializations are concerned. Also, Even though his second, third, etc.. emails don't work, other people can email me fine from other email servers. Any ideas??? Thanks.. -----Original Message----- From: Stan Sieler [mailto:[log in to unmask]] Sent: Tuesday, November 27, 2001 1:09 PM To: Born, Ken; [log in to unmask] Subject: Re: [HP3000-L] READX QUESTION Re: > If I have read in a STDIN record that varies in record length from 1 byte to > 1920 bytes. Is this the right code below? I have some fishy things > happening... > > readx(stdin_record,-1920); > > STRMOVE(1920,stdin_record,1,email_message,1); len := readx (stdin_record, -1920); if ccode <> cce then ...handle the error or EOF else strmove (len, {# of bytes} stdin_record, 1, {source} email_message, 1); {destination} But, I wouldn't use "-1920". Instead: len := readx (stdin_record, -sizeof (stdin_record)); or: len := readx (email_message, -strmax (email_message)); if ccode <> cce then ... else setstrlen (email_emssage, len); Stan Sieler [log in to unmask] www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *