What is the Unix command to concatenate two files and merget it in to one ?

Hi Experts,
I have three jobs and each job creates a file. I want to run one more job which clubs these three files and merges it in to one.
I know the process of opening each file and appending it in to the target file using DATASET concept.
Instead of that, I want any UNIX Shell command so that I can call that directly from ABAP and execute it
Any help on this would be highly appreciated
Thanks in advance.
Babu Kilari

Hello Babu,
We can very well call an OS command from within ABAP, but in your case, I don't think that is really required. Please find below a logic that might be helpful to you.
You have three files, whose contents needs to be merged into a single file.
Read the contents of each file and store it into an internal table.
DATA: command LIKE rs37a-line.
DATA: BEGIN OF tabl OCCURS 0,
          line(2000),
      END OF tabl.
command = 'cat /tmp/file1.txt'.
CALL 'SYSTEM' ID 'COMMAND' FIELD command
              ID 'TAB'     FIELD tabl-*sys*.
Internal table 'tabl' will contain the contents of the file.
Accumulate all the contents into a single file and upload to the application server using OPEN DATASET, TRANSFER DATASET and CLOSE DATASET.
Let me know if you need a more detailed explanation.
Regards
Sabu.

Similar Messages

  • What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed?

    What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.

    Back up all data on the internal drive(s) before you hand over your computer to anyone. You need at least two independent backups to be completely safe. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore to an empty drive.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • What are the unix commands w.r.t pl/sql

    How unix commands will help in pl/sql.
    what are those commands,why UNIX ie preferable than windows environment.
    cheers...

    Chinnu wrote:
    How unix commands will help in pl/sql.
    what are those commands,why UNIX ie preferable than windows environment.Unix isn't used in PL/SQL. PL/SQL is a language in it's own right and Unix is the operating system that Oracle can run on.
    Oracle will run quite happily on both Windows and Unix environments (as well as some other *nix specific versions e.g. linux etc.).  Unix is often preferred by people for a server environment as it has a history of being a more stable operating system, but there are plenty who use Windows as a server environment too (we ourselves have both windows and unix servers).
    There are advantages and disadvantages to both. e.g. it is more easy to treat an MS Excel spreadsheet as an external database using an Excel ODBC driver and Oracle Hetereogeneous services if you are using a windows server, whereas on Unix you generally have to purchase a special ODBC driver to cope with Excel files, but likewise Unix has some benefits over Windows aside from the reliability factor.

  • What is the Unix command line command to reformat the internal 3 tera fusion drive in my 5k retina 27 iMac ?

    there seems to be problems with Yosemite and boot camp assistant
    i'm cross posting this to the iMac forum but I spent hours online with apple tech today and none of the several foks I talked to there had even seen a 5k 27" yet and my call back from Cupertino and engineering is no till tomorrow so I thought I should post here too
    MMy bto 5k shipped from China sunday night and arrived in Maine this morning.... Amazing when you think about it for a bto
    iinstallation and set up we're going fine and I started up boot camp assistant to create  a temp boot camp while I wait for my thunder bay 4 box to take the drives for my old Mac pro when boot camp will have a1 tera SSD all to itself....
    so carved off a 700 gig boot camp partition which the assistant formatted fat I then plugged is the lighting to FW adapter in a LaCie 2 tera fw 800 drive to act as a bridge to my LaCie DVD burner which uses the old fw400 cables and inserted my new shrink wrap win 8.1 retail 64 DVD and up comes the win 8 install in very tiny type in a tiny window which got a bit of a laugh out of me.
    And I go through it to the point of selecting that boot camp partition and then said it could not use a fat partition and I should reformat it from the win 8.1 installer which I did and then it said it could not use and unknown partition so I said great and booted back to 10-10 and the boot camp tool to put things back and it said it could not I then went to disk tools and it also said the  3tera fusion could not be either reformatted or put back to a single partition I was on with tech support where I went up through 4 levels of support due to the 5k bto which most had no knowledge of. We tried the optioncommand r to get to DT and the same problem as did going to reinstall from the net which after a 30 min down load could not reformat either it is now kicked to Cupertino with a call back tomorrow
    ( At this point all I want to do is put the computer back in the condition it was in when i started with a plain Yosemite on an unpartitioned 3 tera fusion... Then deal with boot camp when it can have its own drive)
    am betting it will take a Unix comand line to reformat but be aware there may be boot camp issues with my configuration
    and  any help here will be great fully received

    Try booting into Internet recovery mode, ⌘⌥R, launch Disk Utility to erase the HD. If successful, reinstall the OS. If not, then return it (14 days with no questions asked) and get another machine. Apple sells it and they should know how to fix it.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • What are the general effects of using recovery mode, and is it possible for one's data to be backed up on to it afterwards?

    My iPad, in my opinion is a great device to have whenever I need to use it for work - mainly using it for creating music.  However I feel that it's a bit outdated, and I plan to get a new iPad Air for this holiday season and give this one to my children.  That being said, I have stumbled across a weird problem that keeps me from backing my iPad (generation 2) up to my computer.  The error in question states that "The iPad is currently owned by another computer."  By looking around on the internet, I was able to deduce that one of the ways to solve this problem was to put it in recovery mode to get rid of the 'ownership', and this seems logistical.  The problem I'm facing now, is that, after trying to find the answer, I do not know how recovery mode has an impact on all the data stored on my iPad.  To clarify the question into three parts:
    1)  Is there a way to back up files from my iPad and easily retrieve them without the use of iTunes?
    2)  If not, is there a way to get rid of the 'ownership' of another computer other than recovery mode WITHOUT jailbreaking it?
    3)  If still no, then what are the effects of putting my iPad into recovery mode, and will all of my songs and data be safe?
    Thank you for answering, if possible.

    Was the iPad originally set up on a different computer, and hasn't been synced to the one that you are now trying to use ? There are some instructions on this page for syncing to a new computer : https://discussions.apple.com/docs/DOC-3141
    (Before trying that you could copy any important files/documents off the iPad so that you have you own backup copy of them e.g. depending upon what the apps support then email them to yourself, use Dropbox, copy them to your computer via your wifi-network.)
    You should be able to copy iTunes purchases off the iPad and over to that computer's iTunes via File > Devices  Transfer Purchases, but if you have music from other sources (e.g. copied from CDs) which aren't in that computer's iTunes (and you haven't got a backup to copy them onto it from) then there are some programs listed half-way down this page which should be able to copy them back : https://discussions.apple.com/docs/DOC-3991
    For recovery mode, that will result in your iPad being put back to factory defaults i.e. all of your content will be removed from it

  • I want to sell my old macbook air, what is the best way to get my files and programs off of it?

    I am going to sell my macbook air (2011) as I am replacing it with a macbook pro retina. I want to remove my files and programs from it before I sell it. What is the best way to go about this?

    1) Perform a Time Machine or Cloned image backup of your system.
    2) Test the Clone tomake sure it works, by booting to it (using the option key).
    3) Boot to the Recovery Partition, then perform an erasure, followed by a reinstallation of the OS.
    4) Shut off the Mac, after instllation and before the reboot. This will permit the next user to experience a "fresh out of the box" experience.
    5) Use the Time Machine or Cloned image to migrate your apps, users & files to your new system, using SETUP ASSISTANT. Do not use Migration Assistant.

  • What is the key command for locating a bar and beat

    I record myself and clients who want to continually locate and start playing at different bars and beats very quickly so I can punch them in to record.  In Digital Performer I use the period key to type in the bar and beat and in Pro Tools I use the equal sign.  Maybe I'm asking the wrong key commands question but I can't find the locate bar and beat command in Logic 9.  I know it's probably the most simple thing, but I can't waste any more time looking for such a basic operation.  Seems like it should be easier to find the command.
    Thanks,
    gregosophy

    Hi
    Try a (basic) search of the keycommands for "Go"
    Preferences:keycommands
    HTH
    CCT

  • What is the keyboard command to restore red, yellow and green buttons to Safari? Thanks, Richard

    Will deleting mail accounts on one laptop delete them from another laptop on the same network? Both laptops are also connected to iCloud. Thanks, Richard

    No

  • Unix command to find certain files

    hello,
    i have a powerbook g4 running leopard... i want to find all files related to a certain program or app. What would the unix command be to find all files related to a certain program or app.
    Also... is there unix commands to find all related preferences or cached items?
    Any help would be great.

    find / -name "*.doc"
    where "*.doc" would find all files ending in .doc
    and / is the root (top most) directory. You may specify a different starting point
    find $HOME -name "*.pdf"
    or even multiple starting directories
    find ~username1 ~username2 ~username3 -name "*.zip"
    You may specify more than one type of file to locate
    find $HOME \( -name "*.dmg" -or -name "*.plist" \)
    You may also want to look at the xargs command, as well as find's "-print0" option and xargs' "-0" option
    find $HOME -name "*.txt" -print0 | xargs -0 grep "magic"

  • What is the name of Report Builder Resource File

    Can Anybody knows what is the name of Report Builder Resource file and can it open in Oracle Terminal or not.
    Regard's
    Fahed

    How to create a new one.http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_arch.htm#i1005582
    http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_strt.htm#i1007097

  • Unable to run reports from the unix command line

    hi
    all of a sudden i am unable to run reports ( on App server 10g) either from the unix scripts or from the unix command line. But i can run them from the forms.
    Any one have any idead about this.
    Thank you

    thanks all for replying
    i have set the env variables for the session and it worked. Looks like i have to set the oracle_home and ld_library_path every time ( opening a new putty session) i call sqlldr.
    But in a whole i am trying to run sql loader from the forms. Right now we have Oracle app server 10g which forms 10g version. As oracle app server 10g didnt come with sqlldr, we are copied the sqlldr of database on to app server with different home. after this we can run sqlldr ( on app server ) from unix scripts but not from Forms. Then we opened a qurey with oracle about app server 10g not commig with sqlldr and its remedy . But they said that they dont have specific remedy for that and suggested the same what we did.
    So we came up with java package which does the same funtion as host command and trying to run sqlldr which is on the database( ie replacing the host command in the forms with the database funtion). By using that funtion i am able to run the sqlldr from sql plus but not from forms. I couldnt easily debug it as i wont through any error messages.
    Any one have any idea of this ...
    Thank you

  • SOA Suite 10g and SOA Suite 11g? what are the major changes in these two?

    Hi Experts,
    I am keen in knowing about Soa Suite 11g. SOA Suite 10g and SOA Suite 11g, BPEL changes? what are the major changes in these two product/tool wise? Is now OSB is part of Soa Suite 11g? it would be helpful for us to know what are the major changes and updates or modifications came in 11g.
    Please share this valuable information.
    Is there still any version is in progress from Oracle, which is yet to be officially launched from oracle?

    what are the major changes in these two product/tool wise? Few major changes to enlist are that SOA suite 10g was using Oracle Application Server (OC4J) however 11g is on Weblogic and 11g is based on SCA. B2B is now part of SOA suite itself and OSB can share a domain with SOA. You may refer below link to know few more -
    http://blogs.oracle.com/soabpm/2010/03/11gr1_patchset_2_111130_soa_fe.html
    Is now OSB is part of Soa Suite 11g? OSB has a separate installer but can share a domain with SOA and SOA-direct binding is also supported now. Refer below link to know more about new features in OSB 11g -
    http://download.oracle.com/docs/cd/E14571_01/relnotes.1111/e10132/osb.htm#CJACHEHJ
    Is there still any version is in progress from Oracle, which is yet to be officially launched from oracle?No major release is planned. Patches for 11g R1 may come.
    Regards,
    Anuj

  • What do I do. I just turned my iPod touch 5 on for the first time in about two  months and it telling me that it is disabled for 23,079,134 minutes please help

    What do I do. I just turned my iPod touch 5 on for the first time in about two  months and it telling me that it is disabled for 23,079,134 minutes please help anything would be good I also have not backed it up for a while now

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If you previously synced to the computer then you may be able to recovery use of the iPod without erasing the iPod by following the instructions here:
    Disabled Recovery-must use syncing computer.

  • What is the key command to open Audition in Logic 8?

    The little play icon in the bin, sample editor, etc.
    The one for auditioning things.
    Doesn't work for me. The only way I can get, for example, a playback from cursor position in the sample editor--is to manually click on the little green play icon with the mouse. Same with the bin, loops, and so on.
    For many years I've had key commands to do this kind of thing, but it is broken for me since Logic 8. What is the key command for this called? I've tried disabling the space bar as a key command, and I've also tried re-enabling it for "play or stop". Although in the latter case, that should still function the way it does in the arrange window.
    Actually, I've tried a lot of things and I'm completely out of ideas.
    I posted on this subject several months ago and it remains unresolved. For the life of me I cannot get the audition button to work via any key command.
    Help?
    TIA
    Message was edited by: danseq

    Hi
    If you imported your key commands from version 7 there can be problems in version 8.
    Try using one of the key command presets from version 8.
    HTH
    CCT

  • What is the powershell command to get the user count in Active Directory

    What is the powershell command to get the user count in Active Directory

    Get-ADuser
    REF: http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/30/powertip-single-line-powershell-command-to-list-all-users-in-an-ou.aspx
    This post is provided AS IS with no warranties or guarantees, and confers no rights.
    ~~~
    Questo post non fornisce garanzie e non conferisce diritti

Maybe you are looking for