If you want to script some process, passing it input as though a real user were typing, "expect" is a good tool to use.
http://www.nist.gov/mel/msid/expect.cfm I'm not sure if it will help your sigint problem, but it should be immune to the CLEARINPUT verb... Ian McGowan 925.609.2554 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, August 16, 2010 8:40 AM To: U2 Users List Subject: Re: [U2] Sending interrupt to UniBasic program Thanks to the suggestions from various posters, I have determined that my incriminations of screen were malicious libel. It's not screen. The issue of not being able to send an interrupt (e.g. kill -2/SIGINT) is a result of how I had to work around something in the third-party code I'm trying to automate. There are a couple input prompts, e.g. "do you want to continue? y/n" that I originally tried to handle with DATA statements. But the 3rd party software is doing something to clear the input stack. I've tried a few different workarounds, including hacking the CLEARINPUT verb, with no success. I finally got it work by doing a PCPERFORM as follows: PCPERFORM 'echo PROGNAME\\nY\\n\\n\\n | udt' This works great except that a SIGINT issued to the newly spawned udt process has not effect. A straight kill works, but it actually kills the udt process which is precisely what I do *not* want to happen. Any creative thoughts on how to get a SIGINT to work? Maybe a different way of calling PROGNAME? Talking to the vendor about changing their code is a theoretical option, but involves $ and a good deal of time, so is not preferred. TIA, Brad. U.S. BANCORP made the following annotations --------------------------------------------------------------------- Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. --------------------------------------------------------------------- _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users IMPORTANT NOTICE: This message is intended only for the addressee and may contain confidential, privileged information. If you are not the intended recipient, you may not use, copy or disclose any information contained in the message. If you have received this message in error, please notify the sender by reply e-mail and delete the message. _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
