Look at the reference guide: http://www.research.ibm.com/dx/docs/legacyhtml/pages/refgu073.htm and the sample network, ImportExternalFilter.net to see the mechanics of using ! filters in Import
Following what I posted a few days ago and Pete's suggestion you'll run a script that has the arguments you want to pass. Inside the script the arguments will be parsed and stuffed in a file. That same script will start up dx with the appropriate network and one thing that it will do is read that file and act on the contents of the arguments. The ! filter is required to do this, but would give you more flexibility. Ted Sariyski <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 01/25/2001 06:13:15 PM Please respond to [email protected] Sent by: [EMAIL PROTECTED] To: [email protected] cc: Subject: Re: [opendx-users] how to pass arguments to a dx script I am still confused how to apply this feature to my case. Can you point me to some examples, please. Thanks. Ted Lloyd A Treinish wrote: > > The file (1st) input for Import tells DX to read that file. If the file > name is proceeded with a !, then DX executes that file (e.g., shell script, > compiled program) whose output to stdout Import will interpret instead of > the bytes in a file as either dx or general array import format. It's a > powerful way of easily adding functionality to DX and integrating other > software without writing modules. Of course, it won't be efficient if the > amount of data being accessed is large. > > Ted Sariyski <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 01/25/2001 > 04:28:15 PM > > Please respond to [email protected] > > Sent by: [EMAIL PROTECTED] > > To: "Peter D. Kirchner" <[EMAIL PROTECTED]>, > [email protected] > cc: > Subject: [opendx-users] how to pass arguments to a dx script > > Hi, > > Excuse my ignorance but what is "!" feature? I checked the books but > didn't find anything. I need to pass arguments to a dx script like: > > dx -script myscript.dx arg1 arg2 > > I tried in myscript.dx Echo($1,$2) and Echo(!1,!2) > but got errors. How can I pass arguments to a dx script? > > Thanks. > Ted > > "Peter D. Kirchner" wrote: > > > > Any number of sensible ways to do this don't exist. > > > > You might be able to (shell dependent) > > MYFILE=foo dx -edit General.net > > Then in General.net have ImportSpreadsheet use the "!" feature to echo > $MYFILE > > (directly or through a shell script) and if necessary other junk to > satisfy > > ImportSpreadsheet, then use the column name or data value to get MYFILE's > > setting into your net, to feed to the filename input of the desired > Import. > > You could hide this ugliness in a macro. -- Ted Sariyski Combustion Research and Flow Technology, Inc. 174 North Main Street Building 3, P.O.Box 1150 Dublin, PA 18917 Tel: (215) 249-9780 Fax: (215) 249-9796 [EMAIL PROTECTED] [EMAIL PROTECTED]
