Extracting body with header and trailer multiple times from a multirow file

Hello Everyone,
I am new to OSB and currently working on a project where I need to extract data from a flat file containing multiple rows of body and a single header and trailer in the following fashion:
Original File:
<Header></Header>
<Details></Details>
<Details></Details>
<Trailer></Trailer>
Desired format using OSB:
<Header></Header>
<Details></Details>
<Trailer></Trailer> ... in a single file, multiple times
Please help me in carrying out this functionality. It's really urgent and important.
Thanks,
Saurabh

Some may argue this is not the right forum - database general might have been a little been than downloads - but now the thread is here I'll try an answer.
As I see it It depends on your spooling tool.
Lets assume you are using sqlplus.
I that case the sql prompt command may serve your purpose
Alternatively
select 'header' from dual
union all
select field1||','||field2||','field3 .... /*must single string expression but may concatentate field */ from somtable
union all
select 'trailer' from dual;may suit.
However I fear either I have not understood the question or if I have understood the question that you may have difficulties implementing this.
Edited by: bigdelboy on 19-Apr-2009 14:32

Similar Messages

  • Spooling data with Header and trailer

    Hi everyone,
    I have a problem in spooling the data.
    I get a .dat file to load into db .That .dat file will be having header,records,trailer.While loading into the db i load only the records .
    I load the .dat file into table using sqlldr with direct= true and parallel=true.
    I load data into one table.header and trailer into one table(Loading into two different tables using three control file each for header,records,trailer to load from same .dat file).But while spooling the data out after some modifications to the table.i need to spool it with the header and trailer.I am able to spool only the records but not header and trailer.
    That header and trailer are in standard form,everytime i get the .dat file.
    Help me how to spool data from a table with the HEADER & TRAILER in the spool file.
    Thanks

    Some may argue this is not the right forum - database general might have been a little been than downloads - but now the thread is here I'll try an answer.
    As I see it It depends on your spooling tool.
    Lets assume you are using sqlplus.
    I that case the sql prompt command may serve your purpose
    Alternatively
    select 'header' from dual
    union all
    select field1||','||field2||','field3 .... /*must single string expression but may concatentate field */ from somtable
    union all
    select 'trailer' from dual;may suit.
    However I fear either I have not understood the question or if I have understood the question that you may have difficulties implementing this.
    Edited by: bigdelboy on 19-Apr-2009 14:32

  • Imported dvd into premiere pro 2014 as a linked file with audio and video but audio from previous editing file is playing with video

    I am editing in premiere pro 2014 on a windows 8.1 system with 12 mega byes of ram.  I imported a dvd into premiere from a .f4v that was
    burned using freemakevideo converter.
    I imported the DVD into premiere and the audio that is playing is from an previous project I edited with the program, as oppose
    to, the audio that is linked with the video imported.
    Do you know why this is?  I cleaned my media cache and I rebooted my machine.  
    Please help

    Without knowing the specs of your videos it is hard to say. I'm also running a Mac and am having no such issues.
    My first thought is that you have something from a 3rd party installed that is causing conflicts. If all else fails try transcoding your mp4 files to a frame based codec using the Adobe Media Encoder. Pick one of the Apple production codecs or Jpeg compressed QuickTime.
    Are you running a ram preview? Did you render your Premiere timeline? Are you new to AE?

  • Receiver FCC Structure For Header and Trailer

    Hi Guys ,
    I need to go for receiver FCC for header and trailer  in PI .How the FCC in communication channel needs to be configured if I am taking a separate node for header and trailer in mapping .Output of the file should be as the file attached.
    Thanks.
    Regards.

    Hi,
    If you are using File communication channel as a reciver you can go with FCC.
    Use record set structure as : Header,detail,trailer.
    https://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Otherwise if you are going for SFTP to create the file ... follow the Indrajit suggestion..
    Still facing any issue.. Please let us know..
    Thanks,
    Sreenivas...

  • Unix Flat File: Remove header and trailer and put in another file.

    Hi,
    I have Source Flat File placed on Unix Box with header and trailer.
    I want to remove Header and Trailer and put in some other file and Data in another file.
    I tried following command in unix its working.But not getting Header and Trailer in another file.
    sed '1d;$d' input_source.txt > output_data.txt
    also How will i use OS command for it in ODI.
    Guide me.
    Thanks
    Ashwini

    Hi Ashwini,
    You can run OS commands in a package using an ODI Tool: OdiOSCommand.
    It is also possible to execute OS commands in an ODI procedure using the Operating System or Jython technologies.
    There should be some articles about this on metalink (http://metalink.oracle.com).
    Thanks,
    Julien

  • Need information about FI document  with header and no items

    Hello Experts!
    I need your help for understanding the following subject :
    How is it possible when using F.13 to obtain a fi document with header without items sometimes,
    and fi document with header and items anothers times?
    We didn't saw/found customizing topics about that ( to enable or not header without items) Some exists?
    The only difference in the two cases are the document's type involded which are not the same.
    Regards,
    Josiane

    Hi,
    We verify  and compare everything.  it's the same everywhere except the document type of the invoice
    first case, F.13 create conciliation fi document with header and no items
    invoice ( doc. type YB )
    payment ( doc type ZT)
    conciliation ( doc type XZ )
    2th case, F.13 create conciliation fi document with header   and none items
    invoice ( doc. type YT )
    payment ( doc type ZT )
    conciliation ( doc type XZ )
    We match / compare  every fields and value  between invoice of 1st and 2tch case,  every fields and value between payment  of 1st and 2th case.
    ( we create  tests case in own integration system for reproduce  )
    We alse match / compare customizing of invoice type document YB and YT and  they seems identical...
    The procedure is the same with F.13 to do conciliation in both cases.
    we got same amount, same currency etc etc.
    We still didn't understand why with invoice type YT the conciliation document created is not the same as invoice type YB ...
    Nobody have idea ?

  • How to do the header and trailer validation in the input file?

    hi,
    what are the ways we can validate whether header and trailer record exists in the input file?
    how to do that?
    regards
    Ruban

    File to Proxy Validation
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dceaa0
    /people/swaroopa.vishwanath/blog/2005/06/24/generic-approach-for-validating-incoming-flat-file-in-sap-xi--part-1
    /people/swaroopa.vishwanath/blog/2005/06/29/generic-approach-for-validating-incoming-flat-file-in-sap-xi--part-ii
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy

  • TS2972 Apple TV (2) works great with everything BUT iTunes on my computer, AND I can turn Home Sharing Off and On multiple times and NOTHING show up under "shared" and NOTHING shows up under Computers on Apple TV???

    My Apple TV (2) works fine with my iPad and iPhone.
    My iTunes syncs with my iPad and iPhone.
    I have turned "Home Sharing" off and on multiple times - of course using the same AppleID - and NOTHING shows up under Shared (and then Shared goes away) and NOTHING shows up under "Computers" on Apple TV?
    Why aren't Apple TV and iTunes smart enought to work with each other on the same network?  This should not be this difficult...

    I think I am having the same problem.
    My issue: since updating the software on ATV, I get an issue where shortly after starting a movie or video of some sort streaming from iTunes on my iMac the vid stops and Apple TV tells me that I need to connect to my Home Sharing account.  Sometimes I can fix it by turning Home Sharing off and back on in my settings.  Sometimes I need to completely reboot the AppleTV!
    Any suggestions???

  • RESTORE - Kernel   Bad page - header and trailer not matching

    Hello,
    I have a Problem with the recover of my backup.
    When i want to make a restore of the Database this error is shown in Logfile KNLDIAGERR
    2008-11-26 21:20:38                               --- Starting GMT 2008-11-26 20:20:38           7.5.0    Build 032-123-111-699
    2008-11-26 21:26:57      0xE0C ERR 20005 Kernel   Bad page - header and trailer not matching
    2008-11-26 21:26:57      0xE0C ERR 20006 Kernel   Header [ 5277032 - data - tab - checksumData - empty ]
    2008-11-26 21:26:57      0xE0C ERR 20007 Kernel   Trailer[ 0 - data - nil - chckNil - empty ]
    2008-11-26 21:26:57      0xE0C ERR 52015 RESTORE  write/check count mismatch 5277032
    2008-11-26 21:26:57      0xDFC ERR 52012 RESTORE  error occured, basis_err 300
    2008-11-26 21:26:57      0xDFC ERR 51080 SYSERROR -9026 BD Bad datapage
    any Help ?
    thanks a lot
    Steven

    Hi Steven,
    the database kernel checks with every read the header trailer. If it got a mismatch during read the error message you got is logged.
    The same checkes will be executed when you create a backup. You told us that the backup could be executed without any errors and that the system where you created the backup is ok as well -> you executed a Check data?
    Now everything looks like the error is in the backup and happened during writies to the external backup medium. Or the backup is ok and then the error happens during read from the external medium.
    To get closer to the reason where the problem is located I need to have some more information.
    1. You did the restore several times?
    2. Did the bad Data Page shappens always on the same page -> Check knldiag.err
    3. Did you do your backup on tape?
    4. Did you try to create a backup into a file?
    5. Does the restore from file got the error as well?
    Regards, Christiane Hienger

  • Open Hub Header and Trailer Record.

    Hi,
    For the Open Hub Destination
    Destination Type is File,
    Application server.
    Type of File Name: 2 Logical File name.
    How to to the get the Header and Trailer Record which will contain Creation Date, Creation Time and Total number of records.
    Header record Layput :
    Creation Date (YYYYMMDD)
    Creation Time (HHMMSS)
    Total record Count
    Trailer record Layout:
    Total number of Records in the file and
    XXXX( Key Figure ) Total.
    Thanks in advance.
    Regards,
    Adhvi.

    Hi Venkat,
    write a UDF in following way...
    pass the first parameter as the detail node (cache the whole queue) to the UDF pass the second parameter as the trailer countto the UDF
    now loop through the detail records get the count with a counter variable
    check the counter against the trailer count outside the loop
    if it doesnot match trigger the alert from the UDF itself
    Check the below link for triggering alert from an UDF
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

  • How to generate Header and Trailer for a file

    Hi Guru
    How can we generate header and Trailer for a file
    EX:
    i want to generate header with date and trailer with record count from table.
    Sample file :
    20120120
    fwsfs
    adfwsfd
    adff
    afsadf
    afdwsg
    adgsg
    adgsgg
    asgdsag
    sdgasgdaf
    sdfsagfadf
    10

    Hi ,
    1.Create an interface to load data from oracle to file and set generate header as false option in IKM .
    2.Create variable get_current_date of alphanumeric datatype and implement logic SELECT to_Char(SYSDATE,'yyyymmdd') FROM DUAL under refreshing tab
    3.Create variable get_record_count of numeric datatype and implement logic SELECT '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>' FROM DUAL under refreshing tab
    4.Create a package
    Drag the get_current_date variable ,
    Drag odioutfile and paste the below logic OdiOutFile "-FILE=D:\ODI_TEST\emp.txt" "-CHARSET_ENCODING=ISO8859_1" "-XROW_SEP=0D0A" #GET_current_date in command tab
    Drag the interface
    Drag another variable get_Record_count
    Drag the odioutfile and paste the below logic OdiOutFile "-FILE=D:\ODI_TEST\emp.txt" -APPEND "-CHARSET_ENCODING=ISO8859_1" "-XROW_SEP=0D0A"
    #GET_RECORD_COUNT in command tab
    Link all these in sequence,save and run the package.
    OR Modify the IKM SQL to File Append to achieve same functionality.
    Thanks,
    Anuradha

  • Header and trailer pages in report templates

    Hi:
    I wonder how can i make header and trailer pages in the tamplate reports , so that the objects in the template header & footer report would be inherited to the generated reports. I use Oracle reports 6.0.8 and there is no header section, niether Trailer section in the Template Editor, I've read in the reports online help :"You can use the margin and body of the Header and Trailer sections to create a Header and Trailer “page” as in earlier releases. In future releases, you will be able to add and delete sections.", is there any method i can use to make header&trailer pages in the template.

    I have the same question. This is what I found on Metalink.
    goal: How To Define A Header/Trailer Section In A Reports Template Definition File (TDF)
    fact: Oracle Reports Developer
    fix: It is not possible to have a HEADER/TRAILER section in a Reports Template Definition File (TDF). Templates do not need to have a HEADER/TRAILER section, infact there is no sectioning in a template. They just define the visual layout when applied against a report section.
    This did not answer my question!

  • DW CS6 doesn't open in OS 10.9.5, even after deinstallation and reinstallation (multiple time)

    DW CS6 doesn’t open in OS 10.9.5, even after deinstallation and reinstallation (multiple time).
    I tried deleting all prefs with the name Dreamweaver in the Library/preferences and in Apllication Support/adobe. Doesn’t change anything.
    Is there a conflict with something else? Is there something else I can do ?

    Hello Claude,
    in this case I would download a really new trial version of your program in question (DW) and change it into a "real" version later, BUT because you said, that you "re-installed" already, so it will become a little bit more complicated. It would be necessary that you have to use "Adobe Creative Suite Cleaner Tool".
    Here an advice for that (The order varies depending on your individual needs. Please read all my proposals first, so you can better choose the first step:)
    1. Maybe you have to activate/deactivate, so please have a look there:
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html
    2. Sometimes, we know in the meantime, the "opm.db file" is the culprit. In this case you should delete it.
    3. You did you already try "uninstalling and re-installing". Be careful with (de)installing aso. by (de)installing by your own resources. As much as I regret it and as strange as it may seem I fear it's a challenge for Adobe's Creative Cloud Cleaner Tool. Sometimes - for whatever reasons - CC doesn't "want" to work. In this case you should CC completely delete and reinstall by help of Adobe Creative Cloud Cleaner Tool. (A try to uninstall by own resources is not enough!)
    I quote: Adobe Creative Suite Cleaner Tool helps resolve installation problems for Adobe Creative Cloud and Adobe Creative Suite (CS3-CS6) applications. The tool removes installation records for prerelease installations of Creative Cloud or Creative Suite applications. It does not affect existing installations of previous versions of Creative Cloud or Creative Suite applications.
    Please use: http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html and follow the prescribed sequence of operations
    4. If necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use the chat, I for my part had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.
    Hans-Günter

  • I have agreed and accepted the terms and conditions multiple times

    I have agreed and accepted the terms and conditions multiple times and I am still being asked to accept. All I want to do is watch the new episode of Glee and I am highly considering doing so illegally or getting a ******* hulu-plus account because iTunes for some reason does not want me to purchase anything. I have been playing along in this treacherous cycle for a ******* half-hour. How do I make this stop?

    Hello ms450,
    I would report an issue with the purchase directly to the iTunes Store support with this article:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/ht1933
    Cheers,
    Sterling

  • Unable to open iTunes. I have completely unistalled and reinstalled multiple times without any resolution.

    Unable to open iTunes. I have completely unistalled and reinstalled multiple times without any resolution. When I try to open it, a shadow/outline comes up as though the window is there but it is transparent and I am unable to see any content whatsoever. I am unable to take any action at all. Please help it's been doing my head in for a looooooooooooooong time!!! TIA

    Also, in Task Manager, it always shows that iTunes is "Not Responding".
    Cheers

Maybe you are looking for