Did this article resolve your question/issue?



ABL code to parse aimage scan verbose output looking for transactions with most deletes sorted in descending order.


TitleABL code to parse aimage scan verbose output looking for transactions with most deletes sorted in descending order.
URL Nameabl-code-to-parse-aimage-scan-verbose-output-looking-for-transactions-with-most-deletes-sorted-in-descending-order
Article Number000120777
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
ABL code to parse aimage scan verbose output looking for transactions with most deletes sorted in descending order.
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
         CURRENT-WINDOW             = DEFAULT-WINDOW

define variable cInputFile as char init "." no-undo format "x(70)" label "Define location of aimage scan verbose input file.".
define variable cOutputFile as char init ".\rmdel-list.txt" format "x(70)" label "Define output file for rmdel-list." no-undo.
define variable cHolder as char no-undo.
define variable tempTrid as int64 no-undo.
define variable tempDateTime as char no-undo.
define variable tempUserid as char no-undo.

define temp-table ttAINotes 
field iTrid as int64 format ">>>>>>9"
field cUserid as char format "x(20)"
field cBeginDateTime as char format "x(25)"
field iRMDel as int format ">>>>>>>>>>>9"
index indTrid as primary iTrid
index indRMDel iRMDel

update cInputFile with frame a.
update cOutputFile with frame b.

input from value(cInputFile).

    import unformatted cHolder no-error.
    /* if error-status:error then leave. */
    if length(cHolder) = 0 then next.
    if index(cHolder,"Trid") > 0 then
        tempTrid = int64(entry(2,cHolder," ")).
    if index(cHolder," 2018.") > 0 or index(cHolder," 2019.") > 0 then
        assign tempDateTime = entry(4,cHolder," ") + " " + entry(5,cHolder," ") + " " +
        entry(6,cHolder," ") + " " + entry(7,cHolder," ").
    if index(cHolder,"User ID:") > 0 then
        assign tempUserid = entry(5,cHolder," ").

    if tempTrid <> 0 and index(cHolder,"RL_RMDEL") > 0 then
        find first ttAINotes where iTrid = tempTrid  no-error.
            if Available(ttAINotes) then
                if index(cHolder,"User ID:") > 0 then
                    assign cUserid = tempUserid.
                if index(cHolder,"RL_RMDEL") > 0 then
                    assign iRMDel = iRMDel + 1.
                create ttAINotes.
                assign iTrid = int64(entry(2,cHolder," ")) 
                       cUserID = tempUserid
                       cBeginDateTime = tempDateTime.
                if index(cHolder,"RL_RMDEL") > 0 then
                       assign iRMDel = iRMDel + 1.
input close.

output to value(cOutputFile).
put unformatted "Transaction ID" at 1
                "UserID" at 20
                "Trans Start Dt/Tm" at 40
                "# RM Deletes" at 65
                skip .
for each ttAINotes where iRMDel > 0 by iRMDel descending:
    put unformatted iTrid at 1 cUserid at 20 cBeginDateTime at 40 iRMDel at 65 skip.

output close.

Last Modified Date8/13/2019 6:59 PM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.