FILE NAMING IN RUNTIME in scheduler/plsql code in 102g. please help, thankU

Hi,
we have a scheduler job which calls/executes a stored procedure that generates a report file. however we need to give file name run at run time and need to copy it to shared folder. we do not want use any shell scripts here and like to complete this work with either PLSQL block or scheduler job. please suggest us how we can specify file name at each run time that differs hour wise.
the procedure code for example is: failure: not getting file name correctly
DECLARE
dtime VARCHAR2(11):=to_Char(sysdate,'YYYYMMDD_HH24');
F1 UTL_FILE.FILE_TYPE;
BEGIN
F1 := UTL_FILE.FOPEN('DIR_REPORTS','REP_''dtime''.txt','W',32767);
UTL_FILE.PUT_LINE(F1,' Data');
UTL_FILE.FFLUSH (F1);
UTL_FILE.NEW_LINE(F1);
end;
please give us your help on nameing file at runtime .. filename_yyyymmdd_hh24.txt.
thanks in advance.
/mr

F1 := UTL_FILE.FOPEN('DIR_REPORTS','REP_'||dtime||'.txt','W',32767);
line giving
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at line 5
errors. earlier i was able to generate files earlier but not with suggested change.. anything to be done more???
thank you .. please assist..

Similar Messages

  • This small and simple file doesn't compile .......please help

    Iam trying to complie this file but it gives error while compiling ....please help
    I wanted to generate this error message in my log file and wanted to see how the error message looks like ....that is why iam forcefully throwing en exception .....but the file is not compliling.
    HERE IS THE FILE .....
    package myemailutils;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    * Class BeaSendMail
    * @author Shailesh Sharma
    * @version
    public class BeaSendMail
    public BeaSendMail() {}
         private String successMessage = "";
         public void sendMail(String msgSubject, String msgTxt, String currentEmailAddr, String targetEmailAddr, String targetCc, String targetBcc) throws Exception
         Message msg;
         try{
    // lookup mail session in JNDI
    InitialContext context = new InitialContext();
    Session session = (Session) context.lookup("BibleMailSession");
    // set message
    msg = new MimeMessage(session);
         try {
    // set message with to, subject, and message text
    msg.setFrom(new InternetAddress(currentEmailAddr));
    msg.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse(targetEmailAddr, false));
         msg.setRecipients(Message.RecipientType.CC,
    InternetAddress.parse(targetCc, false));
    msg.setRecipients(Message.RecipientType.BCC,
    InternetAddress.parse(targetBcc, false));
    msg.setSubject(msgSubject);
    msg.setSentDate(new Date());
    msg.setText(msgTxt);
              throw new Exception();
         // send message
    Transport.send(msg);
    successMessage = "Message sucessfully sent.";
    session = null;
    } catch (Exception e) {
                        try {
                             // override mail session properties
                             Properties mailProps = new Properties();
                             mailProps.put("mail.transport.protocol", "smtp");
                             mailProps.put("mail.host", "smtprelay2.aici.com");
                             mailProps.put("mail.user", "Anthem Help Desk");
                             // mailProps.put("mail.from", "[email protected]");
                             mailProps.put("mail.debug", "true");
                             mailProps.put("mail.smtp.auth", "true");
                             // set message with to, subject, and message text
                             msg.setFrom(new InternetAddress(currentEmailAddr));
                             msg.setRecipients(Message.RecipientType.TO,
                                                      InternetAddress.parse(targetEmailAddr, false));
                             msg.setRecipients(Message.RecipientType.CC,
                                                      InternetAddress.parse(targetCc, false));
                             msg.setRecipients(Message.RecipientType.BCC,
                                                      InternetAddress.parse(targetBcc, false));
                             msg.setSubject(msgSubject);
                             msg.setSentDate(new Date());
                             msg.setText(msgTxt);
                             throw new Exception();
                             // send message
                             Transport.send(msg);
                             successMessage = "Message sucessfully sent.";
                             session = null;
                        } catch (Exception ex) {
    // successMessage = ex.getMessage();
    // Reporter.easyReport(ReportType.DEBUG, "Error while sending mail to " +
    System.out.println("Error while sending BeaSendMail weblogic mail to " +
    // System.getProperty(MWEProperties.SMTPServer1) + ": " + ex.getMessage());
    ex.getMessage());
         } catch (Exception exc) {
    // successMessage = "Problem Looking up... " + exc.getMessage();
    // Reporter.easyReport(ReportType.DEBUG, "Error while sending mail to " +
    System.out.println("Error while Looking up JNDI NAME in BeaSendMail mail " +
    // System.getProperty(MWEProperties.SMTPServer1) + ": " + ex.getMessage());
    exc.getMessage());
    }//end sendMail
    }

    yes i have changed the code ....but now it is giving some error saying Authentication Failed ...the exact error is :
    Error while sending BeaSendMail weblogic mail to Sending failed;
    nested exception is:
         javax.mail.AuthenticationFailedException
    Iam using somethin like ...
    } catch (Exception e) {
    InitialContext contextnext = new InitialContext();
    InitialContext contextnext = new InitialContext();
    Session sessionnext = (Session) contextnext.lookup("BibleMailSession");
    Properties mailProps = new Properties();
    mailProps.put("mail.host", "smtprelay2.aici.com");
    // i think the following gives an error with some AUTHENTICATION
    Session authSession = sessionnext.getInstance(mailProps);
    msgnext = new MimeMessage(authSession);
    // set message with to, subject, and message text and send it ...

  • When I download the digital copy of the Hunger Games, it stops at 4.0GB and first returns an error code -1309 and then the code -50. Please help me complete the download.

    When I download the digital copy of the Hunger Games, it stops at 4.0GB and first returns an error code -1309 and then the code -50. Please help me complete the download. I have tried removing the .tmp folder and downloading it again, but each time it stops the download in the same place.

    I discovered the solution. The external drive I was saving it to was formatted as FAT32. In that format, the largest files can only be 4GB, which explains why it kept stopping at 4GB. I backed up all the files then reformatted it as Mac OS Extended (Journaled), this is possible since I am on an iMac.

  • HT4796 I have made a file using the Pages app.I mailed it to a friend.When she tried opening the same file on her pc at home , It did not open.Please help me as to how to open the file in the Microsoft word format on her pc.

    I have made a file using the Pages app.I mailed it to a friend.When she tried opening the same file on her pc at home , It did not open.Please help me as to how to open the file in the Microsoft word format on her pc.

    Send it as a PDF.

  • My compouter (PC) no longer recognizes my ipod (4th gen), it "sees" an unknowndevice and gives me error code 43.  Please help.

    My compouter (PC) no longer recognizes my ipod (4th gen), it "sees" an unknowndevice and gives me error code 43.  Please help.

    Check for hardware issues
    Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the alert when you update or restore, contact Apple support.
    Common errors: 1, 10-47, 1002, 1011, 1012, 1014, 1000-1020.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

  • I have a wd my passport which for the last year i was using with my windows pc...but recently i bought a macbook and was trying too put files on it but it wouldnt work....please help!!!

    i have a wd my passport which for the last year i was using with my windows pc...but recently i bought a macbook and was trying too put files on it but it wouldnt work....please help!!!

    Hi
    You need to find the format of the drive by looking at its info, my guess would be you are currently in NTFS (windows only) mac can use any mac os journaled or non journaled, or you can use fat32 which is usable on both pc and mac but is unable to move files over 4GB so no good for large file transfers. You will need to re format at some point but this will delete everything currently on the drive.
    Hope this helps

  • I received a replacement iPad. On my original iPad I had dozens of books and PDF's. I completely backed up my original iPad. The categories of my iBook files transferred but NOT the actual PDF and Books. Please help.

    I received a replacement iPad. On my original iPad I had dozens of books and PDF's. I completely backed up my original iPad. The categories of my iBook files transferred but NOT the actual PDF and Books. Please help.

    Are the PDFs and ibooks on your computer's iTunes ? If so then you should be able to re-sync them, if not then you can re-download ibooks for free as long as they are still available in the store and you use the same iTunes account as you originally used to buy them : http://support.apple.com/kb/HT2519 . The backup doesn't contain the contents of the ibooks app, so for them to be restored to the device they needed to be in your iTunes library.

  • Hello, i have a problem with this number code  213:19,  please help me!

    Hello, i have a problem with this number code  213:19,  please help me!

    dan
    What version of Premiere Elements and on what computer operating system is it running?
    If you are using Premiere Elements 13, have you updated it to 13.1 yet? If not, please do so using an opened project's Help Menu/Updates.
    What type of user account are you using....local administrator or domain type?
    Please review the following Adobe document on the 213.19 issue. Have you read that already?
    Error 213:19 | Problem has occurred with the licensing of this product
    ATR

  • I am having trouble printing I have a connection to my printer wirelessly but does not print out the correct page I want.When I do print I get a bunch of pages more than is needed and also get a code and symbols please help I am jammed at work

    I am having trouble printing I have a connection to my printer wirelessly but does not print out the correct page I want.When I do print I get a bunch of pages more than is needed and also get a code and symbols please help I am jammed at work

    This can be the result of selecting the wrong driver. An older, unsupported laser printer will sometimes work with the generic Postscript driver.

  • I need to unlock compaq mini code is CNU027599F, please help

    i need to unlock compaq mini code is CNU027599F, please help
    This question was solved.
    View Solution.

    Ash try.
    e9l17xqoo8
    3rd letter lowercase L.
    4th is number 1.
    7th letter lowercase Q.
    8th and 9th letter lowercase O.
    Use that code to go into the BIOS.
    Disable all passwords that are enabled.
    IF asked for the CURRENT password use that code.
    IF asked for NEW password just hit enter.
    If asked to VERIFY password just hit enter.
    Save and exit.
    REO
    I must inform you that these services are not endorsed by HP, and that HP is not responsible for any damage that may arise to your system by using these services. Please be aware that you do this at your own risk.
    HP Expert Tester "Now testing HP Pavilion 15t i3-4030U Win8.1, 6GB RAM and 750GB HDD"
    Loaner Program”HP Split 13 x2 13r010dx i3-4012Y Win8.1, 4GB RAM and 500GB Hybrid HDD”
    Microsoft Registered Refurbisher
    Registered Microsoft Partner
    Apple Certified Macintosh Technician Certification in progress.

  • I get a lock bios code of 60293385 please help

    i get a lock bios code of 60293385 please help some times it is was a 5###### somthing?

    Post most recent code here:
    http://bios-pw.org/
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • How to write a file in unix server through oracle plsql code

    Hi All,
    My requirement is to create and write a file (any file for eg txt file) in unix box with in a specified directory through oracle plsql code.
    Oracle sits in windows server.
    using utl_file package we can create directory where oracle resides and write it there in oracle server in our case windows..
    But here we need to create,write a file but in unix server which is different server than where the oracle server resides..
    we are using Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    Can any one one please help me out in this issue...
    Thanks in Advance.
    Prakash

    Mr Prakash,
    Why are you asking this question multiple times in every forum you can spell?
    Valid responses have been presented to you already two times.
    Can you explain why you can't follow them up, but continue to abuse this forum by repeating doc questions?
    Sybrand Bakker
    Senior Oracle DBA

  • HTMLB Code not working Please help.....

    Hello All,
    Ive new in HTMLB. Have written this code wherein a JSP page is called from a JSPDynPage file. But am <b>not getting any output. Its all blank.</b> Dunno if im going wrong .... Please help.
    Struggling with this since y'day.
    <b>CODE</b>:
    <u><b>UserInfoDynPage.java</b></u>
    package com.sap.sample;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class UserInfoDynPage extends PageProcessorComponent
    {     public DynPage getPage()
         {     return new UserInfoDynPageDynPage();
           public static class UserInfoDynPageDynPage extends JSPDynPage
           {     //private UserInfoBean UserInfoBean = null;
             public void doInitialization()
             {          IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                       IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
                    /*Object o = componentSession.getValue("UserInfoBean");
                    if(o==null || !(o instanceof UserInfoBean))
                    {     UserInfoBean = new UserInfoBean();
                      componentSession.putValue("UserInfoBean",UserInfoBean);
                    else
                    {     UserInfoBean = (UserInfoBean) o;
                    // fill your bean with data here...
        public void doProcessAfterInput() throws PageException
        public void doProcessBeforeOutput() throws PageException
        {     this.setJspName("UserInfo.jsp");
    <u><b>UserInfo.jsp</b></u>
    <%@ taglib uri="tagLib" prefix="hjb" %>
    <hbj:content id="myContext" >
         <hbj:page title="UserInfo Page">
            <hbj:form id="myFormId" >
                 <hbj:textView id="title" text="Search Screen" design="STANDARD" />
                 <table>
                      <tr>
                           <td>
                                <hbj:label id:"lb_Search" text"Search For" labelFor="search" />
                           </td>
                           <td>
                                <hbj:inputField id="search" type="string" maxlength="25" />
                           </td>
                      </tr>
                      <tr>
                           <td>
                                <hbj:label id="lb_SearchType" text="Search Type" labelFor="searchType" />
                           </td>
                           <td>
                                <hbj:dropdownListBox id="SearchType" tooltip="UME Object  to search for" disabled="false">
                                     <hbj:listBoxItem key="user" value="User" />
                                     <hbj:listBoxItem key="group" value="Group" />
                                     <hbj:listBoxItem key="role" value="Role" />
                                </hbj:dropdownListBox>
                           </td>
                      </tr>
                 </table>
                 <br>
                 <hbj:button id="submit" text"search!" tooltip="Click me to search" disabled="false" design="emphasized" />
                 <br>
                 <br>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <u><b>Portalapp.xml</b></u>
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="UserInfoDynPage">
          <component-config>
            <property name="ClassName" value="com.sap.sample.UserInfoDynPage"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/UserInfo.jsp"/>
          </component-config>
          <component-profile>
               <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>     
        </component>
      </components>
      <services/>
    </application>
    =============
    Please help.
    Awaiting Reply.
    Thanks,
    Uday
    Message was edited by: Uday Hardikar

    Hi BHI,
    Thank you for your input.
    Had made silly mistake and got solved.
    And now, I have another problem which is related to this same program but the error seems to be a different one.
    Have posted another query:
    Error in HTMLB program..Please help..Urgent OR Error in HTMLB program..Please help..Urgent
    Please help me as its kinda urgent.
    Thanks in advance.
    Uday

  • Quartz Scheduled Application not working. Please help...

    Hi All,
    I have deployed a WAR file which has implemented Quartz Scheduler to run a job.
    There were no errors in the whitelist scan, but while deploying I found an error in the server log as shown below
    "BEA-000903 [Net]" "Incident Error"
    I could not make out what the error was, but I am using a listener class to run the scheduler as below in my web.xml.
    <listener>
      <listener-class>com.crmit.scheduler.QuartzSchedulerListener</listener-class>
    </listener>
    Can anyone please advice??
    Regards,
    Abhishek

    Can you please check your service logs to see what errors are reported in the logs. The Logs can be accessed using Java Service Console,
    Please refer Administering Oracle Java Cloud Service - Release 13.1

Maybe you are looking for

  • How to let the user select from more then 1 data templet file to fillin a field

    help i have a form the has 5 free form text fields that i need to select from a list of texts to fill it in and then allow the user to add to the data. thanks

  • Videos not recognised after updating software

    My iPod won't sync my videos. This is for all video files (.mov, .mpv, the lot). They played fine on my video iPod before and they still play in iTunes, but when I try to update, I just get a "file not recognised by your iPod" message. This only happ

  • Urgent help with an exception !!

    Hi I Use a java class to calculate some data. This java class is called from a jsp page and first I create a Object from the class (and the constructor method is been called). In this constructor I recive (from the jsp page) a String[][] and other di

  • Converting 32bit binary to float

    hi again, is there a simple method for converting a string representation of a 32-bit binary value into its corresponding floating point value? e.g. string s = "01000001110011100001010001111011" thanks in advance

  • ALTER TABLE command with owner does not work

    I performed the following statement in a SQLplus script where the variables were filled some lines before: alter table '&ownername||'.'||&tablename' move online tablespace '&tablespacename'; However this does not work. I am getting: ERROR at line 1: