Ha! Thank you. I put only the "PATH=/bin bpxmtext ..." in and it works! Reading the file to the end I get
TCPIP JRConnTCBNotFound: A TCB was not found for the specified socket. Action: Use a valid socket descriptor. I am going to convert line feeds to blanks so that it will all substitute nicely into a conventional z/OS style message. Question: Do I have something here that should work at 99.9% of customers, or at least fail very gracefully? I don't want to create a new "hard" problem solving what is basically a cosmetic shortcoming. How do I recognize a failure? The FILE pointer was non-null even when the command failed. I suppose if the text read from the file were less than some reasonableness value? 20 bytes? Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Monday, September 10, 2018 2:44 PM To: [email protected] Subject: Re: How call BPXMTEXT from Posix STC On Mon, 10 Sep 2018 13:56:46 -0700, Charles Mills wrote: >> o What does "bpxmtext 76697242" do? > >TCPIP >JRConnTCBNotFound: A TCB was not found for the specified socket. > >Action: Use a valid socket descriptor. > >> o What does "type bpxmtext" do? > >bpxmtext is cached /bin/bpxmtext > >> o What does 'getenv( "PATH" )' do? > >Returns an empty string. > Maybe not good. But "cached" should take care of it. Bit by bit: FILE *errFile = popen("PATH=/bin bpxmtext 76697242 </dev/null 2>&1", "r"); ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
