IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  File to read with different extensions

    Posted 10/13/11 07:17 AM

    Originally posted by: halekote


    Hi All,

    can we read files which can contain both .xml and .XML extensions in same input card?

    Below will be my FTP command but it should pick both .xml and .XML files.

    -URL FTP://USER:PWD@Dedusftp:21//data/BUDGET2SLAM_2011-10-04_22_50_60.xml

    Thanks in advance!
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: File to read with different extensions

    Posted 10/13/11 03:55 PM

    Originally posted by: SystemAdmin


    Assuming you will not receive any other file extensions other than .xml or .XML in the /data directory and all the filenames start with "BUDGET2SLAM", you can use the following command:

    -URL FTP://USER:PWD@Dedusftp:21//data/BUDGET2SLAM_.

    Thanks
    Phil
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: File to read with different extensions

    Posted 10/14/11 02:25 PM

    Originally posted by: repanzer1


    When I first started using Mercator 5.0 (I think that was the version), you were shown a specific way to grab mutiple files from an FTP server. What you were supposed to do was to use the type=D at the end of the FTP URL in the input card to a map. The TYPE=D says to just grab the filenames that are in the directory, and that would be your input to the map, so the input card would be a File of Records (s), each record with one field, CR/LF delimiter on the record. So when the map ran, your input would look like this;

    Filename1.txt
    Filename2.txt
    Filename3.xml

    Then you would pass each file name to a functional map. In the functional map, you would run a blob to blob map (a map with a text blob input and a text blob output), and override the input and output cards. The input override would be FTP, using the filename from the input;

    " -URL 'FTPS://john_doe:1234@gxsics.com/send/'"+ blob:Record:Inputfile +";type=A'

    You could do the same thing, but on the rule for the functional map, EXTRACT the records where RIGHT(Input, 3)=”xml” or RIGHT(Input,3)=”XML”.

    Just think of the possiblities!
    There are 10 types of people in this world. Those who understand binary and those who don't.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender