Problem in creating job

Hey to all
I wanted to create a job that shrink my temp tablespace after one week. Due to huge data loading I get filled. When i create job through EM I could not understand where I put Alter tablespace temp shrink space command . For database home page click server click job link and create button under the command section where I put this command. Plz help I tried to this IN Pl/Sql but job fail
DECLARE
SQLSTMT VARCHAR2 (500);
Begin
SQLSTMT:= ALTER TABLESPACE temp SHRINK SPACE';
execute immediate (sqlstmt);
END;

I would not waste my time on creating such jobs.
Main reason: they don't resolve anything. You shrink the tablespace and it will definitely start to grow again.
You are only fighting symptoms. Maybe you want to earn your living out of fighting symptoms, I don't.
Apart from the the syntax of execute immediate is
execute immediate <variable>|<hard coded literal>;
Before asking syntax questions please use the docs (in this case the PL/SQL reference manual) to verify your usage of a construct is syntactically correct.
Also this line
SQLSTMT:= ALTER TABLESPACE temp SHRINK SPACE';
is lacking a '
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Problem in creating job via submit

    sap 4.7
    i am opening/scheduling job from other program/job
    And from some reason i get two jobs with the same name.
    One is working good, and the other one is stay in schedule.
    My problem is  , why i active two jobs and not only one  ?
    And why one (that I donu2019t want and need it at all ) is stay as "schedule" ?
    this is my code
      CONCATENATE  EVT_ID JOBCOUNT  INTO JOBNAME
                                               SEPARATED BY SPACE.
      LCL_TIME = SY-UZEIT + 1000 .  " + 15 minute
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          JOBNAME   = JOBNAME
        IMPORTING
          JOBCOUNT  = JOBCOUNT.  " AND RETURN
         CALL FUNCTION 'JOB_OPEN'
           EXPORTING
              JOBNAME          = JOBNAME
             DELANFREP        = SPACE
           IMPORTING
              JOBCOUNT         = JOBCOUNT
           EXCEPTIONS
              CANT_CREATE_JOB  = 1
              INVALID_JOB_DATA = 2
              JOBNAME_MISSING  = 3
              OTHERS           = 4.
       if sy-subrc <> 0 .
         MESSAGE  I099  WITH 'cant craete job' .
       endif.
            SUBMIT YITF_MOVE_TO_BCKP
             VIA JOB JOBNAME NUMBER JOBCOUNT
                TO SAP-SPOOL   IMMEDIATELY ' '
                DESTINATION    'LOCL'
                KEEP IN SPOOL  'X'
                WITHOUT SPOOL  DYNPRO
                WITH EVT_PARM =  EVT_PARM
                AND RETURN.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          JOBCOUNT  = JOBCOUNT
          JOBNAME   = JOBNAME
          SDLSTRTDT              = SY-DATUM     "i_strtdt
          SDLSTRTTM              =  LCL_TIME
         STRTIMMED = 'X'
    this is the status in sm37
    YITF_MFHBHY_LOAD 03304501           LEGACY          Scheduled
    YITF_MFHBHY_LOAD 03304501           LEGACY          Complete        04.03.2009 03:49:05

    Hi use this Code to fix the issue...
    DATA : v_jobhead LIKE tbtcjob.
    DATA : v_jobcount LIKE tbtcjob-jobcount.
    DATA : v_eventparm LIKE tbtcjob-eventparm.
    DATA : v_flg_released TYPE c.
    DATA: e_error.
    DATA: running LIKE tbtcv-run.
    TYPES: esp1_boolean LIKE boole-boole.
    CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
               esp1_true  TYPE esp1_boolean VALUE 'X'.
    CONSTANTS: true  TYPE boolean VALUE esp1_true,
                              false TYPE boolean VALUE esp1_false.
    PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
                v_report LIKE sy-repid,
                v_varian LIKE  raldb-variant,
                v_uname  LIKE sy-uname.
    START-OF-SELECTION.
    * add the new job
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
    *            delanfrep        = 'X'
                jobname          = v_jobnam
           IMPORTING
                jobcount         = v_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc  0.
        e_error = true.
      ELSE.
        CALL FUNCTION 'JOB_SUBMIT'  " or you can use SUBMIT statement as well.
             EXPORTING
                  authcknam               = v_uname
                  jobcount                = v_jobcount
                  jobname                 = v_jobnam
                  report                  = v_report
                  variant                 = v_varian
             EXCEPTIONS
                  bad_priparams           = 1
                  bad_xpgflags            = 2
                  invalid_jobdata         = 3
                  jobname_missing         = 4
                  job_notex               = 5
                  job_submit_failed       = 6
                  lock_failed             = 7
                  program_missing         = 8
                  prog_abap_and_extpg_set = 9
                  OTHERS                  = 10.
        IF sy-subrc  0.
          e_error = true.
        ELSE.
          CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
    *               EVENT_ID                    = IC_WWI_WORKPROCESS_EVENT
    *               EVENT_PARAM                 = V_EVENTPARM
    *               EVENT_PERIODIC              = 'X'
                    jobcount                    = v_jobcount
                    jobname                     = v_jobnam
                    strtimmed                   = 'X'
               IMPORTING
                    job_was_released            = v_flg_released
               EXCEPTIONS
                    cant_start_immediate        = 1
                    invalid_startdate           = 2
                    jobname_missing             = 3
                    job_close_failed            = 4
                    job_nosteps                 = 5
                    job_notex                   = 6
                    lock_failed                 = 7
                    OTHERS                      = 8.
          IF sy-subrc  0.
            e_error = true.
          ELSE.
            DO.
              CALL FUNCTION 'SHOW_JOBSTATE'
                EXPORTING
                  jobcount               = v_jobcount
                  jobname                = v_jobnam
    *            IMPORTING
    *         ABORTED                =
    *         FINISHED               =
    *         PRELIMINARY            =
    *         READY                  =
    *              running                =
    *         SCHEDULED              =
               EXCEPTIONS
                 jobcount_missing       = 1
                 jobname_missing        = 2
                 job_notex              = 3
                 OTHERS                 = 4.
              IF sy-subrc  0.
                e_error = true.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              IF running = space.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
        ENDIF.
      ENDIF.

  • Problem while scheduling job in apex

    Hi All ,
    I have problem while creating job in apex .Let me explain my problem clearly.I have created a page in
    url: http://apex.oracle.com/pls/otn/
    Workspace : PREETHI_WORKSPACE
    User ID : [email protected]
    Password : bowova1
    Application :Parse and upload csv file -21007
    Page No:1
    Page Name :Parse csv file.
    Main functionality of this page is to upload csv file into oracle table .First user will browse a file from local machine and upload it in upload region.After that,user enters a table name and clicks create table button which creates a table in DB and also shows the report for the same .Creating table is happening through "create table " process when user clicks "create table" button.Code is working fine .One more things here is, in csv file the second row should have data type mentioned .
    My requirement is ,i have to schedule "htmldb_tools.parse_file" in create table process as a job .In this "create table process" we are calling htmldb_tools.parse_file(:P1_FILENAME,'P1_COLLECTION','P1_HEADINGS','P1_COLUMNS','P1_DDL',:P1_TABLENAME);
    Problem Iam facing here is that the scope of item :p1_filename is getting lost when we pass it to procedure .I think problem is due to different apex and database session .
    Tried a lot through various ways ..Not finding the solution.
    Please help...

    Hi Marco,
    I have tried with the setting what u have mentioned in htmldb_tools.parse_file procedure: wwv_flow_api.set_security_group_id(<workspace_id>);
    But Job Getting fail and giving error ""ORA-01400: cannot insert NULL into (ORA-01400: cannot insert NULL into ("FLOWS_020200"."WWV_FLOW_COLLECTIONS$"."SESSION_ID")
    ORA-06512: at "FLOWS_020200.WWV_FLOW_COLLECTION", line 319
    ORA-06512: at "DIMPLE3_HD_DEV.HTMLDB_SID_50", line 196
    ORA-06512: at line 2
    Please help me out in this issue.
    Regards
    Dhan

  • Create Job problem

    Hi,
    I like to create job using Scheduler Jobs > Create Job with Command Type Stored Procedure! But the problem is that I can't see (user sys) procedures on schema i wish to create job on! So i can't pick procedure from Search and Select: Procedure values!?
    Is someone know what is the problem?
    Thanks, Kristjan

    OK. It is a "Package" and not a Procedure like you mentioned above.
    So, you have to do a different thing from a normal stored procedure. What you need is to use a Command Type of PLSQL Block
    Assuming the Package TEST_PACLAGE with PACKAGE BODY containing procedure TEST_PROC and is owned by user SYS.
    Select SYS as the owner under General
    Inside the PL/SQL box enter.
    BEGIN
    test_package.test_proc;
    END;
    This should work

  • Problems with background job

    Hi,
    I have problems when creating a job that is supposed to be run once in background. I use the common steps as described below. My problem is that the report is executed twice.
    - First it is executed synchronously when the job is created
    - Then it is executed in the normal job step as I want it to do
    I don't want it to be executed the first time because it creates data!!!
    Code:
    CALL FUNCTION 'JOB_OPEN'
         EXPORTING
              jobname  = w_jobid
         IMPORTING
              jobcount = w_jobnr
              sdlstrtdt = sy-datum
              sdlstrttm = sy-uzeit.
    SUBMIT (p_prog)
    WITH p_idocnr = p_idocno
               USER            p_user
               VIA   JOB       w_jobid
                     NUMBER  w_jobnr
                     AND       RETURN.
    CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
              jobcount         = w_jobnr
              jobname          = w_jobid
              strtimmed        = 'X'
         IMPORTING
              job_was_released = w_jobrel.
    Does anyone have a clue of what I should do to prevent this?
    //  Regards  Hans

    Hi again,
    1. U are right.
    2. It will happen if we use SUBMIT.
    3. As per the help documentation,
        it will run the program in separate session,
       ( as soon as submit statement comes)
    4. and run the INITIALIZATION event.
    The VIA JOB addition also loads the program accessed in a separate internal mode when the SUBMIT statement is executed and the system performs all the steps specified before START-OF-SELECTION. This means the events LOAD-OF-PROGRAM and INITIALIZATION are triggered and selection screen processing is performed. If the selection screen is not processed in the background when VIA SELECTION-SCREEN is specified, the user of the calling program can eidit it and schedule the program accessed in the background request using the function Place in Job. If the user cancels selection screen processing, the program is not scheduled in the background job. In both cases, execution of the program executed is completed after selection screen processing and the system returns to the calling program due to the AND RETURN statement.
    regards,
    amit m.

  • Error creating job in oracle

    I'm having a problem creating a job in oracle . I want at the end of each day to put some values from table1 in table2, empty table1, and then delete and re-create some sequences..because I have auto-increment id and each day I want to sequence to start from 0 again. So long story short I tried creating this job using toad for oracle.
    if I just put the first 2 tasks(put data from table1 in table 2, then delete) in the job it works like a charm. if I also add the drop sequence, create sequence I get an error saying
    Encountered the symbol "DROP" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    so this is what I want the job to do:
    insert into A(a,b,c) select a2,b2,c2 from B;
    delete from A;(so far it would work)
    drop sequence ida_seq;
    create sequence ida_seq
    start with 1
    increment by 1
    nomaxvalue;
    drop sequence idb_seq;
    create sequence idb_seq
    start with 1
    increment by 1
    nomaxvalue;
    so anybody can give me a clue on why I get the error? maybe if someone can give me a link on how to do oracle jobs..cause if I google "oracle+job" I get only jobs(for work) in oracle...but I don't get stuff related to syntax and how to create jobs in oracle. 10x in advance

    If this is a PL/SQL question, then PL/SQL has no 'DROP' or 'CREATE' keywords and you would need to use dynamic SQL with EXECUTE IMMEDIATE.
    btw there are various techniques around for resetting a sequence to start again at 1 using ALTER SEQUENCE, rather than dropping and recreating it.

  • I have a problem in creating a Process Chain(PC).

    Hi GURU's
    I have a problem in creating a Process Chain(PC). The PC should run on first 3 business days of the month for six times i,e 6am, 7am,8am, 9am,10am,11am.
    For this i have created 3 PC like BD1, BD2, BD3, and i selected the Factory calender provided workday 1, 2 , 3 and time for three chains.
    Now should i schedule it for 6times in a day.
    I tried creating a new job for one of PC's but i have to change the timings for  every month (this is not the proper solution).
    Please help me.
    Regds
    Lajwanth

    Hi Friend,
    For the days part, you can create a new factory calendar with first 3 business days of each month only as working days.
    Then in the scheduling -> Restrictions; you can mention that Factory Calendar id and select radio button for "Move job to next working day". Schedule the chain as Periodic "Hourly".
    Then for the Time part -> You can insert process type "Decision between multiple alternatives" after the start variant.
    After you insert this process type you can create a formula in it to check for system time. In the if condition check for system time i.e., whether it is between 6 - 11. If only the system time is between 6 AM to 11 AM only then the decision step would turn to green and go to the successor step in the process chain.
    Process chain would be like:
    Start variant -> Decision Step -> Rest of the chain.
    So in short the factory calendar will take care of which days the chain will run and decision step will take care of the timings.
    Regards
    Hemant Khemani

  • Creat Job for LSMW (periodical data transfer)- idoc BLAORD

    Hi,
    We are trying to create job for LSMW (thru frame program for periodic data transfer) for idoc BLAORD (Purchasing contract)
    When I am running the job that I created, the job is cancelled and the error is:
    "Upload from front-end is not possible in batch mode.
    Message no. /SAPDMC/LSMW_OBJ_070 020"
    How can I correct that? so I will be able to run a job (the job mast run background?)
    Thanks,
    Tal Sasson

    Hello,
    I was also receiving the same message /SAPDMC/LSMW_OBJ_070 020 even though I specified in /SAPDMC/SAP_LSMW_INTERFACE the server path. The problem was that in LSMW->Specify Files you have to delete the definition of front-end files and define application server files.
    That Flag File (Path and Name) (field /SAPDMC/LSOINP-FILENAME in program /SAPDMC/SAP_LSMW_INTERFACE) is kind of useless since it is ignored anyway and files defined in LSMW object are imported and they have to be read anyway if you use more than one file.
    Regards,
    Peter

  • Scheduler doesn't create Jobs

    Hello folks!
    We have scheduled some reports with BI Publisher Scheduler in our Development Enviroment and works very fine. But when we passed that reports to Prod Enviroment, BI Publisher scheduler doesn't create any Job (verified in Report Job History and XMLP/QRTZ tables in Database Schema that isn't any Job created). There isn't any error, exception or message, only scheduler doesn't create Jobs.
    Any idea, solution or way to find any trail about that problem?
    Thanks for your preciated time spent in our issue.
    Best Regards,
    Martín

    I am also facing same issue with BI Publisher Scheduler but showing below mentioned error while creating new job.
    Error
    "Job submission failed : Error occurred while scheduling the job. org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '-1' and group: 'weblogic', because one already exists with this identification."
    Cheers.
    Vishal

  • Transaction code to create job and position in LSMW

    Hi,
    I am looking for transaction codes that can be used in LSMW to Create Job and Position. I have used PPSC, but instead of creating Job and Position, It creates org unit although I pass in the parameter for ObjectType.
    I would appreciate if anyone can help me with this problem.
    Thank you in advance,
    Sunny

    Hi,
    Check this link
    http://help.sap.com/saphelp_46c/helpdata/en/0c/e785d8f8af11d2a61f0060087832f8/frameset.htm
    Thanks & Regards,
    Judith.

  • ORA-31637: cannot create job SYS_IMPORT_SCHEMA_01 for user SYSTEM in impdp

    Hi All,
    During impdp i am getting this below error:
    ORA-31626: job does not exist
    ORA-31637: cannot create job SYS_IMPORT_SCHEMA_01 for user SYSTEM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPV$FT_INT", line 600
    ORA-39080: failed to create queues "KUPC$C_1_20090507123340" and "KUPC$S_1_20090507123340" for Data Pump job
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPC$QUE_INT", line 1606
    ORA-04031: unable to allocate 56 bytes of shared memory ("streams pool","unknown object","streams pool","fixed allocation callback")
    Also increase shared memory hence creating the same problem.
    Can anyone sujjest me what would be the cause?
    Thanks in advance...

    Increase parameter streams_pool.
    Set it for example to 100MB
    Then try again.

  • Creating job

    Hi Experts,
    I am about to create a batch job. I used FM JOB_OPEN, JOB_SUBMIT and JOB_CLOSE. However, whenever I run the program it creates job for every 1 second. It will not stop creating jobs unless you completely exited in the program. The code is not inside the loop.

    mariposa,
       Suppose you have 100000 records which is going for dump in background also.
    Taht time decided to create a job for every 20000 records.
    select * from database table
      into itab
    packaze size 20000
    where x  =  s_x.
       your functionality here if required and moved to final internal table.
    Now  you have to pass this final internal table data to your submit program selection screen.
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
        DELANFREP              = ' '
        JOBGROUP               = ' '
            jobname                = csm_std_reconciliation_job
        SDLSTRTDT              = NO_DATE
        SDLSTRTTM              = NO_TIME
         IMPORTING
            jobcount               = jobcount
    EXCEPTIONS
       cant_create_job        = 1
       invalid_job_data       = 2
       jobname_missing        = 3
       OTHERS                 = 4
        IF sy-subrc <> 0.
    MESSAGE ID 'CSM' TYPE 'W' NUMBER '045' WITH csm_std_reconciliation_job.
          EXIT.
        ENDIF.
        CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
        ARCPARAMS                         =
            authcknam                         = sy-uname
        COMMANDNAME                       = ' '
        OPERATINGSYSTEM                   = ' '
        EXTPGM_NAME                       = ' '
        EXTPGM_PARAM                      = ' '
        EXTPGM_SET_TRACE_ON               = ' '
        EXTPGM_STDERR_IN_JOBLOG           = 'X'
        EXTPGM_STDOUT_IN_JOBLOG           = 'X'
        EXTPGM_SYSTEM                     = ' '
        EXTPGM_RFCDEST                    = ' '
        EXTPGM_WAIT_FOR_TERMINATION       = 'X'
            jobcount                          = jobcount
           jobname                           = csm_std_reconciliation_job
        LANGUAGE                          = SY-LANGU
        PRIPARAMS                         = ' '
            report                            = csm_std_reconciler
            variant                           = csmvari
      IMPORTING
        STEP_NUMBER                       =
         EXCEPTIONS
           bad_priparams                     = 1
           bad_xpgflags                      = 2
           invalid_jobdata                   = 3
           jobname_missing                   = 4
           job_notex                         = 5
           job_submit_failed                 = 6
           lock_failed                       = 7
           program_missing                   = 8
           prog_abap_and_extpg_set           = 9
           OTHERS                            = 10
        IF sy-subrc <> 0.
    MESSAGE ID 'CSM' TYPE 'W' NUMBER '045' WITH csm_std_reconciliation_job.
          EXIT.
        ENDIF.
        strttime = sy-uzeit + timepad.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount                          = jobcount
            jobname   = csm_std_reconciliation_job
           sdlstrtdt                         = sy-datum
           sdlstrttm                         = strttime
    IMPORTING
      JOB_WAS_RELEASED                  =
         EXCEPTIONS
           cant_start_immediate              = 1
           invalid_startdate                 = 2
           jobname_missing                   = 3
           job_close_failed                  = 4
           job_nosteps                       = 5
           job_notex                         = 6
           lock_failed                       = 7
           OTHERS                            = 8
        IF sy-subrc <> 0.
          MESSAGE ID 'CSM' TYPE 'W' NUMBER '045'
             WITH csm_std_reconciliation_job.
          EXIT.
        ELSE.
          MESSAGE ID 'CSM' TYPE 'I' NUMBER '104' WITH
              csm_std_reconciliation_job.
        ENDIF.
    endselect.
    Now for every 20000 records it will create one batch job.
    Pls. reward if useful.

  • I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    Apple ID FAQ   http://support.apple.com/kb/HE37

  • Facing some problems in creating a custom tabs in CRMD_ORDER Transaction

    Hi Friends,
    I am facing some problems in creating a custom tabs in CRMD_ORDER Transaction code in Solution Manager of SAP.
    Actually my requirement is adding of two tabs(one is header & another is item tab) in the above Transaction, i was able to put one tab i.e header tab but i was not able to keep item tab. i found a badi CRM_CUSTOMER_I_BADI in which documentation was given & i processed in the same way.
    For information i used the Badi CRM_CUSTOMER_H_BADI for header tab which i was able to add the tab & all functions like change, save working Good.
    But i want how to add custom tab in which item details were to be attached.
    i was done with the necessary SPRO settings(or Tcode CRMV_SSV) & able to see the 2 tabs thats it, but the functionality save is not working for the second tab & not saving in table CRMD_CUSTOMER_I (in this table there is one CI include where we added our item fields).
    And also i had a doubt whether to use ALV or Table Control. And if possible can any one can sent me the screen design & the code for the above requirement in detail.
    can any one who have knoweldge in Solution Manager & in the above Badi implementation can give me a right solution which will help me a lot.
    Thanks a lot in advance.
    Thanks
    Ravi.
    can any one give the solution regarding to the above one.
    Edited by: ravikanth on Jul 23, 2008 8:13 AM

    Hello Priyanka,
    I have the same problem by using Service Ticket in SAP CRM 5.0.
    Did you already solved this issue? If so, can you please provide the solution!?
    How can I activate and check the transfer log?
    Thanks and regards
    Alex

  • Facing problem in creating socket in a method from an already deployed application exe while same method is working from another exe from same environment from same location.

    Dll Created In: - MFC VC
    6.0
    Application Exe Developed In:
    - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit
    / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component which
    has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting Error
    code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming on
    client side so what we did, we created a driver in C# which invokes same method from same environment(on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest: -
    We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not working,
    actually  it is not executing Create () method,
    I will give snippet of the code for understanding the problem because we are not finding any kind solution for it.
    Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
    DWORD errorCode = GetLastError();
    CString errorMessage ;
    errorMessage.Format("%lu",errorCode);
    ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
    return  IS_ERR_WINDOWS;
    Note: -
    CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
    ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
    if(!Create())
    ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
     n_Err = GetLastError();
     ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
    return NET_INIT;
    ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
    if(!AsyncSelect(0))
    n_Err = GetLastError();
    return NET_INIT;
    if(!Connect(strIP,n_Port))
    n_Err = GetLastError();
    ErrorLog(n_Err,0,"ConnectTS","");
    return SERVER_NOT_CONNECTED;
    Code description: -
    From
    int GETImage_MT() method we call Initialize() method and pass client machine IP and Port and there we call
    ConnectTS() method, In this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System 
    0
    Note: - According to logs, problem is coming in Create method().
    Here 0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll
    from different exe, it is working fine and we are facing any kind of problem. While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

    Pointer variable was already initialized; I have mention in code; kindly assist us.
    Dll Created In: - MFC VC 6.0
    Application Exe Developed In: - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component
    which has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting
    Error code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming
    on client side so what we did, we created a driver in C# which invokes same method from same environment (on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest:
    - We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not
    working, actually it is not executing Create () method, I will give snippet of the code for understanding
    the problem because we are not finding any kind solution for it. Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage ;
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Note: - CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
                       ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
              n_Err = GetLastError();
              ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
                      return NET_INIT;
              ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
              if(!AsyncSelect(0))
                       n_Err = GetLastError();
                       return NET_INIT;
              if(!Connect(strIP,n_Port))
                       n_Err = GetLastError();
                       ErrorLog(n_Err,0,"ConnectTS","");
                       return SERVER_NOT_CONNECTED;
    Code description: - From int GETImage_MT() method
    we call Initialize() method and pass client machine IP and Port and there we call ConnectTS() method, In
    this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System  0
    Note: - According to logs, problem is coming in Create method(). Here
    0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll from different exe, it is working fine and we are facing any kind of problem.
    While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

Maybe you are looking for

  • Boot up Screen help -- This has to be an EASY fix

    Does anyone know how to get the MacBookPro to boot up to the screen which allows the user to chose whether you are the Administrator, Another Account or a Guest?  Now when it boots up it defaults to the Administrator and you need to Log Out then you

  • Web service simple question

    I am using a Web Service to publish some data, and this question is, I'm sure, stemming from my limited knowledge and use of web servers. I am able to set up an "add" method, pass 2 numbers to the web server, and have the web server return a value. S

  • Creator2 - crash - blue screen

    When I have used Creator2 for some time it just crashes my whole machine - it usually happens after some time of using some other program or inactivity - for example after leaving creator started over the night and trying to use it the day after. I'm

  • How to create Infocube in BI 7.0

    Hi Friends, I am creating new infocube in BI Netweaver 7.0 , I will get the data from Datastage. So Datastage is my Data Source. wht r the steps i want to follow in Infocube creation. pls guide me. Thanks in Advance Dora

  • Two out of 16 channel of the AT-MIO-16-​E1 are not working

    Hello! I'm here again with a question. I greatly appreciate the help i previously got from you guys. I was trying to acquire analog signals from the AMUX-64T using AT-MIO-16E-1 DAQ and the labview. Everything was going perfectly, but few days ago, th