Home > AS/400 Tips > iSeries programmer tips > Eight steps for creating program documentation using AS/400 utilities
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Eight steps for creating program documentation using AS/400 utilities


Carlito "Itto" Cruz, Contributor
08.11.2008
Rating: -2.69- (out of 5)


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


There is no doubt about the necessity of providing documentation after code has been placed into production. But I believe that being proactive demands the induction method, so I thought I should revisit a tip I submitted four years ago: Create an RPG technical document using existing iSeries utilities.

Program documentation should be up front. A business/systems analyst role calls for crafting documentation that will lead the coder in the right direction. It should make the programmer's work easy and efficient.

This work is a matter of strategy. Here is how it can be done:

1. Using the CRTSRCPF command, create a source physical file in your library (YourLib/QDOCSRC) where you will put your program documentation files.

2. Type the command WRKMBRPDM FILE(YourLib/QDOCSRC) to go to the Work with Members Using PDM screen.


Click image for larger version

3. Press F6 to open a screen similar to the one below:


Click image for larger version

In the above screen prompt, PROGRAMA was specified for the source member, TXT for the source type and Technical Specifications for the text description.

4. Press Enter to bring up a screen similar to this:


Click image for larger version

The analyst's program documentation work begins in the above screen. It is also here where most of the programmer's work will take place. Note: It is important that an asterisk (*) should be placed at position seven of every line when writing the documentation. By doing so, the programmer can just copy the source member into any desired source physical file. From there, he can opt to edit (using option 2) the copied file to another source type ( RPG, RPGLE, CLLE, etc.) of his choice.

5. To produce a report, execute the command WRKQRY to query the contents of YourLib/QDOCSRC. Specify the name of the member you worked on.

Using the 'Define result fields' option, define a field to use for searching commented lines.

Define result fields: Type definitions using field names or constants and operators. Press Enter.

Operators: +, -, *, /, SUBSTR, ||, DATE...

Field             Expression               Column Heading

Len Dec
COMMENT SUBSTR(SRCDTA,7,1)

6. Using the select and sequence fields, select SRCDTA column.

7. Using the 'Select records' option, define a filter to include only commented lines.

Select Records: Type comparisons, press Enter. Specify OR to start each new group.

Tests: EQ, NE, LE, GE, LT, GT, RANGE, LIST, LIKE, IS, ISNOT...
AND/OR Field Test Value (Field, Number, 'Characters', or ...)
COMMENT EQ '*'

8. Use the "Select output type and output form" option if you want to print your documentation.

For those of you who would like to move a step further, bear in mind that an iSeries source member is contained in a physical file. Any RPG programmer can actually write a full-featured integrated tool (a maintenance program with friendly interfaces), which will facilitate the above tasks -- maybe one that can be used by both the analyst and the coder.

ABOUT THE AUTHOR: Carlito 'Itto' Cruz is Lead Programmer Analyst at Kforce Global Solutions, Inc.

Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
iSeries programmer tips
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Implementing a browser interface in COBOL: Displaying database fields
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Making the most of RPG data handling on IBM i
Groovy programming on IBM i

iSeries ILE programming
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
How to use an embedded SQL statement and display the result in a subfile
Searching fields for values
Searching part of a name or address in AS/400
Top 10 programmer tips YTD
How to use the binder language to manage service programs -- Part 3: Examples and pitfalls
Top 10 programmer tips of 2005
Understanding the binder language on AS/400
How to use the binder language to manage service programs -- Part 1: Service program signatures

iSeries COBOL programming
Implementing a browser interface in COBOL: Displaying database fields
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Allow access to data from a stored procedure result set using COBOL or RPG
Coloring source lines with COBOL and using a shortcut from within PDM
Top 10 programmer tips YTD
Slow system performance
Changing the font size
New option within the WRKSYSACT command
Retrieve a program statement/line number
iSeries COBOL programming Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts