InfoSphere Optim

 View Only
  • 1.  CMD Archive Request Return Codes

    Posted Mon November 09, 2020 02:41 PM
    Hi ,

    I am using python for manage Optim jobs.
    I want to log return codes of Optim jobs to a DB table for success or error. 
    When I start an Archive Request from CMD it does not return any code. 
    I checked return codes from the link below. 
    Should I add a parameter for returning errors or successes ? 

    My Archive Request Command ; 
    C:\IBM\InfoSphere\Optim\rt\bin\PR0CMND /R TYPE=ARCHIVE REQUEST=DWH_T19C.ARC_MUST_V1 OUTPUT=D:\WORK\Process_Reports\DWH_TEST_19C\Process_Report_ARC_DWH19C_TEST_MUSTERI_30-10-2020-50k_V3.txt OV=D:\DWH_TEST_19C_OV_FILE.txt Q- M+


    https://www.ibm.com/support/knowledgecenter/SSMLQ4_11.3.0/com.ibm.nex.optimd.tdm.doc/Acmdline/opmoveuse-r-return_codes.html

    ------------------------------
    Gunes INAL
    ------------------------------

    #InfoSphereOptim
    #Optim


  • 2.  RE: CMD Archive Request Return Codes

    Posted Tue November 10, 2020 12:21 PM
    We run all our Optim processes via batch using PR0CMND and ERRORLEVEL is always set and returned. It's an inherent variable, so there is no need for a parameter to receive this. We do assign our own variable to hold the value of ERRORLEVEL once PR0CMND returns control to the batch job and then we evaluate that variable to determine if the step ran OK or if there was a more serious error. Example of this is like so:

    set RETCODE=%ERRORLEVEL% 
    if %RETCODE% == some value then etc etc..... 

    Our jobs are all executed via Windows .bat files, so Python may have some different syntax or commands for evaluating the ERRORLEVEL, but it should be there. Hope this helps!

    ------------------------------
    Keith Tidball
    Progressive Insurance
    ------------------------------



  • 3.  RE: CMD Archive Request Return Codes

    Posted Mon November 30, 2020 04:32 AM
    Thank you Keith, 

    I handle my situation like below , 

    --Python codes ; 
    return_val = os.system( <CMD_COMMAND_FOR_OPTIM_DELETE_REQ> )
    if 8 <= return_val:
        print('DELETE Succeed')
    else:
        print ('DELETE Failed')
    ​

     
     I hope this can help others who has same problem




    ------------------------------
    Gunes INAL
    ------------------------------