USER command - help

flavius m flaviusm at hotmail.com
Sat Jul 11 13:37:35 PDT 2009



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.


Thank you,
Flavius.


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";
	}
	if( "$string" eq "ver2"){
		print "This is version 2\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".


_________________________________________________________________
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/20090711/a7b9ab91/attachment.html 


More information about the Filepro-list mailing list