I've written a small FEX to track WebFOCUS Report usage by capturing the UserId, FEX Name, and a DateTimeStamp. These three fields are inserted into a DB2 Table built specifically for that purpose.
The FEX is "-INCLUDE'd" as the first line of each Report FEX that I want to track.
WebFOCUS seems to be performing double inserts, about 10 to 15 seconds apart.
Here is the FOCUS code:
-*** Strip the leading underscore from the &FOCFOCEXEC value
-*** and convert to upper case
-SET &A = ABS(&FOCFOCEXEC.LENGTH);
-SET &F = &A - 1;
-SET &FFMT = 'A' | &F;
-SET &RPTNM = SUBSTR(&A, &FOCFOCEXEC, 2, &A, &F, '&FFMT');
-SET &UCRPTNM = UPCASE(&F, &RPTNM, 'A8');
-*** Convert the TSOID to upercase
-SET &U = ABS(&IBIC_user.LENGTH);
-SET &USERID = UPCASE(&U, &IBIC_user, 'A7');
-*** Get the create date time stamp with micorsecond precision
-SET &DTSTMP = HGETC(10, 'HYYMDm');
-SET &DTSTMPX = HCNVRT(&DTSTMP,'(HYYMDm)',26,'A26');
-*WRITE PLUSRLG &UCRPTNM &USERID &DTSTMPX
-RUN
-SET &ECHO=ALL;
-RUN
SQL
INSERT INTO PLTUSRLG
(FOC_NA, RQSTR_UID_C, RQST_TS)
VALUES('&UCRPTNM', '&USERID', '&DTSTMPX');
COMMIT;
END
-RUN
Any ideas why? Or how to prevent the double insert?
WebFOCUS 716 MVS DB2 AIX UDB