04
Mon, Nov
6 New Articles

New Ideas in Documentation and Help Text

General
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Documentation may not be the No. 1 concern on your project list, but perhaps it should be. Good documentation strategies can make or break your MIS staff, not to mention your users. Well-done, user-friendly user documentation can save you from having to answer the same questions all the time. It can also make it easier to train new users, which can be a big timesaver if your company has a large turnover. With that in mind, I’ll go over some old documentation ideas as well as some new ideas you might not have thought of before.

User Documentation Ideas

Effective user strategies can be as simple as using traditional green-screen help screens or as complex as using a Windows help file, created with the help compiler included with any of the Microsoft development platforms, or a product such as Delphi or an HTML document that is displayed when the Help key is pressed. No matter which strategy you choose, the most important thing is consistency. The more consistent the documentation scheme, the easier it is for your users to navigate through the applications. I’ll start with the basics and go over some green-screen help.

While the DDS help (HLPxxx...) keywords will get the job done, I’ll use another technique in my example. Figure 1 contains the source for the RPG program HELP. The source for the display file HELPWINDS can be retrieved from the MC Web site at www.midrangecomputing. com/mc. This source file is used to display the green-screen version of your documentation.

The RPG program HELP has four parameters: the program screen name, the horizontal and vertical cursor positions, and a return code to tell your application program whether any documentation was found for the selected screen. You will use the first three parameters to access help information stored in the physical file HELPFILE (also available for download from the MC Web site). The HELPFILE physical file contains a screen name field that defines the screen and/or application, start and end row and column positions, a line number field, a text field that contains the actual help text, and a field used to link to the external application (HLWBPG). The last field is relevant only on records where the line number field is 0. Your application must provide the cursor positions, using the information data structure (INFDS) for the display file. You can also retrieve the cursor position using the DDS keyword RTNCSRLOC (Return Cursor Location), which retrieves the position of the cursor and converts it to variables. When your program detects that the


Help key has been pressed, it calls the HELP program to display the help window. If you don’t pass the cursor positions or you don’t have any text defined for the cursor position passed, the HELP program will display the “overview” text, which, accordingly, would be defined with no starting and ending cursor position range in the HELPFILE file. After creating the HELPFILE physical file, the HELPWINDS display file, and the HELP RPG program, enter some help text into the HELPFILE file. Then simply modify your application program to call the HELP program, using the required parameters, when the Help key is pressed. My example also gives you a first basis for the second example: using an HTML document for your help text.

Modernize Help with HTML

Start by recreating the text of the help file created in the previous step by using either a text editor that can save documents as HTML files or an HTML editor of your choice. After you’ve written the help text, make sure you save the document as an HTML file. Place your saved document somewhere on your network so that it is accessible by all of your AS/400 client workstations—for example, on your LAN server or in the AS/400 Integrated File System (AS/400 IFS).

Now, using a text editor, create a PC batch file that provides a link to the location of your Internet browser. To do this, add the following line to your DOS batch file:

C:Progra~1Intern~1IEXPLORE.EXE %1

This example shows the path to Internet Explorer on a Microsoft Windows NT workstation. If you use Internet Explorer under Windows 9x or Netscape Navigator or another browser, make sure the path name reflects the location of your own browser. The %1 allows you to pass the Web page location as a parameter.

