Saving code to an HTML file in IBM Developer for z or IBM i

Off
Strongback Consulting

During some courseware authoring I discovered a poorly known (but sufficiently documented) feature in Rational Developer for IBM i (and also available in IBM Developer for System z).  Both tools use the LPEX editor as the default editor for source (although IDz has dedicated editors for COBOL, JCL, PL/I, and C/C++).  The LPEX editor has many commands, but one I found interesting was the command saveAsHtml. LPEX commands are entered in the command text area typically found at the bottom of the editor:

 

LPEX Command Area

The saveAsHtml command will save the file as an HTML file, but with colorized parsing of the text. Just type in saveAsHtml with the single parameter of prompt, which will prompt you for a directory to save the file. Be sure to save the file with a .html extension. Then you can open the file in any browser. The image below shows what the new web page looks like (with correct color parsing, and indentation! Now, if you are a web designer, don’t get too excited as it uses HTML4 based syntax (with long-deprecated font tags). But its certainly good enough to show to a team.

Note that this will vary depending upon the palette you are using. Here is the black palette:

LPEX editor saveAsHtml with Black Palette

Comments are closed.

Strongback Consulting