In the ibmdisrv command-line used to launch your AssemblyLine, you can use one of the user-defineable options -0 through -9 to pass information into the AL.
For example, in order to pass the name of an input file to the AssemblyLine named 'ReadFile' you could use this command-line:
ibmdisrv -c MyConfig.xml -r ReadFile -0 c:/Input/HRExport.csv
Then in the Prolog - Before Initialize Hook of the File Iterator used to read this file you can retrieve the filename from the command-line argument and apply it to the 'filePath' parameter of the Connector like this:
fileName = main.commandlineParam("0");
Of course, you will also want to harden this code a little to deal with missing command-line option values, etc.
Monday, January 26, 2015
- ▼ 2015 (5)
- ► 2011 (11)