USER command - help

flavius m flaviusm at hotmail.com
Sun Jul 12 07:44:01 PDT 2009


Ken,
Thank you for your quick reply.The perl script runs as expected (please see the below output):
elijah:~ admin$ /appl/fp/testver1This is version 1ver2This is version 2quitelijah:~ admin$ 
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).
Thank you,Flavius.
P.S. the presented perl script is only for testing purposes so that I can test the communication between the two. 
> Date: Sat, 11 Jul 2009 23:23:25 -0400
> From: kenbrody at spamcop.net
> To: flaviusm at hotmail.com
> CC: filepro-list at lists.celestial.com
> Subject: Re: USER command - help
> 
> flavius m wrote:
> > 
> > Hello,
> > 
> > 
> > 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.
> 
> ObAnswer:  Define "didn't work".
> 
> What happened when you tried it?
> 
> If you run the Perl script from the command prompt, and type "ver1" and 
> "ver2", does it respond as you expect?
> 
> 
> > Input processing
> > ------------------------
> >  1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> > @wlf1  ? If:                                                                   ?
> >        Then: USER tst=/appl/fp/test                                            ?
> >   2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> >        ? If:                                                                   ?
> >        Then: tst="ver1"; aa=tst; tst="ver2"; bb=tst; tst="quit";                 ?
> >   3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> >        ? If:                                                                   ?
> >        Then: display;                                                          ?
> >   4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> >        ? If:                                                                   ?
> >        Then: end   
> > 
> > 
> > 
> > 
> > The perl script :
> > 
> > 
> > #!/usr/bin/perl
> > 
> > 
> > my $string = ();
> > 
> > 
> > while ( ($string = <STDIN>) ne "quit\n" ) {
> > 	chomp($string);
> > 	if( "$string" eq "ver1"){
> > 		print "This is version 1\n";
> > 	}
> 
> Insert "else" here
> 
> > 	if( "$string" eq "ver2"){
> > 		print "This is version 2\n";
> > 	}
> 
> Add a catchall "else" here:
> 
>      else { print "Oops.  I didn't recognize \"$string\"\n"; }
> 
> > }
> > close(FILE);
> > 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".
> 
> But, what _was_ the result?
> 
> -- 
> Kenneth Brody

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20090712/020dd8f4/attachment.html 


More information about the Filepro-list mailing list