Mapping with both source and destination as flat files???

hi I have two two flat files(large data) for example A and B.
let us say
A has records of format( characteres of size(5) , numbers of size(6) , characteres of size(5) )
B has records of format( characteres of size(5) , numbers of size(6) )
i have to map these flat files so that rocords with numbers in both files should be added where the records of characters in both files are same) and output a flat file C .
i.e
A(aaaaa111111bbbbb222222ccccc111111
bbbbb111111fffff666666ddddd333333)
B (aaaaa222222)
output should be(aaaaa333333)
i have created the flat file module and could able to sample A and B .
I have also created an external table based on A and B.but the data is not been showed ih the external table.How to map this.
Pls guide me.
srry for being long here.
Thanks 4 ur time.

Sounds like your datatypes/settings are incorrect.
To process a file (let's call it stuff.txt) with fixed length records such as the following...
aaaaa111111bbbbb222222ccccc111111bbbbb111111fffff666666ddddd
Here is an example tcl script. There are some variables you have to setup for the flat file module, the oracle module, the File location and project name all of which should exist before running. It will create the flat file, external table, a simple mapping from external table to flat file defined by tcl variable target_file (in same directory as the LOC_SRC_FILES, you can change this..its just for demo purposes and will write a comma separated file). Hopefully this will get you up and going with your problem...
# Create the modules etc and set the values below, then run
set project MY_PROJECT
set ff_module FF
set ff_location LOC_SRC_FILES
set ora_module MM
set target_file my_target_file
OMBCC '/$OMB_CURRENT_PROJECT'
OMBDCC
OMBCC '$ff_module'
OMBCREATE FLAT_FILE 'FSTUFF' SET PROPERTIES (DATA_FILE_NAME,IS_DELIMITED, RECORD_LENGTH) VALUES ('stuff.txt',0, '16') ADD RECORD 'FSTUFF'
OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDA' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('CHAR',1,5,5)
OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDB' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('DECIMAL EXTERNAL',6,11,6)
OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDC' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('CHAR',12,16,5)
OMBCC '../$ora_module'
OMBCREATE EXTERNAL_TABLE 'FSTUFF_EXT' SET PROPERTIES(LOAD_NULLS_WHEN_MISSING_VALUES,TRIM) VALUES (1, 'RIGHT') SET REFERENCE RECORD 'FSTUFF' OF FLAT_FILE '../$ff_module/FSTUFF' DEFAULT_LOCATION '$ff_location'
OMBCREATE MAPPING 'FILE_TO_FILE'
OMBALTER MAPPING 'FILE_TO_FILE' ADD EXTERNAL_TABLE OPERATOR 'SOURCE_STUFF' BOUND TO EXTERNAL_TABLE 'FSTUFF_EXT'
OMBALTER MAPPING 'FILE_TO_FILE' ADD FLAT_FILE OPERATOR 'TARGET_FILE'
OMBALTER MAPPING 'FILE_TO_FILE' ADD CONNECTION FROM GROUP 'OUTGRP1' OF OPERATOR 'SOURCE_STUFF' TO GROUP 'INOUTGRP1' OF OPERATOR 'TARGET_FILE'
OMBALTER MAPPING 'FILE_TO_FILE' SET PROPERTIES (GENERATION_LANGUAGE) VALUES ('PLSQL')
OMBALTER MAPPING 'FILE_TO_FILE' MODIFY OPERATOR 'TARGET_FILE' SET PROPERTIES (TARGET_DATA_FILE_NAME) VALUES ('$target_file')
OMBALTER MAPPING 'FILE_TO_FILE' MODIFY OPERATOR 'TARGET_FILE' SET PROPERTIES (TARGET_DATA_FILE_LOCATION) VALUES ('$ff_location')
You can do all this in the UI, just thought it would be useful as a script for you.
Cheers
David

Similar Messages

  • Association must have both source and destination ends.

    I am getting this error when trying to developer Oracle Applications framework page using ICX and FND information. I am trying to find out if there is something missing. I don't see an assocation that is missing a source or destination.

    {forum:id=210}

  • Sending emails with both body and attachment to multiple recipients

    I have a requirement to send email with body and attachment to multiple recipients.
    Body of the email is a standard text. It is a proxy-to-mail scenario.
    Here is what I've done: (I'm using PI 7.11)
    One mapping from Source to Target structure (format of the attachment text file)
    Second mapping from Target Structure to Mail Package format.
    In the second mapping I'm concatenating the output of first step into "Content" of the Mail Package.
    "XIPAYLOAD" is the message protocol used.
    The "Keep attachments" option in the Mail adapter allows only to send "Content" as attachment or as body of the email.
    How to send an email with both content and text?
    The other problem is even with using ASMA, I can't send email to multiple recipients. I can only do CC and TO for 1 person each - a total of 2. Although I can resolve this by creating mailing lists, it is better if this can be addressed in PI.
    Thanks for any input you can provide!
    Edited by: crazylad on Jan 18, 2012 3:39 PM

    Thank you for your response Mikael.
    For the first question, I was able to find the solution in the following blog:
    XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF
    (I just needed to search with the right set of key words )
    The key is to set the "Content Encoding" as "None" in the mail adapter. If this is not done, the mail will be sent with an attachment - untitled.bin containing both the mail body and the attachment text. Also, don't forget to check the "Keep Attachments" checkbox in the mail adapter.
    Multiple recipients could be added by separating the email IDs with a Comma. I have used ASMA to set the recipients.

  • Dbms_lob.getlength() returns different source and destination lengths

    I am fairly new to PL/SQL so maybe this is an obvious problem but here goes. I am updating a clob field with a text file ~5KB in size. The field updates fine (as far as I can tell). Before I update the field, I open the source file as a bfile and then inquire the length using dbms_lob.getlength(). I then update the clob field using dbms_lob.loadclobfromfile(). This seems to work fine. However, when I use dbms_lob.getlength() on the destination object returned by dbms_lob.loadclobfromfile(), I get a length 3 characters less than then the source object (5072 vs 5075). Both the source and destination offsets are set to 1.
    Probing on what documentation I could find, I found this at http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_lob.htm#i998484:
    "The length returned for a BFILE includes the EOF, if it exists. Any 0-byte or space filler in the LOB caused by previous ERASE or WRITE operations is also included in the length count. The length of an empty internal LOB is 0."
    I did not create the source file and I believe it is a Unix type file (because of the lack of CRs) and I am running on Windows 7. I am also using 11g Express. Could the use of a Unix-type file for a CLOB on a Windows system be causing this character count difference?
    Once I found this issue I can work around it. I just want to understand what is going on.
    Thanks to all who look at this.

    The EOF and the LF versus CR/LF could influence the count difference, yes.
    Another explain could possibly be character set conversions. The BFILE I believe counts bytes, a CLOB would count "characters" - so if the source happens to contain a few multibyte characters (UTF), then the byte count would be larger than the character count.
    To help you find the cause for your exact file, then I can suggest a couple of things you might do to explore the issue:
    <li>Load the file into a BLOB instead of a CLOB and see what getlength() returns for the BLOB. BLOBs would also do byte counts and not try to treat the source as text.
    <li>Save the CLOB back into the filesystem and compare the original file with the exported CLOB and check the differences with some filecompare tool.

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

  • Could nt complete your request because source and destination files are the same

    Hi, thank you for reading.
    I'm having this problem and it's driving me nuts.
    I'm actually following a tutorial that you can check out here: http://nightshifted.tumblr.com/post/2559360661/tutorial-paused-animations
    basically I'm trying to do a animated gif with canvas (I'm sorry if my english is not so great). when I try to drag the layers into the canvas (step 2 of the tutorial), I get the error: "could not complete your request because source and destination are the same".
    can anybody help me? I have both CS3 and CS5 and they the error appears in both.
    thank you in advanced

    I think they mean select the layers and frames and using the move tool, drag
    inside the document (click inside the document window and drag) to move the
    selected layers to the top half  (transparent area), not to drag the layers from
    the layers palette into the document, which would give that error.
    MTSTUNER

  • Dynamic source and destination tables

    Hi all
    I've got to import 142 tables from csv into SQL 2008 on a regular basis.
    I was looking at building a 142-part SSIS package to do this, then thought there must be a dynamic way of doing it.
    Is there any way of dynamically changing the source and and destination tables?
    The csv filenames will remain identical, the SQL tables will be the same names but with "_Staging" at the end of them (e.g. SRSection.csv will always go into SRSection_Staging).
    I can then write MERGE statements to update the main tables from the staging data.
    Any help on this would be greatly appreciated.
    I get the the feeling I would need a FOREACH LOOP container but I'd really aprreciate a step-by-step guide if you can.

    Please check this :- http://sql-bi-dev.blogspot.com/2010/07/dynamic-database-connection-using-ssis.html  
    STEP1:
    To begin, Create two tables as shown below in on of the environment:
    -- Table to store list of Sources
    CREATE TABLE SourceList (
       ID [smallint],
       ServerName [varchar](128),
       DatabaseName [varchar](128),
       TableName [varchar](128),
       ConnString [nvarchar](255)
    GO
    -- Local Table to store Results
    CREATE TABLE Results(
       TableName  [varchar](128),
       ConnString [nvarchar](255),
       RecordCount[int],
       ActionTime [datetime]
    GO
    STEP 2:
    Insert all connection strings in SourceList table using below script:
    INSERT INTO SourceList
    SELECT 1 ID,
    '(local)' ServerName,
    --Define required Server
    'TestHN' DatabaseName,--Define DB Name
    'TestTable' TableName,
    'Data Source=(local);Initial Catalog=TestHN;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;' ConnString
    Insert as many connections as you want.
    STEP 3:
    Add new package in your project and rename it with ForEachLoopMultipleServers.dtsx. Add following variable:
    Variable
    Type
    Value
    Purpose
    ConnString
    String
    Data Source=(local);
    Initial Catalog=TestHN;
    Provider=SQLNCLI10.1;
    Integrated Security=SSPI;
    Auto Translate=False;
    To store default connection string
    Query
    String
    SELECT '' TableName,
    N'' ConnString,
    0 RecordCount,
    GETDATE() ActionTime
    Default SQL Query string.
    This can be modified at runtime based on other variables
    SourceList
    Object
    System.Object
    To store the list of connection strings
    SourceTable
    String
    Any Table Name.
    It can be blank.
    To store the table name of current connection string.
    This table will be queried at run time
    STEP 4:
    Create two connection managers as shown below:
    Local.TestHN: For local database which has table SourceList. Also this will be used to store the result in Results table.
    DynamicConnection: This connection will be used for setting up dynamic connection with multiple servers.
    Now click on DynamicConnection in connection manager and click on ellipse to set up dynamic connection string. Map connection String with variable
    User::ConnString.
    STEP 5:
    Drag and drop Execute SQL Task and rename with "Execute SQL Task - Get List of Connection Strings". Now click on properties and set following values as shown in snapshot:
    Result Set: Full Result Set
    Connection: Local.TestHN
    ConnectionType: Direct Input
    SQL Statement: SELECT ConnString,TableName FROM SourceList
    Now click on Result Set to store the result of SQL Task in variable User::SourceList.
    STEP 6:
    Drag and drop ForEach Loop container from toolbox and rename with "Foreach Loop Container - DB Tables". Double click on ForEach Loop container to open Foreach Loop Editor. Click on Collection  and select
    Foreach ADO Enumerator as Enumerator. In Enumerator configuration, select User::SourceList as ADO object source variable as shown below:
    STEP 7: Drag and drop Script Task inside ForEach Loop container and double click on it to open Script Task Editor. Select
    User::ConnString,User::SourceTable as
    ReadOnlyVariables and User::Query as
    ReadWriteVariables. Now click on Edit Script button and write following code in Main function:
    public void Main()
    try
    String Table = Dts.Variables["User::SourceTable"].Value.ToString();
    String ConnString = Dts.Variables["User::ConnString"].Value.ToString();
    MessageBox.Show("SourceTable = " + Table +
    "\nCurrentConnString = " + ConnString);
    //SELECT '' TableName,N'' ConnString,0 RecordCount,GETDATE() ActionTime
    string SQL = "SELECT '" + Table +
    "' AS TableName, N'" + ConnString +
    "' AS ConnString, COUNT (*) AS RecordCount, GETDATE() AS ActionTime FROM " + Dts.Variables["User::SourceTable"].Value.ToString() +
    " (NOLOCK)";
          Dts.Variables["User::Query"].Value = SQL;
          Dts.TaskResult = (int)ScriptResults.Success;
    catch (Exception e)
          Dts.Log(e.Message, 0,
    null);
    STEP 8:
    Drag and drop Data Flow Task and double click on it to open Data Flow tab. Add OLE DB Source and Destination. Double click on OLE DB Source to configure the properties. Select
    DynamicConnection as OLE DB connection manager and
    SQL command from variable as Data access mode. Select variable name as User::Query. Now click on
    columns to genertae meta data.
    Double click on OLE DB Destination to configure the properties. Select Local.TestHN as
    OLE DB connection manager and Table or view - fast load as
    Data access mode. Select [dbo].[Results] as Name of the table or the view. now click on
    Mappings to map the columns from source. Click OK and save changes.
    Finally DFT will look like below snapshot:
    STEP 9: We are done with package development and its time to test the package.
    Right click on the package in Solution Explorer and select execute. The message box will display you the current connection string.
     Once you click OK, it will execute Data Flow Task and load the record count in Results table. This will be iterative process untill all the connection are done. Finally package will execute successfully.
    You can check the data in results table:
    Here is the result:
    SELECT *
    FROM SourceList
    SELECT *
    FROM Results
    Regards, Pradyothana DP. Please Mark This As Answer if it solved your issue. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://www.dbainhouse.blogspot.in/

  • How to keep sort order in Shuttle item's source and destination boxes?

    I have defined a shuttle item on a page and the list of values in the source box is populated by a SQL with sort order specified. In the Settings of the shuttle item, Show Controls value is set to Moving Only instead of All. When a user moves selected values from the source box to the destination box or vice versa, the list of values does not maintain the original sort order. For example, if I have 26 values A through Z, a user can put value Z before A in the destination box. And when a user move A from the destination box to the source box, A is the last item in the source box. The reset button clears everything in the destination box and resets the source box to the original sorted list. This is not the solution that I am looking for. I would like to see the items in the source and destination boxes to maintain their original sort order all the time.
    Is it possible?
    APEX v4.0.1.00.03
    Oracle 11g (v11.2.0.1.0)

    Hi,
    See if this post help
    Re: Sort Shuttle Right
    Regards,
    Jari

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    Thanks for that. He is one of the last holdouts in IT so an email address for him would just mean I have 2 to check so that is what I am trying to avoid as we move into retirement:)

  • External hard drive use with both Mac and Windows

    I know that you can't use an iPod (through iTunes) with both Mac and Windows, but can you still use it as an external hard drive with both operating systems?

    Yes, if the iPod is in Windows format. Mac OS X can read and write Windows formatted iPods, but Windows can't access Mac formatted disks unless special software is installed.
    (9844)

  • Cisco ISE with both internal and External RADIUS Server

    Hi
    I have ISE 1.2 , I configured it as management monitor and PSN and it work fine
    I would like to know if I can integrate an external radius server and work with both internal and External RADIUS Server simultanously
    So some computer (groupe_A in active directory ) will continu to made radius authentication on the ISE internal radius and other computer (groupe_B in active directory) will made radius authentication on an external radius server
    I will like to know if it is possible to configure it and how I can do it ?
    Thanks in advance for your help
    Regards
    Blaise

    Cisco ISE can function both as a RADIUS server and as a RADIUS proxy server. When it acts as a proxy server, Cisco ISE receives authentication and accounting requests from the network access server (NAS) and forwards them to the external RADIUS server. Cisco ISE accepts the results of the requests and returns them to the NAS.
    Cisco ISE can simultaneously act as a proxy server to multiple external RADIUS servers. You can use the external RADIUS servers that you configure here in RADIUS server sequences. The External RADIUS Server page lists all the external RADIUS servers that you have defined in Cisco ISE. You can use the filter option to search for specific RADIUS servers based on the name or description, or both. In both simple and rule-based authentication policies, you can use the RADIUS server sequences to proxy the requests to a RADIUS server.
    The RADIUS server sequence strips the domain name from the RADIUS-Username attribute for RADIUS authentications. This domain stripping is not applicable for EAP authentications, which use the EAP-Identity attribute. The RADIUS proxy server obtains the username from the RADIUS-Username attribute and strips it from the character that you specify when you configure the RADIUS server sequence. For EAP authentications, the RADIUS proxy server obtains the username from the EAP-Identity attribute. EAP authentications that use the RADIUS server sequence will succeed only if the EAP-Identity and RADIUS-Username values are the same.

  • In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?

    In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?  It is not very clear on the home page.  It shows both and mentions both, but doesn't specifically say BOTH come with the monthly $9.99/month plan.  Can somebody clarify?

    Special Photography Plan
    http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html

  • Form report with both edit and column link

    hi experts,
    How can we create form report with both edit and column link. Ie, the form should have both the Edit link and column link. When we click on the edit link(in page1) it should go for the page2 and the page2 should display the corresponding row fields which should be editable. but when i click the column link it should bring me to the next page but the corresponding values of the column should not be editable.
    Regars,
    KK

    hi,
    Here i have achieved this by making the column link and page navigation.

  • Issue in mapping the same source and target fields

    Hi All,
    I am working on PI 7.0 and currently I am connecting to PI 7.0 via citrix desktop . Problem here is : in the mapping , direct mapping option that is available to map the same source and target fields is disabled . I do know that this is due to some java version issue .
    What I want to know is there any possibilty of solving this issue without installing an updated java version ?
    Regards
    Vinay P.

    I've faced the same for many times and all of that were due to Java version.
    1st of all, you have to check the authorizations you have. If you have enough (DEVELOPER_J2EE, CONTENT_ORGANIZER_J2EE, and so), and - obvious but very often forgotten - you have to assure you're trying to change it in the message mapping change mode On.
    Then, last shot should be downgrade your Java version.
    The 1.4.2 JRE version allow you to use not only the Mapp the Identical field but also Dependencies, Clear Mapping and some other tools/buttons. As mentioned above, if there's a fix in the new Java releases, I do not know (hope so) and would appreciate if you could let us know.
    Tks.

Maybe you are looking for

  • Cell plan cancelled, can't set up facetime..."Waiting for activation"

    So I have no cell service on my iphone 4s right now and I'm trying to set up Facetime. I Registered an e-mail that works fine to log in with but my old phone number is stuck there, greyed out and says "verifying" beside it constantly. At the top it s

  • Oracle 10 AS (9.0.4) on Solaris 10

    Hello, We'have developed a forms application using Oracle 10g AS (9.0.4) and it is running on Solaris 8(Database is Oracle 9i-- 9.2.0.6). Now the client wants to have the application installed and run on Solaris 10. When they try to install Oracle 10

  • ME41 - Language of the Ordering Address

    Hello Experts, I need a clarification when creating an RFC. I have a Vendor XXX whose language is DE. The Ordering address (OA) of the vendor is YYY whose language is EN. Now When I create a RFQ and gives the vendor XXX it is taking the ordering addr

  • Photo Class Roster

    I'm looking for an easy way to print a photo class roster with the names under each picture either from iPhoto or another program. Any suggestions would be appreciated. Dual 2.7 GHz    

  • Grid View  - Weird album behavior

    Hi, whenever i try to play an album throught the Grid View using the "play album" or "play" button (on album rollover), it plays the first song and stops. Actually i realised that if i go inside the album(double-click), the album is sorted by song or