PO190 Last Run Audit

 2 Replies
 0 Subscribed to this topic
 43 Subscribed to this forum
Sort:
Author
Messages
SSmith
Basic Member
Posts: 9
Basic Member
    Is there a way we can figure out what user ran last this program PO190?
    Greg Moeller
    Veteran Member
    Posts: 1498
    Veteran Member
      If you have sql access to the GEN database, I believe this will help.
      SELECT USERNAME,JOBNAME,TOKEN,ACTSTARTDATE,ACTSTARTTIME,
      CAST(DATEADD(SECOND, FLOOR(ACTSTARTTIME / 10000) * 3600 + FLOOR(ACTSTARTTIME / 100) % 100 * 60 + ACTSTARTTIME % 100, 0) as time) as 'Start HH:mm:ss',
      STOPTIME,
      CAST(DATEADD(SECOND, FLOOR(STOPTIME / 10000) * 3600 + FLOOR(STOPTIME / 100) % 100 * 60 + STOPTIME % 100, 0) as time) as 'Stop HH:mm:ss',
      CONVERT(CHAR(8), DATEADD(SECOND, DATEDIFF(SECOND,CAST(DATEADD(SECOND, FLOOR(ACTSTARTTIME / 10000) * 3600 + FLOOR(ACTSTARTTIME / 100) % 100 * 60 + ACTSTARTTIME % 100, 0) AS TIME), CAST(DATEADD(SECOND, FLOOR(STOPTIME / 10000) * 3600 + FLOOR(STOPTIME / 100) % 100 * 60 + STOPTIME % 100, 0) AS TIME)), ''), 114) AS 'RunTime Duration'
      FROM gen.dbo.QUEUEDJOB
      WHERE STATUS = '63' AND CONVERT(VARCHAR(21),STOPDATE,101) = CONVERT(VARCHAR(21),GETDATE(),101)
      -- ORDER BY 'RunTime Duration' desc
      ORDER BY ACTSTARTDATE desc, ACTSTARTTIME desc
      John Henley
      Posts: 3353
        Another way I track down (assuming you have access to the machine / Lawson folder), is just search the /print folder for print file (e.g. PO190.prt). Also, can search using a text search in %LAWDIR%/system/joblog/* for PO190. Neither is foolproof but can give you some insight.
        Thanks for using the LawsonGuru.com forums!
        John