Error Handling in Batch Script

Hi,
I have a script for deleting files from specific folders - 
forfiles  /P  X:\<path>  /D -7 /M *.* /S /C "cmd /C del @path /Q"
forfiles  /P  X:\<path>    /D -7 /M *.* /S /C "cmd /C del @path /Q"
I need to implement error handling like folder doesn't exist or files not there etc.
Kindly help me to write the same.
Thanks,
Sugata

Robocopy is a built-in command.
There is no need to be helpless. You can find information if you search:
http://www.bing.com/search?q=robocopy
Note that this is not a support forum for the robocopy command.
-- Bill Stewart [Bill_Stewart]

Similar Messages

  • [Resolved][ODQ] Error Running Exported Batch Script Outside of ODI

    Dear ODI experts,
    I have Installed 10.1.3.4.0 ---> selected "Oracle Data Integrator, Oracle Data Profiling, Oracle Data Quality 10.1.3.4.0" ---> Complete (1012MB)
    - follow all steps of "Design a Name and Address Cleansing Project" section in Sample Tutorial
    - in "Oracle DQ User Interface", right click Projects->Quality->customer master[1]
    - select "Run" from the context menu
    - the background tasks completed 100% properly
    - export the project as a Batch Script
    - make changes to config.txt, runProjectN.cmd, and *.stx files following as specified in the Sample Tutorial document
    - at step 13-f, got the following errors by executing runProjectN.cmd
    Wed Nov 28 17:18:37 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e7_us_globrtr_p2.dat>. errno = 2; N
    o such file or directory Occurred in Transformer - (cl_open).
    I did a full search in ODI folders and couldn't find "e7_us_globrtr_p2.dat".
    I tried both export with data and export w/o data with proper change to specify input file path, and got the same error.
    Appreciate any suggestions and/or hints help me further debug of fix this issue.
    Regards,
    Roy
    The following is a complete message echo of runProjectN.cmd
    ===========================================================================
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>runproject1.cmd
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>set TS_PROJECT=D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>set TS_CONFIG=D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts\config.txt
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>set TS_SETTINGS=D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>set TS_DATA=D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data
    D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\scripts>cd /D D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call tranfrmr D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e5_tranfrmr_p1.stx
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call globrtr D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e6_globrtr_p2.stx
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call tranfrmr D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e9_tranfrmr_p3.stx
    Wed Nov 28 17:18:37 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e7_us_globrtr_p2.dat>. errno = 2; N
    o such file or directory Occurred in Transformer - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call cusparse D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e10_cusparse_p4.stx
    Wed Nov 28 17:18:37 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e9_us_tranfrmr_p3.dat>. errno = 2;
    No such file or directory Occurred in Customer Data Parser - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call tsqsort D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e11_srtforpm_p5.stx
    Wed Nov 28 17:18:37 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e10_us_cusparse_p4.dat>. errno = 2;
    No such file or directory Occurred in tsqsort - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call uspmatch D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e12_pmatch_p6.stx
    Wed Nov 28 17:18:37 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e11_us_srtforpm_p5.dat>. errno = 2;
    No such file or directory Occurred in CGeoIO::initGIO - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call winkey D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e13_winkey_p7.stx
    Wed Nov 28 17:18:38 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e12_us_pmatch_p6.dat>. errno = 2; N
    o such file or directory Occurred in CWKD::initWKD - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call tsqsort D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e14_srtforrl_p8.stx
    Wed Nov 28 17:18:38 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e13_us_winkey_p7.dat>. errno = 2; N
    o such file or directory Occurred in tsqsort - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call rellink D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e15_rellink_p9.stx
    Wed Nov 28 17:18:38 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e14_us_srtforrl_p8.dat>. errno = 2;
    No such file or directory Occurred in CMatcher::InitMatcher - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call common D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e16_common_p10.stx
    Wed Nov 28 17:18:39 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e15_us_rellink_p9.dat>. errno = 2;
    No such file or directory Occurred in Create Common - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>call datarec D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\settings\e17_datarec_p11.stx
    Wed Nov 28 17:18:39 2007 - 03503E ERROR: Can't open file: <D:\Bin\Oracle\ODIDQ10134\demo\oracledq\projects\oracledq\project1\data/e16_us_common_p10.dat>. errno = 2;
    No such file or directory Occurred in CReCons::initRC - (cl_open).
    D:\Bin\Oracle\ODIDQ10134\oracledq\quality_server\tsq11r0s\Software\bin>
    ===========================================================================
    Solution:
    Needs to modify "e9_tranfrmr_p3.stx" to point to "e6_nomatch_globrtr_p2_us.dat".

    Seems to be the DRM service went down, try running the batch after stopping & restarting the service.

  • File Adapter Error Handling from Batch job

    Dear all,
    I'd like to handle error information by batch job process.
    However I can't find out the error flag from the file adapter.
    My XI setting is below.
    1.FIle to File conversinn by using File adapter
    2.Async setting
    3.Not use BPM
    Anyway,we only want to judge the status for XI process from Batch process like MS-DOS batch.
    Kindly please tell me the detail explanation.
    Regards,
    Masayuki.

    Hi Masayuki,
    Please take a look at these..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/09714d543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971c2543b11d1898e0000e8322d00/frameset.htm
    cheers,
    Prashanth

  • Oracle Error Handling in Shell Scripts

    I need to manage 2 diferente class of errors :
    Oracle Errors(produced in compilation time) and
    Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
    Please can you help me how can I manage then?
    this my alternative but is not correct ;
    #creating conexion with sql
    exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
         #Evaluating last sentence (sqlplus . . . . )
         VERROR=$?
         #Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
         if [ $VERROR  != 0 ]
         then
         echo "value of VERROR are:$VERROR"
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
         " Here show VERROR
         else #Oracle error handling in compilation time
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
         " Here show VERROR
    else if [ $VERROR  = 0 ]
    " DATA EXTRACTION WAS SUCESSFUL"
    fi
    Would apreciate your help its very urgent.
    Best Regards
    Antonio

    user5647282 wrote:
    I need to manage 2 diferente class of errors :
    Oracle Errors(produced in compilation time) and
    Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
    Please can you help me how can I manage then?
    this my alternative but is not correct ;
    #creating conexion with sql
    exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
    Piping the output of 'exit' to sqlplus????????? what do you expect from this?
         #Evaluating last sentence (sqlplus . . . . )
         VERROR=$?any error returned by sqlplus as $? would be a fatal error of sqlplus itself, not any error returned by processing a sql statement. If your script ord.extractor_porven.sql were to generate, say, an ORA-00001, that is NOT an error in sqlplus and so does not return to the OS as an error of sqlplus.
         #Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
         if [ $VERROR  != 0 ]
         then
         echo "value of VERROR are:$VERROR"
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
         " Here show VERROR
         else #Oracle error handling in compilation time
         echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
         " Here show VERROR
    else if [ $VERROR  = 0 ]
    " DATA EXTRACTION WAS SUCESSFUL"
    fi
    Would apreciate your help its very urgent.
    there is no "urgent" here.
    "Urgent" means one of two things -
    1) people are dying, or
    2) you have a customer-facing, revenue-producing production system that is down.
    (And to get some perspective on the second case, keep the first in mind.)
    For the first, you call whatever civil emergency service seems appropriate.
    For the second, you open an SR with Oracle - which requires a paid-up support contract. For them to consider your problem "urgent", you will need to demonstrate that your problem falls under item #2. I seriously doubt your problem fits that criteria.
    Best Regards
    Antonio

  • Error handling with shell script

    Hi,
    I want to write a .sql file with lots of executable statements. These statements need to run on 100 of schemas per database.
    I want to have error handling mechanism in this file in such a way that whenever I get any ORA- error or SP error, it should stop executing there.
    Please help me.
    Thanks.

    872305 wrote:
    Hi,
    I want to write a .sql file with lots of executable statements. These statements need to run on 100 of schemas per database.
    I want to have error handling mechanism in this file in such a way that whenever I get any ORA- error or SP error, it should stop executing there.
    Please help me.
    Thanks.
    10:47:51 SQL> help whenever sqlerror
    WHENEVER SQLERROR
    Performs the specified action (exits SQL*Plus by default) if a
    SQL command or PL/SQL block generates an error.
    WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable]
                        [COMMIT|ROLLBACK] | CONTINUE [COMMIT|ROLLBACK|NONE]}
    10:48:07 SQL>

  • Error Handling for batch inserts

    Hi,
    Firstly, apologies if this has been asked before but I haven't been able to find the answer.
    I'm inserting a batch of rows, each of which could fail for different reasons (e.g. constraint, space, etc.). However, when I receive multiple failures and retrieve the error message it is always:
    ORA-24381: error(s) in array DML
    If I don't use the OCI_BATCH_ERRORS mode then it obviously only fails once and the correct error message is received for the first failure.
    Any suggestions as to how to get the real error would be appreciated.
    The code I'm using to lookup the errors is:
    OCIAttrGet (m_stmtHandle, OCI_HTYPE_STMT,
    &numErrors, 0, OCI_ATTR_NUM_DML_ERRORS,
    m_errorHandle);
    if (numErrors)
    OCIError *errhndl = NULL;
    ub4 row_off[100];
    for (int i = 0; i < numErrors; i++)
    OCIParamGet(m_errorHandle, OCI_HTYPE_ERROR,
    m_errorHandle,
    reinterpret_cast <void **> (&errhndl), i);
    OCIAttrGet (errhndl, OCI_HTYPE_ERROR, &row_off, 0,
    OCI_ATTR_DML_ROW_OFFSET, m_errorHandle);
    OCIErrorGet(errhndl, 1, NULL, &errorCode, errorText,
    maxErrorLen, OCI_HTYPE_ERROR);
    Thanks,
    Steven

    Hi,
    Please use the OCI forum for this question. This is for the C++ Call Interface.

  • DRM batch script error for export

    Hi,
    getting error while running batch script for export.
    ERemotableException with message: "Server was unable to process request. ---> Error during Export. Export was unable to run. Error: [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied" while running Export
    4/26/2013 9:02:20 PM - => ERROR: Data Relationship Management Server returned error: "Server was unable to process request. ---> Error during Export. Export was unable to run. Error: [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied."
    can anyone help .

    Hi,
    Did you check the username / password being used to run the export through Batch Client? All correct ? More details would help.
    Denzz

  • Error handling not available with linked servers

    Hello,
    I have a stored procedure which inserts data to a linked mysql Server. The table in mysql has a unique key and I try to insert a new record with a conflicting key.
    My problem is that I am not able to do an error handling because my script stops immediatly when the error in the SP occurs.
    The error message itself is ok. But why is the script cancelled? So I don't have a possibility to do some error handling. I am working against SQL Server 2000. No TRY CATCH is available.
    Here is my code:
    DECLARE @RC int
    DECLARE @ItemNr nvarchar(255)
    DECLARE @Hostname nvarchar(255)
    DECLARE @IpAdresse nvarchar(255)
    DECLARE @LogLevel int
    DECLARE @Message nvarchar(1000)
    DECLARE @LocalError int
    -- Error handling is working as expected
    PRINT 1/0
    SELECT @LocalError=@@ERROR
    IF @LocalError<>0
     PRINT 'Error'
    ELSE
     PRINT 'Success'
    SELECT @ItemNr='AN12326m', @Hostname='hostname' ,@IpAdresse='ipadresse', @LogLevel=99, @Message='Test', @RC=0
    -- Error handling does not work
    EXECUTE [Asset].[dbo].[p_kapaya_DbSync_InsertMySqlRecord]
       @AssetNr, @Hostname, @IpAdresse, @LogLevel, @Message OUTPUT, @RC OUTPUT
    -- The following code is not reached, when an error occurs because the execution of the script is cancelled
    SELECT @LocalError=@@ERROR
    IF @LocalError <>0
     PRINT @LocalError
    ELSE
     PRINT 'Success'
    Error Message
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' hat die Meldung '[MySQL][ODBC 5.1 Driver][mysqld-5.0.67-community-nt]Duplicate entry 'AN12326m' for key 1' zurückgeben.
    Meldung 7343, Ebene 16, Status 2, Prozedur p_kapaya_DbSync_InsertMySQLRecord, Zeile 57
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' konnte INSERT INTO für die [MSDASQL]-Tabelle nicht ausführen.
    Kind regards
    Patrick

    This is not unique to linked servers. When an error occurs, there are several actions that SQL Server can take. It can abort the batch, it can abort the current scope or it can just termintate the current statement. Any active transaction may or may not
    be rolled back. And this is not all.
    Which of these actions, SQL Server takes it is hard to predict, becuase the developers have to have rolled a dice on deciding which action to take. Although, if you have SET XACT_ABORT ON, it is more consistent: in this case, most errors aborts the batch
    and rolls back the transaction.
    To trap the error, you need to use TRY-CATCH which permits you to trap most (not all) errors. See here for a quick introduction:
    http://www.sommarskog.se/error_handling_2005.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Error Handling in Oracle Sales Cloud

    Is there a best practice guide/document for error handling in Oracle Sales Cloud?
    For example: Error handling in groovy scripts, business processes.
    Can someone provide a starting point to this topic?
    Thanks,
    Abhishek

    Hi.
    Please review this short video showing you the online logging feature for Application Composer - Groovy. It's very simple and gives you a basic debug capability.
    https://www.youtube.com/watch?v=RcyeKQY2ZGo&index=35&list=PL1ZiAfFIniZf_Uu4qTcp5IZYdFOm9K5o3
    Kind regards,
    Richard
    FA Developer Relations

  • Catch procedure error in batch script

    Hi,
    I am calling the procedure inside a loop in a windows batch script.
    Is there any way i can catch the oracle exception ora- errors ? in the batch script.
    Thx.

    Batch file cannot catch errors that are thrown by oracle procedures.
    you can do some work around.
    1. push the errors to a log file (text file) from the procedure.
    2. once the procedure is complete, you can read for a specific text in the log file from Batch file. and if you find that error had occurred then do your stuff.
    Regards,
    Prazy

  • Error handling from MAXL into a batch file

    Hello all
    I need to know how do we pass a value to a batch file from MAXL script if an error occurs.
    I have used the following in my MAXL to catch an error.
    ========================
    login username password on server01;
    Iferror 'error';
    Define Label 'error';
    Exit;
    =======================
    In the batch file I used:
    If %errorlevel% NEQ 0 goto catch
    :catch
    echo an error occurred during MAXL script
    Exit
    ========================
    This doesnt give me any error even the login info is wrong in the MAXL script
    Please correct if this is wrong and provide any help if possible
    Thanks in advance

    Here's the error checking code I used in my last not-DOS-but-we-call-it-that script:
    REM     Call MaxL script with parameters
    REM The 2>&1 at the end of the below line merges CMD's STDERR into STDOUT
    %hyperion_home%\products\essbase\essbaseclient\bin\essmsh.exe %batAutomation%\%esbAppName%\MaxL\%mshScriptName%.msh %esbUsername% %esbPassword% %esbServer% %esbAppName% %mshScriptName% %batDrive% %batAutomation% >>%log% 2>&1
    REM     Test for MaxL execution errors
    IF NOT %ERRORLEVEL% == 0 (SET errormsg=Error! - MaxL script %mshScriptName%.msh failed with ERRORLEVEL %ERRORLEVEL% & GOTO ERROR)The 2>&1 command at the end of the MaxL script line merges STDOUT and STDERR into an overall log file I used for other processes as well as MaxL. It's great for that purpose, but unfortunately logs the username and password -- this would be overcome by encrypting those values. It was acceptable for the solution so I didn't lose any sleep over it.
    Regards,
    Cameron Lackpour

  • Script Error : Handler Not Definied

    Hi Gurus,
    I try to play a Lingo Script with Director MX 2004 but i got
    this message: Script Error : Handler Not Definied
    The Debug stops at this line in my code: dosRegister
    "70BE7B1-13977F4"
    Is anything missing from my Xtras folder?
    I have DirectOS though.
    Any idea ??
    Thx

    I suspect you have a cast member that uses one of the three
    names in the
    list and it is not a check box. It's probably before the
    actual checkbox
    member in the cast so it's finding it first.
    Craig Wollman
    Lingo Specialist
    Word of Mouth Productions
    212-928-9581
    www.wordofmouthpros.com
    "ajrobson" <[email protected]> wrote in
    message
    news:etn9j1$op2$[email protected]..
    >I have a script that get a list of choosen check boxes,
    it was working fine
    >but
    > now when i press the button that calls the script i get
    a error saying
    > "script
    > error property not found" then it lists the line i have
    put a * next to
    > and
    > says #hilite
    >
    > This is the top part of that script and to my knowlegde
    i have not chnaged
    > any
    > of it and it worked before but now it does not, i also
    use a script almost
    > identical to this but use it for radiobuttons instead
    and the line is the
    > same
    > in that and that script works, can anybody tell me what
    as gone wrong?
    >
    >
    >
    > global err
    >
    > on CheckBoxState -- name of custom handler
    > TickedBoxes = [] -- a empty list will be filled where
    ever a checkbox is
    > ticked
    > CheckBoxNames = ["Dr no", "From russia with
    love","Casino royale" ]
    > repeat with i = 1 to 3 -- repeat for each checkbox
    > CurrentCheckbox = CheckBoxNames
    > ** if the hilite of member(CurrentCheckbox) then -- if
    currentcheckbox
    > hilite
    > is true (checked)...
    > append(TickedBoxes,CurrentCheckbox )
    > end if
    > end repeat
    > return TickedBoxes
    > end
    >

  • Batch Updating error handling

    Hi,
    I have implemented batch updating in our application and it is working fine. I'm trying to find out if the following error handling procedure would be possible, and if so does anyone know how: -
    If executing a batch fails (determined from the int array returned), then identify the failing statement, remove it from the batch, log the failing statement, and retry executing the batch with the removed statement.
    Thanks in advance for any help you can provide.
    Chris.

    I believe you already have a list of failed items in the returned int array. There is no need to rerun the batch job. Those that can be updated were updated, those that cant be updated are indicated in the int array.
    Just report on which items in the array have zero for a value (failed to update). If your batch update is sorted (by the primary keys), then you know item 34 in the int array that failed is primary key xxxxxx. Therefore return not the int array, but an array of failed primary keys. As you build up your batch queries, store each primary key in an array so you can reference the int array to that primary key array.

  • ESSCMD in Perl Script - Error handling

    Does anyone use Perl scripts to run Esscmd commands? I'm trying to incorporate error handling and I can't seem to get Perl to recognize and error that happened when the Esscmd statement runs. A sample would be much appreciated. The fact that I'm not too familiar with Perl doesn't help! <BR>Thanks much.

    Sorted.
    Had to change
    #!/usr/bin/perl
    to
    #!/usr/bin/perl --

  • Error handling in script

    Hi,
    I want to handle the error in a shell script..
    requirement is in a.sh i invoke b.sh.Within b.sh i do some ftp operations.Now i want to handle if any error occurs while doing ftp.I want to do do some commands if the ftp fails i.e.error occurs in b.sh....
    Thanx in advance

    Should be simple enough ...
    a.sh:
    b.sh
    rc=$?
    if [ $rc -ne 0 ]
    then
      echo "errors happend"
    fi
    .b.sh
    # Let's assume it will fail ...
    RESULT=1
    # Do some ftp stuff and determine if it worked
    # that needs to be up to you how to decide that
    # if it HAS worked then:
    if [ $it_worked -eq 0 ]
    then
      RESULT=0
    fi
    exit $RESULTThe $it_worked variable (and the if test) is just there to show the RESULT=0 - ypu'll need to work out how to decide if the ftp stuff worked

Maybe you are looking for

  • HT204302 My ipod nano is not recognized in itunes on my computer, when it has in the past. How do I fix this?

    My ipod nano is not recognized in itunes on my computer, when it has in the past. How do I fix this problem?

  • Sample Material in the 3rd Line item of the Sales Order

    Hi, We have configured the system in the sales order as follows. 1. Commercial Material 2. Bonus Material.(ie Free Material) Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly l

  • How does this configurator module work?

    Hello, I'm a PHP programmer that has some work that I need to do for a client. He owns an online tshirt store and wants to develop a configurator similar to the own seen here: http://propercloth.com/custom-mens-shirts.php# You can see as you select f

  • Lost registration key

    I have recently wiped my hard drive, and just went to reinstall final cut studio when I realized I lost the tiny piece of paper with the registration key on it. This is a student version, and I was wondering if I had all my upgrade coupons if it was

  • E7-00 can't change e-mail settings

    I'm running sw 022.014 anna with the first service pack from sw updater. I wanted to check my email account settings to make sure that they're valid since my emails are not going through. This is what I get: I go to the E-mail-Settings-My Inbox-Accou