Now save the batch file under the name INET.BAT to the root directory of your PC
(i.e., C:). Next, you’ll need to update the HELPFILE file on your AS/400 by adding the link to the HTML document associated with the cursor location to the HLWBPG field. Be sure to use a fully qualified link to your Web browser and the document (for example, C:INET.BAT http://myserver/helpdoc1.html or C:INTET. BAT C:hlpdochelpdoc1.html).

Now when your application calls the HELP program, it will first attempt to display the HTML version of your help file using the DSPWEBPGE program, which is downloadable from the MC Web site. DSPWEBPGE first retrieves the IP address of the current job and then uses the Run Remote Command (RUNRMTCMD) command to open your Web browser and display the selected document. Make sure your PC is set up to accept incoming remote commands. The CWBRXD.EXE incoming remote command daemon program must be running on the PC for this technique to work. (See “Building the Bridge Between RPG IV and PC Programs” in the July 1998 issue of MC for more information on using this technique.) The easiest way to get the daemon running is to open up the PC’s Control Panel utility, select the Client Access icon, click on the Incoming Remote Commands tab, and then check the Automatically Start Incoming Remote Commands box. This also means that you must be using IBM’s Client Access product on the PC. If you are not a user of Client Access, you could modify this technique a bit by using FTP instead of RUNRMTCMD. For this to work, you’ll need an FTP server running on each PC that will be displaying your help files. The FTP server will accept the incoming remote command and execute it for your application. (For more information on using an FTP server, check out “A Better Way to Distribute Your AS/400 Software Changes” in the April 2000 issue of MC.) If the RUNRMTCMD command or the FTP command you replaced it with fails, DSPWEBPGE will display the DISPHELP window with the original help text that you created. The nice thing about the HTML format is that


you can create links between your HTML help documents to move between related help files without returning to the AS/400.

Using HTML as your help documentation allows for documentation that is more dynamic and attention-grabbing. For example, you can include pictures, screen shots, and flowcharts within the documentation to fully replace, in effect, written documentation. Also, when you use this technique, the HELP program will be fully compatible with both green-screen “dumb” terminals and Windows clients. Although my example is executed using an HTML Web page, you could use the program to launch any Windows program simply by replacing the HLWBPG field with the full path to the application, including the document to be loaded. This means that, using an inexpensive Web cam and video recording software, you could record the instructions for a given task—month-end closing, for example—in a Windows video file (e.g., AVI or Real Player) and launch the Windows media player and open the video file when the help key is pressed. Now that you’ve got the most user-friendly documentation possible, I’ll examine technical documentation.

Technical Documentation Strategies

Effective technical documentation can be as simple as using a good modification marking standard and sticking to it. You know that, when you are really in the crunch and struggling to meet your project deadlines, the last thing you’re thinking of is making sure that you mark your program code modifications properly. Time constraints, however, are no excuse for not marking your modifications. This simple task can save you an enormous amount of time when you are performing any type of code maintenance.

As you can see in the Access database in Figure 2 (which you can download from the MC Web site), marking changes isn’t difficult. This database gives you a tool for tracking modifications made to programs and/or files. The database allows you to generate reports by program name, source type, application ID, or programmer name. The menu allows you to enter object information and modification information as well as generate reports based on the data you’ve entered.

There are also many software utilities available to assist with technical documentation. Most of those packages will give you the ability to search for field, file, or program and other object usage throughout your system in addition to many other powerful documentation tools. For a complete list of documentation software and vendors, be sure to visit the Midrange Computing Online Yellow Pages at www.midrangecomputing.com/yellowpages.

Another important part of technical documentation is functionality flowcharting. Functionality flowcharting allows you to show graphically how application A interacts with application B. Think of it as the technical road map to your software. This can be especially important if you are building applications to interface with multiple systems. Unless you have a photographic memory, you can easily forget what causes data from application A to get to application B and when it happens. Besides, people other than yourself are likely to be working with your code and systems, and they will need a way to understand, at a glance, the big picture of the project. To do this, you can create a simple flowchart, by using Microsoft Word or purchasing a flowcharting package such as Visio. As with user documentation, the key to success is consistency. If your program documentation technique is consistent throughout your system—that is, all programs relating to one modification are marked, using the same modification identifier—you can find all of the programs related to a certain modification simply by using PDM’s search feature (option 25 from the PDM Work with Objects screen) on your source physical file (QRPGSRC).

Sticking to It

Whether you work in a small MIS department or a large one, setting documentation standards is only half the battle. Sticking to them and making sure that everyone else does,


too, is the other half. Using some of the techniques I’ve gone over here can make creating documentation less of a chore, while making it easier to use as well.

REFERENCES AND RELATED MATERIALS

• BCD International Web site: www.bcdsoftware.com
• DDS Reference (SC41-5712-02, CD-ROM QB3AUII02)
• Hawkeye Information Systems Web site: www.hawkinfo.com
• RPG/400 Reference (SC09-1817-00, CD-ROM QBKAQV00)

* ******************************************************************

* To Compile: CRTBNDRPG PGM(xxx/HELP) SRCFILE(xxx/QRPGLESRC) +

* SRCMBR(HELP)

*

* ******************************************************************

FHELPWINDS CF E WORKSTN SFILE(HELPTEXT:RRN)

FHELPFILE IF E K DISK

D EOFHelp S Like(*IN01)

D CsrRw S 3 0

D CsrCl S 3 0

D RTCode S 2

D Text S 70

D RRN S 5 0

C *ENTRY PList

C Parm Screen 10

C Parm CsrRow 15 5

C Parm CsrCol 15 5

C Parm RetCde 2

C*

C Eval CsrRw=CsrRow

C Eval CsrCl=CsrCol

C HelpKey KList

C KFld Screen

C KFld CsrRw

C KFld CsrCl

C*

C HelpKey1 KList

C KFld Screen

C KFld StRow 3 0

C KFld StCol 3 0

C*

C HelpKey2 KList

C KFld Screen

C KFld StRow 3 0

C KFld StCol 3 0

C KFld Line 3 0

C*

C HelpKey SetLL HELPRCD

C Screen ReadE HELPRCD

C If %EOF(HELPFILE)=*ON

C HelpKey SetLL HELPRCD

C Screen ReadPe HELPRCD

C EndIf

C If %EOF(HELPFILE)=*Off

C If ((HLSTRW<=CsrRw AND HLENRW>=CsrRw) OR

C (HLSTRW=0 AND HLENRW=0)) AND

C ((HLSTCL<=CsrCl AND HLENCL>=CsrCl) OR

C (HLSTCL=0 AND HLENCL=0))

C Eval StCol=HLSTCL

C Eval StRow=HLSTRW

C Else

C Eval RetCde='ER'

C Eval *INLR=*ON

C Return

C EndIf

C*

C* First Try Web Page version

C*

C Eval Line=0

C Clear RtCode

C HelpKey2 Chain HELPRCD

C*

C* Call program to using RUNRMTCMD to run the specified Application

C* (in this case the web browser using the help document)

C*

C If %FOUND(HELPFILE)

C Call 'DSPWEBPGE'

C Parm HLWBPG

C Parm RtCode

C Else

C Eval RtCode='ER'

C EndIf

C*


C If RtCode='ER'

C*

C* If RUNRMTCMD returned error display green screen help

C*

C HelpKey2 Setll HELPRCD

C Eval *IN30=*Off

C Write HELPWIN

C Eval EOFHelp=*Off

C DoW EOFHelp=*Off

C HelpKey1 ReadE HELPRCD

C Eval EOFHelp=%EOF(HELPFILE)

C If EOFHelp=*Off

C Eval RRN=RRN+1

C Eval TEXT=HLTEXT

C Write HELPTEXT

C EndIf

C EndDo

C*

C If RRN>0

C Eval *IN30=*On

C Exfmt HELPWIN

C Eval RetCde=' '

C Eval *INLR=*ON

C EndIf

C EndIf

C EndIf

C Eval RetCde=' '

C Eval *INLR=*ON

Figure 1: Use the RPG program HELP to display help text based on cursor position.

New_Ideas_in_Documentation_and_Help_Text05-00.png 397x259

Figure 2: Use an Access database to track program source modifications and save time performing future code maintenance.


Mike Faust

Mike Faust is a senior consultant/analyst for Retail Technologies Corporation in Orlando, Florida. Mike is also the author of the books Active Server Pages Primer, The iSeries and AS/400 Programmer's Guide to Cool Things, JavaScript for the Business Developer, and SQL Built-in Functions and Stored Procedures. You can contact Mike at This email address is being protected from spambots. You need JavaScript enabled to view it..


MC Press books written by Mike Faust available now on the MC Press Bookstore.

Active Server Pages Primer Active Server Pages Primer
Learn how to make the most of ASP while creating a fully functional ASP "shopping cart" application.
List Price $79.00

Now On Sale

JavaScript for the Business Developer JavaScript for the Business Developer
Learn how JavaScript can help you create dynamic business applications with Web browser interfaces.
List Price $44.95

Now On Sale

SQL Built-in Functions and Stored Procedures SQL Built-in Functions and Stored Procedures
Unleash the full power of SQL with these highly useful tools.
List Price $49.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: