-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAge WebFOCUS Procedures.txt
112 lines (89 loc) · 4.13 KB
/
Age WebFOCUS Procedures.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
-SET &ECHO = 'ALL';
-DEFAULT &SORTFIELD = 'FOLDERNAME';
-DEFAULT &WFFMT = 'HTML';
-DEFAULT &SMY_OR_DTL = 'Summary';
-PROMPT &SORTFIELD.(<Folder Name,FOLDERNAME>,<CreatedBy UserID,CREATEDBY>).Summarize by.;
-PROMPT &WFFMT.(<Online,HTML>,<Spreadsheet,XLSX BYTOC 1>).Output format.;
-PROMPT &SMY_OR_DTL.(<Summary,Summary>,<Detail,Detail>).Summary or Detail?.;
-SET &SORTFIELD_DESC = IF &SORTFIELD IS 'FOLDERNAME' THEN 'Folder Name' ELSE IF &SORTFIELD IS 'CREATEDBY' THEN 'CreatedBy UserID' ELSE 'BADSORTFIELD';
-SET &TODYYM = EDIT('&YYMD.EVAL','999999');
-SET &STARTYYM = AYM('&TODYYM.EVAL',-18,'I6YYM');
-SET &STARTMDY = EDIT('&STARTYYM.EVAL','$$$$99') || '/01/' || EDIT('&STARTYYM.EVAL','9999');
-TYPE STARTMDY=&STARTMDY
DEFINE FILE UOA_USERS
USERID/A100 = NAME;
IPOS1/I3 = POSIT(USERID, 100, '@', 1, IPOS1);
ILENGTH/I3 = ARGLEN(100, USERID, ILENGTH);
DOMAIN/A100 = SUBSTR(100, USERID, IPOS1+1, ILENGTH, ILENGTH-IPOS1, DOMAIN);
APROPS/A4000 = PROPERTIES;
IPOS2/I3 = POSIT(APROPS, 4000, 'SEATDATE=', 1, IPOS2);
SEATDATE_YYYYMMDD/A8 = SUBSTR(4000, APROPS, IPOS2+9, IPOS2+17, 8, SEATDATE_YYYYMMDD);
NEWSTATUS/A20 = IF STATUS IS 'INACTIVE' THEN 'INACTIVE' ELSE IF LASTLOGIN IS MISSING THEN 'NOLOGIN' ELSE IF STATUS IS 'ACTIVE' THEN 'ACTIVE' ELSE IF STATUS IS 'MUSTCHANGE' THEN 'NOLOGIN' ELSE 'UNKNOWN';
USERTYPE/A20 = IF USERID CONTAINS '@' THEN 'External' ELSE 'Internal';
COUNTER/I5C = 1;
END
TABLE FILE UOA_USERS
BY USERID
BY NEWSTATUS AS 'USERSTATUS'
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS XREF_SECURITYCENTER_USERS_USERID FORMAT FOCUS INDEX USERID
END
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO ERROR;
-IF &LINES IS 0 THEN GOTO ERROR;
JOIN LEFT_OUTER CREATEDBY IN WF_REPOSOBJ TO USERID IN XREF_SECURITYCENTER_USERS_USERID AS J1
JOIN LEFT_OUTER HANDLE IN WF_REPOSOBJ TO UNIQUE OBJ_HANDLE IN WF_NLSOBJ AS J1
DEFINE FILE WF_REPOSOBJ
NEWSTATUS/A20 = IF USERSTATUS IS '' THEN 'NOTUSER' ELSE USERSTATUS;
TYPEDESC/A30=DECODE OBJTYPE( 102 'Reporting Object' 103 'Stylesheet' 106 'Help HTM' 107 'CSS' 109 'WF Procedure' 110 'HTML'
113 'Schedule' 117 'URL' 4 'Other' 0 'Static Web Component' 301 'User Entry' 115 'Distribution List' 118 'Report Library Content' ELSE 'Unknown');
IGNORE/I1 = IF OBJTYPE IS 4 OR 118 THEN 1 ELSE 0;
OBJNAME_A/A64 = OBJNAME;
UPOBJNAME/A64 = UPCASE(64, OBJNAME_A, OBJNAME);
LASTACCESSON_YEAR/YY = LASTACCESSON;
-* YEARSTATUS/A20 = IF LASTACCESSON_YEAR LE 2021 THEN 'Inactive' ELSE 'Active';
YEARSTATUS/A20 = IF LASTACCESSON LE '&STARTMDY.EVAL' THEN 'Inactive' ELSE 'Active';
FOCEXEC/A256 = PRT_PATH;
STRIPPATH/A256 = SUBSTR(256,FOCEXEC,17,256,256-17,STRIPPATH);
IPOS/I3 = POSIT(STRIPPATH, 256, '/', 1, IPOS);
FOLDERNAME/A256 = IF IPOS IS 0 THEN STRIPPATH ELSE SUBSTR(256, STRIPPATH, 1, IPOS-1, IPOS, FOLDERNAME);
END
TABLE FILE WF_REPOSOBJ
-* WHERE PRT_PATH LIKE '/WFC/Repository/IA_%';
WHERE CLASSNAME IS 'WfItem';
WHERE OBJTYPE IS 109;
COUNT OBJNAME/I5C AS 'Count'
ACROSS LASTACCESSON_YEAR AS 'Year Last Accessed' ROW-TOTAL AS 'Total'
BY YEARSTATUS AS 'Status' SUB-TOTAL AS 'Total'
BY &SORTFIELD AS '&SORTFIELD_DESC.EVAL'
-IF &SMY_OR_DTL NE 'Detail' THEN GOTO SKIP_DETAIL;
BY PRT_PATH AS 'Path Name'
BY OBJDESC AS 'Title'
BY OBJNAME AS 'Name'
BY LASTACCESSON AS 'Last Accessed On'
-SKIP_DETAIL
HEADING
"Age of WebFOCUS Procedures in InfoAssist Folders Sorted by &SORTFIELD_DESC.EVAL"
"Considering those Last Accessed 18 Months ago as Inactive (&STARTMDY.EVAL or earlier) - &SMY_OR_DTL.EVAL"
ON TABLE COLUMN-TOTAL AS 'Grand Total'
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD AS 'Age of WebFOCUS Procedures' FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET LINES 999999
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT,
TITLETEXT='Age of WebFOCUS Procedures',
SQUEEZE=ON, ORIENTATION=LANDSCAPE,$
ENDSTYLE
END
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO ERROR;
-IF &LINES IS 0 THEN GOTO ERROR;
-GOTO END_PROC
-ERROR
-TYPE *ERROR* An error has occurred.
-GOTO END_PROC
-END_PROC
-TYPE *DONE* The process has finished.