Pages

Showing posts with label App Engine. Show all posts
Showing posts with label App Engine. Show all posts

Wednesday, March 10, 2021

AE Write Log

 Local File &Logfile;

&Logfile = GetFile(“Filename”,”W”,%FilePath_Absolute);

&Logfile.WriteLine(“Your messages”);

&Logfile.Close();

Thursday, February 4, 2021

AE Trace Quick Look at Tables Modified

 

UPDATE

--- get all UPDATEs

awk '/^UPDATE /,/^\//' AE_AP_MATCH_999_0302143109.AET > xxx 

--- combine multiple lines into 1 line

sed -n 'H;:a /^\/$/{x;s/\n//g;p;n;h;b a}' xxx > yyy             

--- ignore temp tables

egrep -v '^UPDATE PS_.*_(T.*[0-9]|TAO) SET ' yyy                        

 

INSERT

grep ^INSERT AE_AP_MATCH_999_0302143109.AET| cut -d' ' -f3| egrep -v 'PS_.*_(T.*[0-9]|TAO)'


Friday, June 19, 2020

PS Online Trace Analyzer


YATA - yet another Trace analyzer... this one for Online SQL trace


based on "COM Stmt" - 

* Elapsed Time awk '{print $5}'  xxx.tracesql  |  awk 'BEGIN {tot=0}; {tot=tot+$1; next}; END{printf "%f / %d = %f\n", tot, NR,tot/NR}'

* Dur Time: awk -F' |Dur=' xxx | cut -d' ' -f1 | awk 'BEGIN {tot=0}; {tot=tot+$3; next}; END{printf "%f / %d = %f\n", tot, NR,tot/NR*100}'


Friday, November 22, 2019

Resetting AE Restart Point



----- SET AE RESTART POINT
SELECT to_char(ae_run_data), dump(to_char(ae_run_data))  
FROM PS_AERUNCONTROL WHERE PROCESS_INSTANCE =  3766254 

AE_PROG = 12 bytes
AE_SECTION = 8
AE_STEP =8 

-- this must be the step before Abend

UPDATE PS_AERUNCONTROL 
SET ae_run_data = to_clob(rpad('PROG',12,' ')||rpad('SECT',8,' ')||rpad('SETP',8,' ')||rpad('PROG',12,' ')||rpad('SECT',8,' ')||rpad('SETP',8,' '))
where   PROCESS_INSTANCE =  3766254


----- SET UP AE FOR RESTARTset up a test area for debugging, need to bring data from original db

 Using INTFAPAM as example:

1. state recs (select 'PS_'||AE_STATE_RECNAME from PSAEAPPLSTATE where  AE_APPLID=' INTFAPAM' ):

PS_AP_VCHR_AUD_AET
PS_INTFC_APAM0_AET
PS_INTFC_APAM1_AET
PS_INTFC_APAM2_AET
PS_INTFC_AP_AM_AET

2. temp recs: (select * from PS_AETEMPTBLMGR where PRocess_INSTANCE   = 3766254):

PS_INTFC_AP_AM_TAO
PS_VCHR_APAM_TAO1
::::

3. staging recs:
PS_PRE_AM_STG
PS_INTFC_PRE_AM

3. AE control:

PS_AERUNCONTROL

PS_AETEMPTBLMGR
PS_AEREQUESTTBL

4. PRCS:
PSPRCSPARMS
PSPRCSQUE
PSPRCSRQST

5. Message:
PS_MESSAGE_LOG
PS_MESSAGE_LOGPARM

analyze _trc to get the recs used