On Mon, 10 Sep 2018 17:36:18 -0500, Paul Gilmartin wrote:
>On Mon, 10 Sep 2018 15:12:46 -0700, Charles Mills wrote:
>
>>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.
>>
>z/OS isn't really UNIX, y'know.
>
>>I am going to convert line feeds to blanks so that it will all substitute
>>nicely into a conventional z/OS style message.
>>
>That would be (untested):
> FILE *errFile = popen("PATH=/bin bpxmtext 76697242 </dev/null 2>&1 | tr
> '\025' '\040'", "r");
>
Silly me! If you intend to get status from pclose(), leave out the "| tr ...".
You'd get the status from tr, which hardly ever fails.
How do you tell original line feeds from original blanks so everything
doesn't just flow together?
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN