Focal Point
[CLOSED] WebFOCUS - Automating Documentation

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1087043196

June 04, 2019, 04:57 PM
Wind07
[CLOSED] WebFOCUS - Automating Documentation
Hello All,
We are in search of anyone who has successfully automated documenting the reports created in WebFOCUS -- please advise ;o)

WebFOCUS - Automating Documentation
•Extracting Comments
•Screen prints of HTML forms

This message has been edited. Last edited by: FP Mod Chuck,
June 04, 2019, 05:16 PM
Waz
What do you mean by "Extracting Comments" ?, the -* lines in a fex or something else ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 05, 2019, 02:12 AM
Neelima
are you looking for some command like javadoc in JAVA?


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
June 05, 2019, 08:30 AM
Doug at Kencura
Hi, Wind07.

In the 1990s, I wrote a "program lister" using the FOCUS language to read FOCEXECs and explain what they were doing for a client with limited 4GL knowledge. If I still have it, I could share it in GitHub.

Basically, the documented FOCEXECs show on the left side of the pages and explanations of coding techniques are on the right (e.g., DEFINEs, TABLEs, MODIFYs, -CRTFORMs, etc.) In the early 2000s, I rewrote it into C/C++ and enhanced it as a transformer to automatically convert from 4GL/other reporting tool to WebFOCUS. I did not continue using/enhancing the FOCUS version after that.

I'm assuming you want a mass listing of all of the FOCEXECs (hopefully, PDF instead of binders of paper!) as well as a on-demand, one-at-at-time viewer. Today, reading the FOCEXECs is slightly more challenging because they are stored in the Content Repository as BLOB objects. Another method is to use Change Management, export them into text files, and mass report against them there.

If you want, send me a private e-mail Doug at Kencura.com so I can better understand your needs and see how I can help.


Sincerely,

Doug Lautzenheiser
Multiple products (FOCUS, WebFOCUS, iWay), releases (4-8.2), platforms (e.g., MVS, OpenVMS, Linux, iSeries, Windows), databases (e.g., Oracle, SQL Server, DB2, IMS, Hyperstage, etc.), integrated technologies (e.g., C/C++, R, Python)
Currently doing great things on WF8.2
June 05, 2019, 11:38 AM
DWaybright
This sounds like something we would like to have as well, so if there is a solution available, please share!

Thanks,
Deb


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
June 10, 2019, 09:25 AM
Mike in DeLand
I wrote a little report using the respository tables. Some of this code I got from somewhere, but I don't recall exactly where.
It's a program inventory of sorts. If you put it into the top level of a domain folder, it will show everything in that domain. You'll need to create the metadata for the tables shown here. Also put your style sheet declaration in.

-* Place this routine into the top-level folder of any domain, and it will report on all repository
-* content for that domain.
-*
-*-SET &ECHO=ALL;
-*-? &
-*TABLE FILE WF_REPOSOBJ
-*PRINT *
-*END
-*-EXIT
-SET &MY_LOCATION='/WFC/Repository/' | '&IBIMR_domain.EVAL' || '%';
-*-TYPE &MY_LOCATION;
-SET &THE_POSITION=POSITION('/%', &MY_LOCATION);
-*-TYPE &THE_POSITION;
-SET &MY_LOCATION_NOSUFFIX=SUBSTRING(&MY_LOCATION, 1, (&THE_POSITION - 1)) || '%';
-*-TYPE &MY_LOCATION_NOSUFFIX;
-*SET BYDISPLAY = ON
JOIN
WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE IN WF_CONTENT_REVS TO UNIQUE
WF_NLSOBJ.WF_NLSOBJ.OBJ_HANDLE IN WF_NLSOBJ TAG J2 AS J2
END
JOIN
WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE IN WF_CONTENT_REVS TO UNIQUE
WF_ITEM.WF_ITEM.HANDLE IN WF_ITEM TAG J3 AS J3
END
JOIN
WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE IN WF_CONTENT_REVS TO UNIQUE
WF_REPOSOBJ.WF_REPOSOBJ.HANDLE IN WF_REPOSOBJ TAG J4 AS J4
END

DEFINE FILE WF_CONTENT_REVS
ITEMTYPE/A24=DECODE WF_REPOSOBJ.WF_REPOSOBJ.OBJTYPE( 102 'Rpt Object FEX' 103 'Stylesheet' 106 'Help HTM' 107 'CSS' 109 'FEX' 110 'HTML' 113 'RC Schedule' 117 'URL' 4 OTHER 0 'Static web component' 301 'User Entry' 115 'RC Dist List' 118 'RC Library output');
VERTBAR/I2=POSIT(WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE, 255, '|', 1,  VERTBAR);
ReposName/A50=SUBSTR(255, WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE, 1, (VERTBAR -1), 50, ReposName);
LReposName/I2=ARGLEN(50,ReposName, LReposName);
TODAYS_DATE/MDYY=&MDYY;
LAST_ACCESS_DATE/MDYY=HDATE(LASTACCESSON, 'YYMD');
HOW_MANY_DAYS/I5=DATEDIF(LAST_ACCESS_DATE, TODAYS_DATE, 'D');
END
SET PRINTPLUS = ON
TABLE FILE WF_CONTENT_REVS
-*     WF_CONTENT_REVS.WF_CONTENT_REVS.OBJ_HANDLE AS 'OBJHANDLE - If non-cryptic, then item was from migrated WF 7'
-*     WF_CONTENT_REVS.WF_CONTENT_REVS.ReposName AS 'ReposName - If blank, was created in WF 8'
-*WHERE J4.WF_REPOSOBJ.PRT_PATH EQ '/WFC/Repository/Fusion/PCD_Written_Reports';
PRINT
     J2.WF_NLSOBJ.SUMMARY AS 'Summary'
     J4.WF_REPOSOBJ.LASTACCESSON
     J4.WF_REPOSOBJ.HOW_MANY_DAYS NOPRINT
BY  J4.WF_REPOSOBJ.PRT_PATH NOPRINT  AS 'Full IBFS Path'
BY  LOWEST J4.WF_REPOSOBJ.OBJNAME AS 'Internal Name'
BY  LOWEST J4.WF_REPOSOBJ.ITEMTYPE AS 'Type'
BY  J2.WF_NLSOBJ.OBJDESC AS 'Display Name'

ON J4.WF_REPOSOBJ.PRT_PATH SUBHEAD
"Folder: <J4.WF_REPOSOBJ.PRT_PATH "
" "
ON J4.WF_REPOSOBJ.PRT_PATH UNDER-LINE
HEADING
"Program Inventory for"
"&IBIMR_domain"
"Server: &SERVER_NAME "
"Red: Not accessed in over 90 days"
"Blue: Not accessed in over 60 days"
"Green: Not accessed in over 30 days"
FOOTING
"Page <TABPAGENO "
WHERE J4.WF_REPOSOBJ.PRT_PATH LIKE '&MY_LOCATION_NOSUFFIX';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = YOUR FAVORITE STYLE SHEET
$
     ORIENTATION=LANDSCAPE,
     SUMMARY='Repository Inventory',
     TITLETEXT='Repository Inventory',
$
     DEFMACRO=OVER_90,
     MACTYPE=RULE,
     WHEN=N7 GT 90,
$
     DEFMACRO=OVER_60,
     MACTYPE=RULE,
     WHEN=N7 GT 60,
$
     DEFMACRO=OVER_30,
     MACTYPE=RULE,
     WHEN=N7 GT 30,
$
TYPE=REPORT,
     LINES-PER-PAGE=UNLIMITED,
$
TYPE=DATA,
     COLUMN=N2,
     COLOR='RED',
     BACKCOLOR=RGB(240 245 255),
     MACRO=OVER_90,
$
TYPE=DATA,
     COLUMN=N2,
     COLOR='BLUE',
     BACKCOLOR=RGB(240 245 255),
     MACRO=OVER_60,
$
TYPE=DATA,
     COLUMN=N2,
     COLOR='GREEN',
     BACKCOLOR=RGB(240 245 255),
     MACRO=OVER_30,
$
TYPE=HEADING,
     LINE=4,
     JUSTIFY=LEFT,
$
TYPE=REPORT,
     COLUMN=OBJNAME,
     WRAP=1.500000,
$
TYPE=REPORT,
     COLUMN=OBJDESC,
     WRAP=2.000000,
$
TYPE=REPORT,
     COLUMN=SUMMARY,
     WRAP=3.000000,
$
TYPE=REPORT, RIGHTGAP = 0.05, $
TYPE=REPORT, LEFTGAP = 0.05, $
ENDSTYLE
END
  



Webfocus 8
Windows, Linux
June 10, 2019, 02:45 PM
DWaybright
Thanks! I'll give it a try.


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs