<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Ken,<div><br></div><div>Thank you for your quick reply.</div><div>The perl script runs as expected (please see the below output):</div><div><br></div><div><div>elijah:~ admin$ /appl/fp/test</div><div>ver1</div><div>This is version 1</div><div>ver2</div><div>This is version 2</div><div>quit</div><div>elijah:~ admin$ </div><div><br></div><div>However, whenever I execute it from the input processing, it looks like it is hanging and I cannot go to the next field (to stop it I have to ctrl-c it).</div><div><br></div><div>Thank you,</div><div>Flavius.</div><div><br></div><div>P.S. the presented perl script is only for testing purposes so that I can test the communication between the two. </div><br>> Date: Sat, 11 Jul 2009 23:23:25 -0400<br>> From: kenbrody@spamcop.net<br>> To: flaviusm@hotmail.com<br>> CC: filepro-list@lists.celestial.com<br>> Subject: Re: USER command - help<br>> <br>> flavius m wrote:<br>> > <br>> > Hello,<br>> > <br>> > <br>> > I would like to use the "USER" command to communicate from a Filepro processing to an external perl script. I couldn't make it work and I would appreciate if somebody can help me out with a program sample or the modification of the below example I tried.<br>> <br>> ObAnswer: Define "didn't work".<br>> <br>> What happened when you tried it?<br>> <br>> If you run the Perl script from the command prompt, and type "ver1" and <br>> "ver2", does it respond as you expect?<br>> <br>> <br>> > Input processing<br>> > ------------------------<br>> > 1 ------- - - - - - - - - - - - - - - - -<br>> > @wlf1 ? If: ?<br>> > Then: USER tst=/appl/fp/test ?<br>> > 2 ------- - - - - - - - - - - - - - - - -<br>> > ? If: ?<br>> > Then: tst="ver1"; aa=tst; tst="ver2"; bb=tst; tst="quit"; ?<br>> > 3 ------- - - - - - - - - - - - - - - - -<br>> > ? If: ?<br>> > Then: display; ?<br>> > 4 ------- - - - - - - - - - - - - - - - -<br>> > ? If: ?<br>> > Then: end <br>> > <br>> > <br>> > <br>> > <br>> > The perl script :<br>> > <br>> > <br>> > #!/usr/bin/perl<br>> > <br>> > <br>> > my $string = ();<br>> > <br>> > <br>> > while ( ($string = <STDIN>) ne "quit\n" ) {<br>> >         chomp($string);<br>> >         if( "$string" eq "ver1"){<br>> >                 print "This is version 1\n";<br>> >         }<br>> <br>> Insert "else" here<br>> <br>> >         if( "$string" eq "ver2"){<br>> >                 print "This is version 2\n";<br>> >         }<br>> <br>> Add a catchall "else" here:<br>> <br>> else { print "Oops. I didn't recognize \"$string\"\n"; }<br>> <br>> > }<br>> > close(FILE);<br>> > The result should be that I can see on my screen the two texts coresponding to ver1 and ver2 in the dummy fields "aa" and "bb".<br>> <br>> But, what _was_ the result?<br>> <br>> -- <br>> Kenneth Brody<br></div><br /><hr />Windows Live™ SkyDrive™: Get 25 GB of free online storage. <a href='http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009' target='_new'>Get it on your BlackBerry or iPhone.</a></body>
</html>