Use files based on a date/time stamp in order

I have a PL/SQL procedure that is using BFILE to pick-up and read a file. The file will have the same starting characters for every file followed by a date/time stamp: AAAA_09232009
I need my procedure to use the file with the oldest date first and then rename the file after the procedure has run through it. Can anyone assist me in this? Below is the beginning of the procedure --Thanx in Advance:
create or replace PROCEDURE XML_READ_FILE
as
v_bfile BFILE := BFILENAME('XML_DIR', 'AAAA_09232009.xml');
v_clob CLOB;
BEGIN
DBMS_LOB.createtemporary(v_clob, TRUE);
DBMS_LOB.OPEN(v_bfile, DBMS_LOB.lob_readonly);
DBMS_LOB.loadfromfile(v_clob, v_bfile, DBMS_LOB.lobmaxsize);

See if this helps:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584

Similar Messages

  • Export Waveform Chart Plots data to spreadsheet file based on X scale (Time Stamp) min and Max Value

    Hi All,
    Query 1:I am trying to export the Chart data(Total plots 6 ) only between the X scale Min Time and Max time limit .
    But couldnt able to achieve that progammtically.
    is their anyway to achieve this.
    Query 2:Also ,In chart their is an  right click option to export data to excel,but when using this option the data get exported in its own temporary name(iv*****.tmp),i dont want this to happen.Instead the data expored using that option should be written in a file specified by me(everyting should happen in backend)
    pls suggest the best solution for above 2 queries.
    Thanks,
    Selvan.

    Hi selvan,
    1) read the chart history (or better keep a history in your own shift register) and limit the data to the XMin and XMax values (read all those chart settings from its properties). Then save the data using WriteToSpreadsheetFile…
    2) The right-click option is as it is. When you need different behaviour you need to program your own routine. Once you finished query 1 it will be no problem anymore to also solve query 2…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • FileMonitor issue for date time stamp change.

    Hi I have an app that runs with a minor issue and I am looking for some insight for a workaround or code change.
    I have a File Monitor that checks a specific directory every second.
    Users send a batch run to this directory throughout the day. There are two types of files, .ZIPs and .DONEs.
    So for each .ZIP a .DONE is sent to notify the app it can begin to process the file.
    Here is what I receive
    /elements/process/File1.ZIP     Oct 15 08:19
    /elements/process/File1.DONE     Oct 15 08:19
    The problem I am encountering is sometimes the .DONE and. ZIP are sent and the date time stamp of both files are the same so when the monitor reads the directory it looks like there is no change so both files sit in the directory and do not process. To make this work, I usually go in and touch a file to change the date time stamp.
    This is a java app that runs on an AIX box.
    Here is my code, is there anything any once can suggest to help me out. Thanks in advance.
       * Subclass of FileMonitor, Handles the timer event
       * @param none
      private class FileMonitorNotifier extends TimerTask
        public void run()
          // Loop over the registered files and see which have changed.
          // Uses the Modifed DateTimeStamp to determine if there was a change.
          // Use a copy of the list in case listener wants to alter the
          // list within its fileChanged method.
            try
                Collection files = new ArrayList (hmFiles.keySet());
                for (Iterator i = files.iterator(); i.hasNext(); )
                    File file = (File) i.next();
                    long lastModifiedTime = ((Long) hmFiles.get (file)).longValue();
                    long newModifiedTime  = file.exists() ? file.lastModified() : -1;
                    //      Check if file has changed
                    if (newModifiedTime != lastModifiedTime)
                        //      Register new modified time
                        hmFiles.put(file, new Long (newModifiedTime));
                        // Notify listeners
                        for (Iterator j = colListeners.iterator(); j.hasNext(); )
                            WeakReference reference = (WeakReference) j.next();
                            FileListener listener = (FileListener) reference.get();
                            // Remove from list if the back-end object has been GC'd
                            if (listener == null)
                                j.remove();
                            else
                                listener.fileChanged (file);
            catch(Exception ex)
                 m_odLaunch.logError(OdIntegrationConstants.ERROR_LEVEL_MIDLEVEL, ex);
         }

    Yes, I guess you are right, I don't care what time each file came, as long as I have both I can being to unzip and process and delete the .DONE.
    The code itself was based on if a filechanged then do work.... I could just take this out. Thanks!
    * This is the main entry point when there is a change to the modified date/time
    *  of the monitor directory
    * @param file directory we are monitoring
         public void fileChanged (File file)
              StringBuffer sbMessage;
              try
                   sbMessage = new StringBuffer();
                   //Make sure this is a Directory
                   if(file.isDirectory())
                        //Return list of files with extension we are looking for
                        File[] arFiles = file.listFiles((FilenameFilter)new FileSuffixMonitor(m_odLauncher));
                        for(int i=0;i < arFiles.length;i++)
                             sbMessage.append("Found file association to move-" );
                             sbMessage.append(arFiles.toString());
                             m_odLauncher.logInstance(sbMessage.toString());
                             processMoveFile(arFiles[i]);
              catch(Exception ex)
              sbMessage = null;

  • Update file date/time stamp using java

    Let me explain you what I am going through:-
    I have created a java based installer using Jexpress tool and after I do the installation of my files, the files takes the current date rather then taking the date when it was created or modified.
    Everything goes into JAR and I heard that Jar file do not retain the date/time stamp of the file.
    I would like to know if we can change the date and time stamp of the files using Java.
    Is there any method to do that or can we do this by writing the java class?
    Thank You
    Mehul

    Did you check it?
    I did.
    $ jar cvf ~/ui *.m3u
    added manifest
    adding: Amollhgv.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand1.m3u(in = 56) (out= 27)(deflated 51%)
    adding: Brand2.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand3.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand4.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand5.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand6.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Edurhgv.m3u(in = 42) (out= 24)(deflated 42%)
    $ unzip -l ~/ui
    Archive:  /home/ijbalazs/ui
      Length     Date   Time    Name
            0  12-04-03 17:53   META-INF/
           71  12-04-03 17:53   META-INF/MANIFEST.MF
           42  08-26-02 01:03   Amollhgv.m3u
           56  11-22-98 01:15   Brand1.m3u
           42  08-26-02 01:04   Brand2.m3u
           42  08-26-02 01:04   Brand3.m3u
           42  08-26-02 01:04   Brand4.m3u
           42  08-26-02 01:04   Brand5.m3u
           42  08-26-02 01:04   Brand6.m3u
           42  08-26-02 01:04   Edurhgv.m3u
          421                   10 files

  • Save the file and give date & time stamp

    1. Reading the Excel file from the selection screen as a parameter.
    2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into
        Internal table.
    3. Implementing the Business Logic.
    4. Move output to Final Internal table.
    5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.
    6. That flat file should be saved with the name and location given in the Excel.
    7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.
    Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.
    Eg:
    PERSONAL Numbers              Name                                         Location
    00000001                 xxxxx-24.04.2007-10.30          C:\        
    00000002                 xxxxx-24.04.2007-10.35
    00000003                 xxxxx-25.04.2007-10.40
    00000004                                  xxxxx-25.04.2007-10.30
    Can any one help me how to save the file and give date & time stamp through hardcode?
    please help me in this issue.

    I am not clear with your problem. Based on the understanding of your question,
    there  can be two cases.
    1- U want to insert time stamp in the output file.
    2- Time stamp is already there, u just have to solve the overwriting issue.
    If your question goes with option 2, You can make use of import parameters
    <b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.
    <b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.
    Please inform if the issue is not resolved.
    Message was edited by:
            BINU RAJ BINU

  • How do you vary the Date/Time stamp format in File Adapters

    In the receiver channel of the File Adapter where you specify the 'File Name Scheme', you do have the option of specifying a 'File Construction Mode' of 'Add Time Stamp'.  How can you specify a different Date/Time stamp format ( eg MM/DD/YY vs YYYYMMDD vs MMDDYY, etc. ) without changing the Date/Time stamp for the entire SAP system?  Also, can you control where the Date/Time stamp appears in the filename?

    Hi,
    There are many threads discussing the same issue. Go thro the following:
    Dynamic file name (Date) in Receiver File Adapter
    Receiver File Adapter - TimeStamp
    Bhavesh's reply in above thread:
    You can use Adapter Specific Identifiers and then change the file name in the mapping. Append the tiem stamp in the format that you want and so on.
    Just use this code in an UDF,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = conf.get(key);
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    dateformat.format( new java.util.Date() );
    String newfilename=SourceFileName+dateformat;
    // change to new file name
    conf.put(key, newfilename);
    return "";
    Regards,
    P.Venkat

  • Need to add date/time stamp to file name without time change creating new files

    We have setup our application to save data once a trigger event occurs. We also need the date/time stamp as part of the file name. We used Format Date/Time String and concatenated it into the file name. It all works good, but as the time changes (seconds, minutes, etc.) it causes the Write to File to create a new file with the new filename. Is there a way to create the file and save/latch/buffer the time in the file name so that it doesn't create a new file for every second?
    I've attached a shot of the relevant part of our VI. It's all in a big while loop. The data save is in a case/switch so that when it is triggered it starts saving. (The for loop is to split the data up
    into 4 different files). Like I said, it all works except new files are created every second as the time changes instead of just putting it all in one file with the initial time in the file name.
    Attachments:
    TimeInFileNameQuestion.jpg ‏46 KB

    I need a loop in order to use a shift register. I cannot stop the outer while loop (because it would stop the hardware from collecting data), and I cannot add loops inside which bogs down the processor to where the app stops. I've attached a simpler version of my VI which illustrates the problem. While the button is pressed (the trigger) it should save the data (in this case just cycle numbers) into one file with the initial date/time. But, you can see that it creates 1 file/second. I tried using shift registers, but without adding extra loops I can't see how to do it. Thanks
    Attachments:
    FileNameTest.vi ‏29 KB

  • Need to change Date/Time stamp on jpeg file

    I combine images into panoramas using PTGUI. The problem is that the output image file is date stamped as the time that I created the image. I really want the date/time stamp to be the same as the images that go into the panorama. I cannot find a way in LR to change this.
    Lee

    > By the way, Victoria, should you be promoting your url here? It belongs in your profile. It's in the forum rules somewhere and others have been picked up on it before.
    >
    > Joe
    Oh, thanks Joe, I'll change that then. I did go looking for forum
    rules, but couldn't find any!
    Victoria

  • The export file from a calc script - naming and date/time stamp

    Here is a simple calc script to export data.
    2 questions:
    1. Is there an easy way to add a date/time stamp on the name of the data file so that it does not overwrite the older ones every time?
    2. I tried to specify the path so that it write to another server. "\\mfldappp011\E:\Exp_AW.txt". It's not working. How should I specify the path ?
    Fix (@Relative("Yeartotal",0),"Actual","Working",&ActualYear);
    Dataexport "file" "," "C:\Exp_AW.txt" "#MI";
    EndFix;
    Edited by: user9959627 on Sep 7, 2012 11:25 AM

    Probably easiest to call the maxl script from a command line script, then rename the exported file to include the tme stamp and copy/move it to a location.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Retaining date/time stamp when copying files from a backup network drive

    How do I retain the date/time stamp when copying files from a backup such as a external drive or a network drive?

    i don't trust MA at all. known to create a lot of problems.
    instead, see the green box in this user tip.

  • How to print date & time stamp on photos?

    How to print date & time stamp on photos?

    Three methods:
    File>process multiple files>labels. Be sure to uncheck "same as source", or the originals will be overwritten. It is best to work on duplicate files, esp. while learning.
    Use the horizontal or vertical type tool to add the information manually to each picture file
    If the same information is to be applied to several pictures, e.g. a copyright notice, use  of a brush made in PSE is very efficient

  • PTP camera - how to retain date/time stamp on photos [Gnome]

    I have a USB PTP Camera that comes up in Nautilus under "gphoto2://[usb:001,007]/DCIM"  I can copy/paste the photos off the thing to ~ but the date/time stamp gets changed to the present.  How can I copy them over retaining the original date/time stamp?

    By using the exif info I suppose.
    http://linux.die.net/man/1/exiv2
    -t
        Set the file timestamp according to the Exif create timestamp in addition to renaming the file (overrides -k). This option is only used with the 'rename' action.
    Last edited by karol (2010-07-22 22:13:26)

  • Add Date/Time Stamp to Timecode Effect

    The Timecode effect of CS5 Premiere Pro is a very useful feature. However, it is missing a Date/Time Stamp. I would encourage everyone to submit a feature request for this. I have enclosed one I submitted. You can cut and paste it into the Feature Request Submission Form.
    Feature Request Submission Form
    Feature Request: Add Date / Time Stamp to Timecode Effect
    The Timecode effect of CS5 Premiere Pro is a very useful feature. However, the Timecode effect is missing the ability to also display the Date/Time Stamp from Premiere captured video. This is a very important feature to include. Many videographers are archiving their miniDV tapes as AVI files since disk prices have become affordable. When I retrieve archived AVI files, I often need to look at the Date/Time Stamp, but unfortunately, Premiere does not offer that ability.
    I would encourage you to add Date/Time Stamp capability to the Timecode effect so timecode, date, and time could be displayed all at once, or selectively picked via checkboxes.
    Others in the Premiere forum have requested this capability.
    Date / Time Stamp - Premiere CS4
    http://forums.adobe.com/message/2564766
    Hopefully, you could add this as an update to CS5. And hopefully, as soon as possible. Thanks

    I am fairly new to Adobe CS6 however I have to totally disagree with some of the replies here on this subject. The package cost me well over £1200 and I expect a say in improving it along the way if I am to progress on to CS Cloud. The suggestion that engineers could spend their time elswere is total rubbish,its what they are well paid for..to listen to consumers suggestions and act on them (I am paying for their time).  I would for one love to see the simple add in plug where the original date/time code could be added and burned into the video timeline. It is obvously not something needed by all but for some it could be essential. For my work I entirely rely on the original date/time code to be visible and burned in. My work is editing surveilance video and I also have to pixellate all faces of young persons so the addition of a date and time code plug in is something I would like to see in After Effects and Premier. Adobe add hundreds of filters/plug-ins that nobody in the world are likely to ever see or use or even asked for, so I cant't see why it would be a big task for them to include it in CS6 or Cloud for the future, especially as many ask for it.
    On the suggestion of DVMPro, yes this is an excellent package which I already use along with vATS (which is quicker),  however the big downside for both these programmes is they do not combine the clips so if I put in 60. mts clips I will get  out 60 clips of what ever format I picked (limited to AVI/Wmv/AVCHD). You would then need combine and re-render the clips or work along the timeline with lots of clips (obviously not in AE as it wont combine clips along one layer....at least I cant see a way to do it (no doubt will be flamed on that one)
    Sony vegas 11 also does not have the capability neither to add and burn in the original timecode however there is an excellent and tiny .dll third party extension called SVDTS that will add the original time/date/seconds to the timeline and burn in to the video. My point on this comparison is that it would not take a lot of time and work for a capable Adobe enineer to develop and implement such a plug in.
    A crude way and free to actually achieve this is to use Freemake Video Converter, add all  your .mts (or what ever format they are so long as its original), turn on the Subtitle 1 option for each clip (no batch turn on Im afraid) and chose to join the clips for output to what ever file format you choose. The original timecode and date will be on your output video clip, not as pretty as DVMPro or vAts but is there and accurate.

  • LG Octane Camera Date/Time Stamp Issues

    The pics I take with my LG Octane are designated a number associated with the date/time the pic was taken (ex 0401121345, would be April 1, 2012 at 145pm). When I transfer the pics from my phones memory card to my computer and open the pics, I can see the pics info (date/time) and everything seems correct.
    The problem comes in when I load my pics onto a website that verifies the pics date/time thru the digital encoding on the pics file. (Digital Pics are encoded with date/time stamps that can be recognized with computer software). This website rejects my submitted pics from my LG Octane because this encoding is either not there or not set correctly. I had no issue previously when using my Samsung env last year. Please Help!

    I take it you are noticing that the photo shows in your gallery with the correct time for the name. But, when you look at the photos on your computer it is showing a time so many hours off (ie. phone shows 12:00 and computer shows 4:00). What it is actually doing is time stamping it for GMT for some reason.  This has been a problem for as long as I know. I have not found an answer and have come to believe there is not a way of changing the time/date stamp on the phone. I have not even found an app for it.
    Sorry I don't have an answer. But, maybe some one else will.

  • Date/Time stamp in CS4?

    Can Premiere Pro CS4 do a date/time stamp on AVCHD video?
    Im using a Canon HF20 and i know the data is there to be used in a .mpl file i believe.
    Thanks

    Howard,
    I'm pretty sure no plugins have come available since you asked about a similar function a couple of days ago. However, you can combine the CSV export from DVMP with the process I outlined in that thread.
    I'm not sure what sort of time divisions that DVMP will export (ie. by frame, by second, etc.), but you would be able to adjust the duration of your titles in PPro to build a running counter, for example.

Maybe you are looking for