I'm sure I'll get the desired help here.
I have got multiple .ini files sitting in the inbox folder. The format of the .ini files are
Code: Select all
[Section]
Subject=Value
Eg.
[History Loading]
ServerList=localhost1,localhost2,localhost3
[localhost1]
Name=Brad
Address=2 Winging
[localhost2]
Name=Pitt
Address=3 Crazy
The following I need in the output which is a single dataset file for all .ini file inputs. It has 4 columns
------------------------------------------------------------------------------
ini_FileName ServerList Name Address
----------------------------------------------------------------------------
apsv002.ini localhost1,localhost2,localhost3 Brad 2 Winging
apsv002.ini localhost1,localhost2,localhost3 Pitt 3 Crazy
apsv002.ini localhost1,localhost2,localhost3 Pock 4 Notsocrazy
apsv003.ini localhost1 Mock 2 Magenta
apsv004.ini localhost1, localhost2 Tock 14 Scar
apsv005.ini localhost1, localhost2 Jack 24 Huges
As for getting the file name I used the pattern *.ini in the datastage sequential stage and used the FileName=ini_FileName column property. When I run the Job the ini_FileName output column contains *.ini instead of the individual file name that I was expecting.
Any light ?