Want to collect Job Logs of AS400 using CommandCall at runtime.

Hereby I tried with another code as follows.
But its getting the Meassge as Time Wait and not running the command.
Note here I have tested and fired the command directly but instead of firing it directly,
I want to get all those Job Logs which are generated at runtime.
                        AS400 system = new AS400("url","username","pwd","");                
               CommandCall FirstCmdCall = new CommandCall(system);
               /** Initializing the Command **/
               FirstCmdCall.setCommand("...Any Command...");                              
               String runStatus ="";
               Job myJob = FirstCmdCall.getServerJob();
               String jobName = myJob.getName();
               String jobUser = myJob.getUser();
               String newJobNum = myJob.getNumber();
                myJob = new Job(system, jobName, jobUser, newJobNum);
                runStatus = (String)myJob.getValue(Job.ACTIVE_JOB_STATUS);
                while (runStatus != null &&
                          (runStatus.equals(Job.ACTIVE_JOB_STATUS_RUNNING)                                                               ||
                          runStatus.equals(Job.ACTIVE_JOB_STATUS_WAIT_TIME_INTERVAL)                                                               ||
                          runStatus.equals(Job.ACTIVE_JOB_STATUS_NONE)))                               
                     try                     
                           RJob rjob = FirstCmdCall.getJob();                           
                          myJob.loadInformation();
                          myJob = new Job(system, jobName, jobUser, newJobNum);
                          myJob.loadInformation();
                          runStatus = (String)myJob.getValue(Job.ACTIVE_JOB_STATUS);                
                     catch (AS400Exception exc)                                   
                }

In the persistence.xml specify the property
<property name="eclipselink.ddl-generation" value="create-tables"/>
But, a JPA implementation is not required to create tables according to the EJB 3 JPA specification. The Hibernate persistence provider does, the EclipseLink doesn't.
<provider>org.hibernate.ejb.HibernatePeristence</provider>

Similar Messages

  • How to get the job logs from sm35 by using the queue id and session name?

    hi all,
    can any one please let me know how to read the job log from sm35 by using the session name and queue id. i have the job name and job count but is it possible to download the job log by using the queue id and session name.
    FYI..
    i want to read this job log and i want to send it to an email id.
    -> i am using the job_open and submitting the zreport via job name and job count and then i am using the function module  job_close.
    but this is not working in my scenario i have the queue id and session name by using this two i want to get the job log is there any function module available or code please provide me some inputs.
    thanks in advance,
    koushik

    Hi Bharath,
    If you want to download it to the local file then you can follow the instructions in the below link.
    How to download Batch Input Session Log?
    Regards,
    Sachin

  • I want to set-up a network with our current two laptops for a family of 4 w/unique 4 profiles. I'd like everyone to be agnostic about which computer to log into and use but still have private docs and apps (i.e.mail/facebook). How best can I do this?

    I want to set-up a network with our current two laptops for a family of 4 with unique 4 profiles.  I'd like everyone to be agnostic about which computer to log into and use but still have private docs and apps (i.e. mail/facebook).  How best can I do this?

    iCloud Photo Sharing FAQ - Apple Support
    http://www.fatcatsoftware.com/iplm/Help/accessing%20an%20iphoto%20library%20on%2 0another%20mac.html

  • My mum is always using my iPad and I want to set mode if you like that she can log in as some one different and use apps she likes and I can use a diFferent log in and use different apps and stuff

    My mum is always using my iPad and I want to set mode if you like that she can log in as some one different and use apps she likes and I can use a diFferent log in and use different apps and stuff

    iOS 7 does not support multiple user accounts like you want.
    If all the apps are different, you could set her up with her own page of apps, then just show her how to get to her apps page, or just buy her an iPad for herself.

  • Message with IDOC number, created by LSMW, missing in job log in SM37

    Hi gurus,
    We have a temporary interface which uses LSMW to create IDOCs and update in SAP. It's used for materials, BOMs and document info records. In LSMW we have defined standard message types MATMAS_BAPI, BOMMAT and DOCUMENT_LOAD for the IDOCs. All these have the same problem.
    A background job runs and starts LSMW. In the job log in SM37 I want to see which IDOCs were created. For some reason this is different in my development system and my test system, and as far as I know all settings should be the same. In the test system LSMW creates more message lines in the job log, than it does in the dev system. Message number E0-097 is "IDOC XXXX added", and this is missing in the dev system.
    This is what it looks like in the dev system:
    Data transfer started for object 'MATMAS' (project 'X', subobject 'Y')             /SAPDMC/LSMW   501    I
    Import program executed successfully                                                             /SAPDMC/LSMW   509    I
    File 'XXX.lsmw.read' exists                                                                               /SAPDMC/LSMW   502    I
    Conversion program executed successfully                                                    /SAPDMC/LSMW   513    I
    Data transfer terminated for object 'MATMAS' (project 'X', subproject 'Y')       /SAPDMC/LSMW  516    I
    And this is what it looks like in the test system. More information, which is exactly what I want in dev system too:
    Data transfer started for object 'MATMAS' (project 'X', subobject 'Y')             /SAPDMC/LSMW   501    I
    Import program executed successfully                                                             /SAPDMC/LSMW  509    I
    File 'XXX.lsmw.read' exists                                                                               /SAPDMC/LSMW  502    I
    Conversion program executed successfully                                                    /SAPDMC/LSMW  513    I
    File 'XXX.lsmw.conv' exists                                                                              /SAPDMC/LSMW   502   I
    IDoc '0000000002489289' added                                                                      E0                         097   S
    File 'XXX.lsmw.conv' transferred for IDoc generation                                      /SAPDMC/LSMW   812   I
    Data transfer terminated for object 'MATMAS' (project 'X', subproject 'Y')      /SAPDMC/LSMW   516   I
    In both cases the IDOC is created and update works fine.
    My only issue is that I can't see the IDOC number in the dev system. I know I can get the IDOC number in WE02, but in this case we have program logic which reads the job log to be able to check IDOC status before sending OK message back to the other side of the interface.
    I hope any of you can have an idea how I can update somewhere to get message E0-097 with IDOC number into the log.
    Regards,
    Lisbeth

    Hi Arun,
    If you want to show your messages in the job log you have to use the MESSAGE statement. In case you use WRITE statements an output list be created which can be found in the spool (there is an icon to go to the spool directly).
    Regards,
    John.

  • Regarding Messages to Job Log

    Hi,
    What is a Job Log.
    i have to write messages to job log.
    how to do this.
    how can i see that messages whether it is written or not.
    how it can be seen to the client/user.
    regards,
    kiran

    Hi Kiran
    Use 'write' to display the message in the job log.
    write : / log_message.
    Place this statement after the block of statements in your program where you want the message to be displayed in the log.
    You can see the job log in SM37 transaction.
    hope this helps you.
    regards
    Message was edited by:
            Sarah Bollavaram
    Message was edited by:
            Sarah Bollavaram

  • How to write log information into SM37 batch job log

    Hi,
    I have a report running in batch mode, and I would like to log the start time and end time for some part of the code (different Function modules). I need to write this log information into the batch job log. Therefore I can check the time frame of my FMs.
    After search the SDN, I can only get some information on how to write log into the application log displayed in SLG1, but that's not I want. I want to write batch log information, and check it in SM37.
    If you have some solution or code to share, please. Thanks a lot.
    Best Regards,
    Ben

    Hi Nitin
    Thanks for the reply. Could you explain it with some code ?
    I tried to use the write statement , but it did not wrok. I could not see the result in SM37.
    write : "start of the FM1 processing".
    FM1 code
    write : "end of the FM1 processing".
    but those two statement did not show in SM37..
    1) how to use  a information message  ?
    2) how to use NEW PAGE PRINT ON and PRINT OFF command. ?
    I would appreciate if you can write some code ,that I can use directly.
    Thanks a lot.
    Best Regards,
    Ben

  • Write to AWS job log

    How can I write to the automation server job log file from my EDK AWS? This AWS does more then just return Groups and Users and I need to write to the log file the results of the additional operations.
    Please let me know how to implements this.

    Currently, the protocol between the portal and the remote web services only permits writing custom log messages from a crawler, but not from an authentication service or a profile service.
    We are considering this feature for future releases; in the meantime, you may want to follow the pattern we use for our own products, which use Log4N or Log4J to write a remote log file. In the case of a critical error that the administrator needs to know about, throw an exception with a message; in 5.0.1 this message did not get put in the job log, but in 5.0.2 it does.

  • Which function module to delete job log?

    Hi, I submit report via jobname and jobcount. After I close job and run it, we can see jobname is still in job log by SMX. But client doesn't want to see it, so who can kindly tell me which function module can delete jobname from job log?
    Thanks a lot.
    Jack

    try        CALL FUNCTION 'BP_JOB_DELETE'
    If you have used JOB_OPEN before the SUBMIT to create the job, you can automatically delete the job upon successful completion by setting the parameter DELANFREP = 'X' in the JOB_OPEN function call.. this way the user will only see the logas for cancelled/aborted jobs..
    ~Suresh
    Message was edited by: Suresh Datti

  • How to check HP LaserJet 500 color M551 job log

    Hi Everyone
    I have a new HP LaserJet 500 color M551 set for users, after user print a document to the printer,  I want to know how many sheet it used. In the job log page I can only find who print it, output size, black or color... But I can't check how many sheet the print job used. Is there nay method to check it?

    Thanks for the reply
    I had try the method but it still can't get the info. what I want get is how many sheet(s) the print job used but it didn't show in the job log page. the print job only show following info: 

  • Job log messages in BPM

    Hi All,
    I am doin Business Process Monitoring for monitoring batch jobs of a satellite system so that we will be getting tickets when some job is cancelling.
    for cancellation of jobs SD tickets are generating.
    now the requirement is to genarate a SD ticket for the successful job completion.
    in BPm we have one option as "job log messages" in Background job monitoring type.
    can we do it from there? How will the information be displayed in the ticket for job completion?
    we are defining some threshold values also in that option. how those threshold values will help in generating SD ticket.
    can anyone please suggest some idea.
    thanks
    Tripti

    Hi,
    You can monitor job log message with Business Process Monitoring in two ways (for an alert description see http://help.sap.com/saphelp_smehp1/helpdata/en/99/b45f54119044f19d389b2cad3430bc/frameset.htm)
    a) Error messages:
    Use case: You want to create alerts/notifications if background job creates more than N error messages in the job log.
    -> Use the upper limit for yellow/red alerts.
    -> Example: Job canceled ->monitor message of class 00 and with ID 564 (type A)
    b) Success messages:
    Use case: You want to create alerts/notifications if background job creates less than N success messages in the job log (Usually you want to watch the create of follow documents or the successful update of documents)
    -> Use the lower limit for yellow/red alerts
    -> Example: Job finished without error -> monitor message of class 00 and with ID 517 (type S).
    In both cases you will get a green rating - but no notification - if conditions for yellow/red alert are not met. Notifications (manual and automatic creation) are allowed for yellow and red alerts only.
    See also the documentation for Job Scheduling Management:
    http://help.sap.com/saphelp_smehp1/helpdata/en/c5/7edcbd58ce4e29bc1baf1c4761d71f/frameset.htm
    Best regards,
    Martin

  • How can I mail the Job Log in the form of an excel sheet?

    Daily I have to monitor a Job and I have to retrieve the Job Log in an excel sheet, Format the excel sheet, and then mail the excel sheet and the Job Status(Finished/Cancelled) to Client/Person Incharge.
    I want to automate this entire process. Please guide me, how can I write a program that mails the Job Log, in the form of an excel sheet, to the Client?
    Edited by: Jiten Rajendra Barai on Nov 25, 2008 3:03 PM

    Hi,
    You can use this FM to mail the excel sheet.
    SO_NEW_DOCUMENT_ATT_SEND_API1
    Also have a look at the below thread, it might be very helpful.
    Sending Excel attachment in E-mail
    Cheers...

  • To change the Job Log Detail in SM37

    Hi All,
    How can I change the standard JOB LOG detail in SM37 for partical program if it runs in Background.I have foumd the Function Module(BP_JOBLOG_READ) which is used to update this JOB LOG detail.How can I edit the standard .
    Kindly provide the ways .
    With Thanks,
    Dina.

    Hi ,
    Thank you for replying.
    I want to update some rows in JOB LOG detail .
    With Thanks,
    Dina.

  • Regarding Job Log Content.

    Hi all,
    I want to sent the content of the job log through mail for the failed jobs.
    Can anybody tell me how to get the content of the joblog in an internal table?
    I am able to check the status of the job from the table TBTCO.But unable to
    find how the joblog information is being fetched??
    Please help me out with this.
    Thanks and Regards.
    syed.

    syed,
    you can use the FM 'BP_JOBLOG_READ' passing the client, jobcount, joblogid and jobname. The jobcount and joblogid can be obtained from the TBTCO table for the date/time of the job execution.
    the log content is then returned back in the tables parameter 'joblogtbl'.
    - Kester

  • Audit SQL Job log Deletion

    How can I find who deleted the history of the job?

    Logs is not cleared automatically. I want to find who deleted logs or at least to audit such actions in the future.
    Hi inevg,
    According to your description, in SQL Server, auditing can be used to track and log events that occur on system. SQL Agent jobs are added / removed using stored procedure interface sp_add_job and sp_delete_job.
     And we could track user who has created a job / deleted a specific job. You could accomplish this using SQL Server Auditing feature. You can turn on Auditing to track and log stored procedure execution requests to file log / windows event
    log. For more information, see:
    Auditing SQL Agent job creation and deletion.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

Maybe you are looking for

  • Multiple message mappings in one integration scenario

    I am trying to send a message to a marketplace that uses a web service interface. First I have to map the SRM PO to OAGIS XML, then This must be embedded in the message of the web service which requires a further mapping. In the integration scenario

  • Slow Folder View When Mounting to Windows Share

    I'm an intern at an educational institute and we have a graphics lab that has access to a large windows share. They use the share for storing large picture files primarily. Only individuals in certain classes have access to the drive and each student

  • Using Iterator

    My intention here is to implement a function that do something to a Collection. The function recusively "knock off" one element from the Collection and call recursively until it hits certain base case. Also, I would like my Collection argument untouc

  • ORA-01446 - Help Please

    Whenever I add another table to the query, and run it, I receive this error: ORA-01446: cannot select ROWID from view with DISTINCT, GROUP BY, etc. I have a simple query that currently has 77 columns in the SELECT and 17 tables using both joins & lef

  • Role assignment restrictions

    Hi all, I am trying to restrict role assignment using the object S_USER_AGR. As an example i am using the following in the 'Role Name' field: T1050, T1500. However, with my test user, they are able to assign the role "T_50043964_5100-TEST" to a user