File Exists? .. Forms6i

Hi,
How to check only the existence of a file through Forms6i ? I have tried giving the full path using WIN_API_UTILITY , but could not penetrate. I can execute the .exe file of other terminal if the file exists on the specified path, but could not check whether file exists or not.
Pl. Help me at your earliest.
Bye
koushik.

Hi Kaushik,
Here is the code for the same.
HTH.
REgds,
Bhavesh
DECLARE
CURSOR cur_date IS
SELECT TO_CHAR(SYSDATE,'DDMMRR')
FROM DUAL;
var_date VARCHAR2(200);
var_dir VARCHAR2(200);
in_file Text_IO.File_Type;
out_file Text_IO.File_Type;
BEGIN
OPEN cur_date;
FETCH cur_date INTO var_date;
CLOSE cur_date ;
var_dir := 'D:\Print\'| |var_date| |:emp.empno| |'.txt';
in_file := Text_IO.Fopen(var_dir, 'r');
IF Text_IO.Is_Open(in_file) THEN
MESSAGE('FILE Already Exist, Create a new file......');PAUSE;
var_dir := 'D:\Print\'| |var_date| |:emp.empno | |'1'| |'.txt';
out_file := TEXT_IO.FOPEN(var_dir, 'w');
MESSAGE('FILE Cerated......');PAUSE;
END IF;
--TEXT_IO.FCLOSE(out_file);
EXCEPTION
--WHEN NO_DATA_FOUND THEN
--TEXT_IO.FCLOSE(out_file);
WHEN OTHERS THEN
MESSAGE('File Does not Exist');PAUSE;
MESSAGE('Generating File For '| |var_dir);PAUSE;
out_file := TEXT_IO.FOPEN(var_dir, 'w');
MESSAGE('File Created..........');PAUSE;
END;
null

Similar Messages

  • Open the pdf file from forms6i

    Hi,
    how to open the pdf file from forms6i.
    can anyone help me regarding this.
    Thanks,
    Ansaf.

    Hi,
    The HOST built-in does not return any error or message back to the Form.
    You will have to use some other means to first find out whether the file exists or not. E.g. you could use TEXT_IO.FOPEN to open the file in Read mode. If the files is not found the handle returned will be null, and that will be condition you have to process to show a message or pop an alert.
    Make sure you close the file with FCLOSE, irrespective of whether the file is found or not, before you open the File for viewing.
    Regards,

  • How to check if a specific file exist and which exit code to use ?

    Hi, First I'm not a scripting guy and I know almost nothing about VB scripting.
    I have a deployment of 6 tasks and I want to make sure that step # 2 will not be process if it failed in step #1, and so on for the 6 task.
    To do this, i have to run a vb script before installation or uninstalltion on each steps
    I'm trying to use a script (not from me) that i have modified for pre-uninstallation of software and also post-installation of the software.
    Pre-uninstallation: The script will look if the specified "exe" exist on the server and if so, than it will run the msiuninstall "application_name".
    If the uninstallation is successful, the post-installation script will check if the "exe" file exist again on the server, and it shouldn't find it (because it was deleted from the uninstallation), than it will return an exit code of successful
    to run the next process.
    Here an example:
    Step 1: Uninstall "Software#1" with msiuninstall Software#1.exe command
    Step 2: Uninstall "Software#2" with msiuninstall Software#2.exe command
    Step 3: Install "Software #3"with an .exe extension
    Step 4: Re install "Software #2" with an .msi extension
    Step 5: Re install "Software #1" with a .msi extension.
    Step 6: Send email to confirm the deployment is successful
    So i need to validate that step #2 will not process step #3 if it failled on # 2. It need to validate if the file exist before and after.
    At the end, Step 6 should send an email to confirm that the 6 steps of the deployment was completed without errors.
    Any idea how to do it ?
    Many many thanks for all the help !
    A desperate guy :)
    This is what i have
    'This script will look if an .exe file exist for a specific application.
    '=============================================================================================
    path = WScript.Arguments.Item(0)
    set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FileExists(C:\Inetpub\wwwroot\Enterprise\EnterpriseWS\web.config) = true then
        exitCode = 0
    else
        exitCode = 1
    End If
    Wscript.Quit exitCode

    Since you are not a scripting guy here is a very good place to start:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    ¯\_(ツ)_/¯

  • File exist/file not exist

    OK, i create a directory i have read/write permissions on the directory, but still even if the file exists its bringing back the result as if it doesnt i need help with this...
    set serveroutput on
    DECLARE
    fexists    BOOLEAN;
    flen  NUMBER;
    bsize NUMBER;
    BEGIN
    sys.utl_file.fgetattr('TMP_LOCATION', 'test.txt', fexists, flen, bsize);
      IF fexists THEN
        dbms_output.put_line('File Exists');
      ELSE
        dbms_output.put_line('File Does Not Exist');
      END IF;
      dbms_output.put_line('File Length: ' || TO_CHAR(flen));
      dbms_output.put_line('Block Size: ' || TO_CHAR(bsize));
    END fgetattr;
    File Does Not Existmy directory.. CREATE or replace DIRECTORY tmp_location AS 'Server-1\configsheets\completed\pdf approved'

    Good afternoon,
    If you are loooking at a mapped drive, you can only see it if you change how the Oracle services start. You need to have them start with a specific user ID rather than starting as system services. The problem is that the system services cannot see mapped drives.
    So, do this:
    <li>Create a user to be used by Oracle services. Make sure they have the correct rights (I gave mine Server ADMIN so as to have all the access I needed)
    <li>Log into the server and modify the services
    <li>Click the 'Log On' tab and enter the account and password you created for the Oracle Processes
    <li>Reboot the server, allowing the Oracle services to log in with this new ID.
    This should then fix your problem.
    Thanks,
    Don.
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! :)

  • Server Error in '/Report Manager' Application: System.IO.IOException: The file exists. When trying to export a completed report.

    I am using SQL Server 2005.  I run a report which runs and renders perfectly. But I am unable to export it into any format. It fails with the following error:
    Server Error in '/Reports' Application. 
    The file exists.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.IO.IOException: The file exists.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [IOException: The file exists.
    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +489
    Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +924
    Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +84
    Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
    I have seen this question asked several years ago, but have never seen a response that suggests what the issue may be.
    I would really appreciate any help in resolving this problem.\
    The application has been running from quite some time and this problem started just recently.
    Thank You.
    -Rick

    Hi Rick,
    According to your description, the exception “System.IO.IOException: The file exists.” is thrown out when you export the report on report manager.
    Generally, the exception is thrown out because there are more than 65535 files without deleting previous temporary files in our temporary directory. Based on my research, it has reported the same issue when exporting the report on report manager, and deleting all
    temp files from C:\Windows\Temp could resolve the issue. I would also suggest you remove the temporary files from C:\Users\<username>\AppData\Local\Temp. Please refer to the first comment at this link:
    System.IO.IOException: The file exists
    Reference:
    Path.GetTempFileName Method
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Dialog prompt and check if file exists, and use the result of dialog

    I have this working script and I want to change the way it behaves.
    I want a dialog to come up, Do you want to skip or replace existing files.
    Then the result  of the dialog to be used in the reast of the script.
    I've added it in the script where I need to use it. in noce big letters, hopefully its not a big job.
    Many thanks
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
              set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
              if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                        set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                        set FolderEndName to last text item of folderName
                        set brandName to first text item of folderName
                        set my text item delimiters to "_PSD"
                        set weekNumber to first text item of FolderEndName
                        set my text item delimiters to oldTID
                        set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
      --set up names to destination folders and create locally based on brand name and week number
                        set this_local_folder to "Images:2012-2013"
                        set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                        set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                        set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                        set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                        set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                        set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                        set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                        set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                        set website_images to "GEN:Website_Images:"
      --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                        set this_ftp_folder to "pulse:"
                        set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                        set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                        set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                        set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
      --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
      --use the result for the if file exists?
                        display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
      --taking the folder identify which process it must follow.
                        if brandName is equal to "BH" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
      --    B H   Folder Photoshop Process
      --if thefile exists in the folder localBrandFolder_PSD then do the result of dialog.
      --"Skip" the file and move on to next
      --If "replace" continue the rest of the script.
                                            tell application "Adobe Photoshop CS5.1"
      -- I remove the command activate, Photoshop stay in background
                                                      set ruler units of settings to pixel units
                                                      try
      open (alias thefile) showing dialogs never
                                                                set origName to name of current document
                                                                set myOptions to {class:JPEG save options, quality:12}
                                                                set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                tell current document
      --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                          if (quick mask mode) then delete channel ¬
                                                                                    "Quick Mask"
      --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                          if (exists layer "Original Layer") then ¬
                                                                                    tell layer "Original Layer" to set name to "Original Image"
      save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                          (delete layer "Original Image") flatten
      resize image resolution 300 resample method none
      --sharpen image
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
      --get file path, return path of the JPEG file, work with (without copying)
      -- (with copying) : it return path of PSD file
                                                                          set newFile to file path --( return path of type alias )
      -- duplicate file using the Finder  -->on duplicateFile(..)
                                                                          my duplicateFile(newFile, {ftpBrandFolder_High_Res})
      --Prepare for Low RES by resetting image history
                                                                          set current history state to history state 3
                                                                          flatten
                                                                          resize image width 1348
      resize image resolution 300 resample method none
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      --add save to lowResFolder with same options
      save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                          set newFile to file path
                                                                          set newFile2 to newFile as string -- for testing end of name
                                                                          if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                                          else
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                                          end if
      close saving no
                                                                end tell
                                                      on error
                                                                set noError to false
                                                                my myLogs(thefile) -- write path to log file in Desktop
                                                                try
      close saving no --if exists, close current document
                                                                end try
                                                      end try
                                            end tell
                                  end repeat
      --End BH
    -- else if and the rest of the script.....
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
              tell application "Finder" to repeat with folderPath in foldersPath
                        with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
      duplicate tFile to folder folderPath with replacing
                        end timeout
              end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath
    tell application "Finder"
              open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

    Hi,
    I think that's what you want.
    I put the dialog in the beginning, so it does not appear to each folder, otherwise put it in the loop as it was originally.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
          property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
          set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
          if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
                set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
                --set up names to destination folders and create locally based on brand name and week number
                set this_local_folder to "Images:2012-2013"
                set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                set website_images to "GEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "pulse:"
                set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
                --taking the folder identify which process it must follow.
                if brandName is equal to "BH" then
                      try
                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                      on error
                            set o's theseNames to {} -- no psd files or "8BPS"
                      end try
                      set numOfNames to (count o's theseNames)
                      repeat with j from 1 to numOfNames
                            set thefile to theFolder & ":" & (item j of o's theseNames)
                            --    B H   Folder Photoshop Process
                            tell application "Finder" to set b to exists file (localBrandFolder_PSD & item j of o's theseNames)
                            if b and not skipFiles then -- file exists and "replace" (continue the rest of the script).
                                  tell application "Adobe Photoshop CS5.1"
                                        -- I remove the command activate, Photoshop stay in background
                                        set ruler units of settings to pixel units
                                        try
                                              open (alias thefile) showing dialogs never
                                              set origName to name of current document
                                              set myOptions to {class:JPEG save options, quality:12}
                                              set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                              tell current document
                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                    if (quick mask mode) then delete channel ¬
                                                          "Quick Mask"
                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                    if (exists layer "Original Layer") then ¬
                                                          tell layer "Original Layer" to set name to "Original Image"
                                                    save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                    (delete layer "Original Image") flatten
                                                    resize image resolution 300 resample method none
                                                    --sharpen image
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                    --get file path, return path of the JPEG file, work with (without copying)
                                                    -- (with copying) : it return path of PSD file
                                                    set newFile to file path --( return path of type alias )
                                                    -- duplicate file using the Finder  -->on duplicateFile(..)
                                                    my duplicateFile(newFile, {ftpBrandFolder_High_Res})
                                                    --Prepare for Low RES by resetting image history
                                                    set current history state to history state 3
                                                    flatten
                                                    resize image width 1348
                                                    resize image resolution 300 resample method none
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    --add save to lowResFolder with same options
                                                    save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                    set newFile to file path
                                                    set newFile2 to newFile as string -- for testing end of name
                                                    if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                    else
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                    end if
                                                    close saving no
                                              end tell
                                        on error
                                              set noError to false
                                              my myLogs(thefile) -- write path to log file in Desktop
                                              try
                                                    close saving no --if exists, close current document
                                              end try
                                        end try
                                  end tell
                            end if -- else "Skip" the file and move on to next
                      end repeat
                      --End BH
                end if
          end if
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
          try
                do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
          end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
          tell application "Finder" to repeat with folderPath in foldersPath
                with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
                      duplicate tFile to folder folderPath with replacing
                end timeout
          end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
          tell application "Finder" to tell folder folderPath
                if not (exists folder tName) then
                      return (make new folder at it with properties {name:tName}) as string
                else
                      return (folder tName) as string
                end if
          end tell
    end getFolderPath
    tell application "Finder"
          open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

  • Error while booting: SIOCADDRT: File Exists

    I have a Toshiba laptop with two nics built in, one 100mb ethernet plug, one wireless.  I do not use the wireless nic.  When my laptop boots I get the "Starting Network" message then a [FAIL] with a "SIOCADDRT:: File Exists" error, however, the network starts and works fine.  How can I go about clearing this error message?
    Thanks.

    SIOCADDRT = Socket I/O Control Address Route F<something>. 
    Give that it tells you a file exist, I take it 'a file' means that there's some kind of route in place. Check if you have any routes defined in /etc/rc.conf or if any odd routes are defined in /proc/net/routes

  • ORA-19870: error while restoring backup piece -- file exists in ASM

    [oracle@rs1pre92dvdbsa01 ~]$ rman target sys/c9nv9sd9t9f11e@mdm11 auxiliary /
    Recovery Manager: Release 11.2.0.1.0 - Production on Fri Oct 29 10:41:38 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    connected to target database: MDM (DBID=1485385044)
    connected to auxiliary database: MDM (not mounted)
    RMAN> duplicate target database for standby;
    Starting Duplicate Db at 29-OCT-10
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=13 device type=DISK
    contents of Memory Script:
    restore clone standby controlfile;
    executing Memory Script
    Starting restore at 29-OCT-10
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: reading from backup piece +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    ORA-19505: failed to identify file "+MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607"
    ORA-17503: ksfdopn:2 Failed to open file +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    ORA-15012: ASM file '+MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607' does not exist
    failover to previous backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/29/2010 10:42:00
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    RMAN>
    ASMCMD [+mdmdg2] > cd mdm1
    ASMCMD [+mdmdg2/mdm1] > ls
    CONTROLFILE/
    FLASHBACK/
    ONLINELOG/
    arch/
    autobackup/
    ASMCMD [+mdmdg2/mdm1] > cd autobackup
    ASMCMD [+mdmdg2/mdm1/autobackup] > ls
    2010_10_29/
    ASMCMD [+mdmdg2/mdm1/autobackup] > cd 2010_10_29
    ASMCMD [+mdmdg2/mdm1/autobackup/2010_10_29] > ls
    s_733654605.283.733654607
    As seen in asmcmd "s_733654605.283.733654607" file exists in +mdmdg2/mdm1/autobackup/2010_10_29 then why it is complaning that it can't find the file.
    and also How to open/view file in asmcmd

    [oracle@rs1pre91dvdbaa01 utl]$ sqlplus / as sysasm
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 29 13:11:44 2010
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> startup;
    ORA-01078: failure in processing system parameters
    ORA-29701: unable to connect to Cluster Synchronization Service
    I have rebooted both the RAC servers and I can't start database?
    I was under the impression that Database should be automatically started as part of Clusterware
    Please help urgent.

  • "No file Exists" error

    Hello Xperts,
           I am working on Inventory Management.I am getting Error "No file Exists" when i do the initialisation of 2LIS_03_BF in the TCODE OLI1BW,I already deleted the Setup tables and 2lis_03_bx is successful.
        I didn't lock any User,Is this error because of that,Can anybody Help me to solve this error.
    And also Please give some TCODES to lock the users.
    Thanking you,
                                        With regards,
                                         Stalin.

    When you run setup tyable fill in OLI1BW pay attention not to fill fields 'Archiving ID' or somethnig like that otherwise you'll get this error.
    With transaction SU10 you can lock/unlock all users.
    Hope it helps.
    Regards

  • Checking to see if files exist not working as expected.

    Hey, so I've set up a script that determines the artist playing on iTunes and sets the background image to a preselected picture of them. I want to expand this to allow different pictures of the artists, and after a few attempts, decided to use a time based system. However, some artists have 2 images (named Artist1.jpg and Artist2.jpg), whilst others only have one (Artist.jpg). I can get the scripting right for if all artists have 2 images, yet am having problems with the system determining if certain files exist.
    who is the artist playing, and myNum is either 1 or 2, and changes based on the time, both set earlier in the script and verified to work.
    set MultiWall to ("/Users/ethan/Pictures/Music Wallpaper/" & who & myNum & ".jpg")
    set SingleWall to ("/Users/ethan/Pictures/Music Wallpaper/" & who & ".jpg")
    tell application "System Events"
                       if not (exists MultiWall) then
                                                           tell application "Finder"
                                                                          set desktop picture to file SingleWall
                                                           end tell
                       else
                                                           tell application "Finder"
                                                                          set desktop picture to file MultiWall
                                  end tell
                                            end if
    end tell
    I've tried many variations of this, from less variables to more, restructuring it and whatnot and it just isn't working for me. Thanks all.

    If you are still having difficulties you may like to try this method:
    set myPath to "/Users/neville/Desktop/test" & ".png"
    if (do shell script "/bin/test -e '" & myPath & "'; echo $?") is "0" then
      tell application "Safari" to open myPath
    end if
    It should work if you copy and paste it.
    Please note the combined single and double quotes. Don't put a space between them. You may not need the single quotes if you have control over the path. Most people would opt for 'quoted form of' but I prefer concise code.

  • Check if files exist using ABAP

    Hi All,
    I'm currently using FM: FILE_GET_NAME_USING_PATH, and I'd like to do a check to see if the filepath with file (i.e. /com/tmp/file.txt) I am getting back exists or not.
    Very simple question, just not sure what to do.
    Thanks,
    John

    There is a class that provides methods to check, if a file exist or if a certain directory does exist
      CALL METHOD cl_gui_frontend_services=>directory_exist
        EXPORTING
          directory            = lv_path
        RECEIVING
          result               = lv_valid
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
          CALL METHOD cl_gui_frontend_services=>file_exist
            EXPORTING
              file                 = x_file_with_path
            RECEIVING
              result               = y_file_exists
            EXCEPTIONS
              cntl_error           = 1
              error_no_gui         = 2
              wrong_parameter      = 3
              not_supported_by_gui = 4
              OTHERS               = 5.
    Hope that helps,
    Michael

  • Check if file exists in file receiver adapter

    hello,
      we have following scenario -> proxy to file
      before appending to the file, it should be copied/renamed to a "tmp" file
      xi should then append to that tmp file and copy/rename the file back to the normal name
    I tried it with "Run operating system command before message processing" but
    it's not working
    anybody has an example on how to use those settings before/after message processing ?
    regards,
    michel

    Hi Michel,
    little confused,
    1) before message processing do there any file exists?
    2) why should we change file name to 'tmp' and append data to that and again rename that file ?
    con't we directly proceed in append mode with file name?
    When we use single command say for example cp or mv (copy or move) the commands then 
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt 
    when we club commands together or try to redirect the outputs of commands
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt & mv %F /var/opt/data/outbound/Test/Dummy.txt
            or
          cp %F /var/opt/data/outbound/Test/Dummy.txt
          mv %F /var/opt/data/outbound/Test/Dummy.txt
    Include all ur command in one file and call that file in the OS parameter
    Regards,
    Pradeep A.

  • File exists but program can't open it

    G'day all.
    I am trying to port some fortran programs from a True64 environment into Sun v9/SunStudio 11. On the alpha it has no problems, but on the Sun it can't open a file with a name that is only 78 characters long. The Fortran User's guide states that the maximum length for a file name is 1024 characters.. The file most certainly exists and is readable to the user: stat gives:
    silo@eclipse /silo1/tech1/install/bin -> stat /silo1/tech1/install/import/rtmet/NCC/dayClim/200706/2007062720070627.dc
      File: `/silo1/tech1/install/import/rtmet/NCC/dayClim/200706/2007062720070627.dc'
      Size: 133170         Blocks: 288        IO Block: 8192   regular file
    Device: 1d8005ah/30933082d     Inode: 110852      Links: 1
    Access: (0664/-rw-rw-r--)  Uid: ( 3953/sielewiczj)   Gid: (  700/    ciss)
    Access: 2008-07-23 12:44:00.533357000 +1000
    Modify: 2008-07-04 14:21:00.107423000 +1000
    Change: 2008-07-08 09:27:39.322719000 +1000The compiled Fortran code (called from a wrapper script) however:
    [07/23/08 12:46]: silo_dc_import_wrapper starting
    Determining dates to process
    Now starting to process Silo 1998
    aah, how sweet - found file /tmp/silo/DC_filelist                              
    About to check  /silo1/tech1/install/import/rtmet/NCC/dayClim/200706/2007062720070627.dc                                              
    In file not Found  /silo1/tech1/install/import/rtmet/NCC/dayClim/200706/2007062720070627.dc                                                Bye
    ******  FORTRAN RUN-TIME SYSTEM  ******
    Error 2:  No such file or directory
    Location:  the OPEN statement at line 770 of "dc_importer.f90"
    Unit:  12
    File:   /silo1/tech1/install/import/rtmet/NCC/dayClim/200706/2007062720070627.dc
    AbortNote that it could succesfully open the file /tmp/silo/DC_filelist... The code in question is:
    ! Problematic snippet from much longer program..
             integer*4 eof, ymd
             character*120 in_file, filelist
             logical file_exists
             file_exists = .TRUE.
             filelist = params(2)
             inquire(file = filelist,  exist = file_exists)
             if ( file_exists == .FALSE. ) then
               write(*,'(3a)') 'Not Found ', filelist, ' Bye'
               return
             endif
             print *, "aah, how sweet - found file ", filelist
             open ( unit=11, file=filelist, status='OLD' ) ! THIS succeeds (/tmp/silo/... short filename)
             read ( 11, "(i8, A120)", iostat = eof) ymd, in_file
             do while ( eof == 0 )
                write (*,'(2a)') "About to check " , in_file
               inquire(file = in_file,  exist = file_exists)
               if ( file_exists == .FALSE. ) then
                 write( *, '(3a)') 'In file not Found ', in_file, ' Bye'
    !             return (commented out to see if open also gives an error..)
               endif
             open ( unit=12, file=in_file(1:len_trim(in_file)) , status='OLD' ) ! THIS is where the program bombs out.
             end doI am stumped. Why would this bomb out? The file exists, is readable, the filename is << 1024 characters.. I've also tried to run this as the user who owns the file, to no avail. Any suggestions, please?
    Cheers,
    Tony

    First, check to be sure the program has read and execute access on every directory in the path to the file.
    If the directory permissions are all OK, run your program under truss:
    truss -f -a -vall -o /output/file/name/here your.progam.hereThere should be something like a stat() and an open() call for that file shown as failing in your truss output file. Hopefully that will give you some more information.

  • File exist to check for any file, not just a specific filename

    How can I implement a check to see if any file exists in a certain directory. I don't know the filename beforehand, only the directory.
    Can I still use the FILE EXISTS activity or do I need to write something different.
    Thanks,
    Guido

    Hi guidonlm
    You can use USER DEFINED activity or FILE EXISTS activity. With file exists you must get file name before (file name can be hard coded or passed as variable). With user defined activity you can make your own shell script and check anything that you need (in this case you must enable property in file $ORACLE_HOME/owb/bin/admin/Runtime.properties property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    Regards

  • I'm trying to clean up my mailbox and when I delete an item(s) I get a message that say's "operation could not be completed- file exists. Further, when I do this one message is copied (not deleted) to the trash folder. Can someone help me through this?

    I'm trying to clean my mailbox and when I click on delete or highlight and move to trash I get a message that says "operation could not be completed - file exists. Further, when I select a message or group of messages, one of them is copied (not deleted) to the trash folder. Can someone help me through this?
    Thanks.

    It's a POP account. I decided to clean up my mailbox today after noticing the computer was real slow after USA Today started sending their daily top stories with new graphics. Also before I noticed the problem with mail deletion - two things happened. 1) I updated security sofware as prompted by Apple and 2) downloaded Mackeeper and went throught some preliminary scans but did not buy their package. Thanks forn nstaying with me.

Maybe you are looking for

  • Creating PDF's with Central Pro Output Server for AS400 (iseries)

    Today we generate spool files on the AS400 (iSeries)using Central Pro Output Server on the AS400. The user now wants to create the spool files as PDF's and then email them as attachments with a password to open them. Can this be done ?

  • Calling a webservice(JAX-RPC) from non java client ?

    Hi, I read JAX-RPC is used for accessing webservices by calling the webservice methods from a java-based client. Is it possible to call the Webservice methods(writeen using jax-rpc) from a non-java client,who sends his request in the form of SOAP bas

  • After Effects 7.0 keeps crashing (0::42)

    Hi there, I'm working with AE 7.0 and everytime I try to render a project, AE keeps crashing. (After Effects can't continue... or something similar) Today it even crashed while adjusting my preferences... I'm trying to render a 9 min composition cons

  • I would like to be able to convert to lab when opening a raw file.

    It's time consuming to go to mode, then lab, for each file I open from Raw in photoshop. It would be great to have this as an option in the Raw processor.

  • Many portals within one session?

    Hello, I have created three different portals which all need to authenticate the user. Is it possible to get those three portals to use just one login page, I mean that the user won't have to login more than once? How are the sessions handled in Webl