Introduction
The DOCUMENTOR tool has been written as an enquiry and cross referencing facility over ADK, and as a means to generate text files directly from the ADK definitions. This enables the developer to re-use any help text and commenting that is keyed in during the application definition.
DOCUMENTOR generates two types of output:
Text files for PC based word processors
Source files for AS/400 based word processors
Developers using AS/SET on the AS/400 now have the ability to view ADK definitions without opening them for update.
The enquiry facility over ADK enables a developer to identify an AS/SET definition and all its associates using one screen program.
Documentor has now been modified to enable the user to plug in other tools and utilities enabling greater access to the
AS/SET is a trademark of SSA Inc.
Turnover is a trademark of Softlanding Systems Inc.
DOCUMENTOR is a trademark of KDP Software Limited
ADK Enquiry/Cross Reference Facility
The enquiry facility allows the user to view the following ADK elements:
- Field reference definitions
- Where a field is used in database files
- File definitions
- Where a file is used by program
- Where a file is used by data model
- Data model definitions
- Programs using data models
- Program definitions
- Actions For Programs
- Parameters For Programs
- Fields Used
- Data models used
- Individual program documentation (user/technical)
- Repository subroutines
- Validation used
- Program usage
- Actions
- Field usage
- Audit trails
- Fields
- Report Layouts
- Program usage
- Document Profiles
Document Profiles
A document profile is a specification for a whole document which includes the following elements:
- Document introduction
- Section details (i.e. chapters)
- Section introductions
- Programs documented within each section
Within the DOCUMENTOR product is the facility to maintain and modify document profiles for each application set
allowing the user to merge entered text with details extracted from the repository.

PDM Style User Defined Options
Within DOCUMENTOR users now have the facility to define API's to execute the most used AS/SET functions.

The user defined options screen allows the user to execute any command or utility program over any of the displayed AS/SET definitions.
User options allow access to the AS/SET functions such as:
- print definition
- call impact of change
- call change management
- list display/report/batch programs within an application set
Supplied User Defined Options
Within DOCUMENTOR is a facility to list all associated definitions that can be called via the user options. We have also included in the product all the common AS/SET calls and one or two from the change management product Turnover.
Option Command
AO ?ADDPWLITM LIST(*ACTIVE) OBJ("&N") ATTR("&S")
AS call Ca0010c /* Call AS/SET */
CK ?Chkoutset "&N" "&T" /* Check out definition */
CL CALL PGM(QUSCMDLN) /* Display Command Line */
DM dspmsg
IC CALL PGM(CA0461C) PARM('B' '"&F"' 'D' '"&N"' ' ' ' ') /* Impact of change report
JL wrkoutq qezjoblog /* View Joblogs */
LA CALL PGM(CA0531C) PARM('B') /* List all Application Sets */
LB CALL PGM(CA0048C) PARM('Y' 'B' '"&F"') /* List Batch programs */
LD CALL PGM(CA0048C) PARM('Y' 'D' '"&F"') /* List all Display Programs */
LF CALL PGM(CA0455C) PARM('"&F"' 'B') /* List Field Repository */
LI CALL PGM(CA0439C) PARM('"&F"' ' ' ' ' ' ' 0.00 'S' 'N' 'B') /* List Ref Integrity */
LL CALL PGM(CA0453C) PARM('"&F"' 'B') /* List files */
LM CALL PGM(CA0409C) PARM('Y' '"&F"') /* List Data Models */
LP CALL PGM(CA0541C) PARM('"&F"' 'B') /* List all Programs */
LR CALL PGM(CA0048C) PARM('Y' 'R' '"&F"') /* List Report programs */
LT CALL PGM(CA0441C) PARM('Y' '"&F"') /* List Audit Trails */
PA CALL PGM(CA0532C) PARM('"&F"' 'B') /* Print Application Set Def in */
PB CALL PGM(CA0056C) PARM('0' 'B' '"&N"' 'N' 'P' ' ' 'Y' '"&F"' 'B' /* Print Pgm */
PD CALL PGM(CA0056C) PARM('0' 'D' '"&N"' 'N' 'P' ' ' 'Y' '"&F"' 'B' /* Print Pgm */
PL CALL PGM(CA0454C) PARM('"&F"' '"&N"' ' ' 'B') /* Print file defin */
PM CALL PGM(CA0451C) PARM('"&F"' '"&N"' 'B' 'Y' 'N' 'N') /* Print data model */
PR CALL PGM(CA0056C) PARM('0' 'R' '"&N"' 'N' 'P' ' ' 'Y' '"&F"' 'B'
PS CALL PGM(CA0456C) PARM('"&N"' '"&F"' 'B') /* Print Subroutine def */
PT CALL PGM(CA0456C) PARM('"&F"' '"&N"' 'B') /* Print Audit Trail def */
RV ?Rsvsetnam defn("&N") type("&S") /* Reserve definition name */
SG CALL PGM(AS0040C) /* View Submitted Generations */
VR ?WRKMBRPDM FILE(*prv/QRPGSRC) MBR("&N") /* View RPG for a definit
WJ wrksbmjob
WS WRKSPLF
XR XREF DEFN("&N") TYPE("&T") SET("&F") /* Cross Reference Report */
 
The user options facility also allows interfaces between other tools which may run over the native or the AS/SET elements of your system.
PDM Style Scan Facility
DOCUMENTOR now allows the developer to scan the relevant actions using a PDM style scan facility.

The scan facility allows the developer to produce summary reports of all members scanned as well as detail reports which print particular lines of action diagram where applicable.
Technical Documentation (example)
SLSMXXX Sales Master Template
Program Overview
The salesman master entry program is a list entry panel which enables
the user to create or amend salesman details on the system.
Full referential integrity has been set up in order to maintain the
integrity of the whole system.
Parameters Length
*NONE
Data Models and Files
OEXXX Order Entry System
| Fields | Description | Length | Data Model | File |
| SLS#XXX | Slsprsn Number | 50 P | OEXXX | SLSMXXX |
| SLSNAMEXXX | Slsprn Name | 25 A | OEXXX | SLSMXXX |
| SLSNOXXX | Slsprsn Number | 50 P | OEXXX | CUSTXXX |
| SLSOFXXX | Sales Office | 15 A | OEXXX | SLSMXXX |
SC0001 List Screen for SLSMXXX
*****5***10***15***20***25***30***35***40***45***50***55***60***65***70***75***80*
01. * *
02. * *
03. * *
04. * *
05. * Type one or more action codes. Then Enter. *
06. * 1=Create 2=Revise 4=Delete *
07. * Slsprsn Slsprsn Sales *
08. * Act Number Name Office *
09. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
10. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
11. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
12. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
13. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
14. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
15. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
16. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
17. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
18. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
19. * E EEEEE BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB *
20. * *
21. * Position to . . EEEEE- *
22. * *
23. * Enter F1=Help F3=Exit F7=Bkwd F8=Fwd F12=Cancel *
24. * *
*****5***10***15***20***25***30***35***40***45***50***55***60***65***70***75***80*
Pre Screen Actions
- Clear list panel and start display on first record in file. Performed only once at start of program.
- Count number of parms passed.
- Protect all parms first, Then if a parm was not passed, unprotect it and reduce parm count.
- If parms are not generated, these fields will be blank.
- Set Key values to parms passed
- Set Reposition values to parms passed
- Set file for list to first record in file
- Fill list Panel
Function Keys
CF01
- Process help requests on function key 1
CF03
- Exit program on function key 3
CF07
- Scroll information backward on function key 7
- 1. Check for any selected records.
- 2. Fill panel.
CF08
- Scroll information forward on function key 8
- 1. Check for selected records.
- 2. Fill panel.
CF12
- Exit program on function key 12
ROLLDOWN
- Scroll information backward
- 1. Check for any selected records.
- 2. Fill panel.
ROLLUP
- Scroll information forwards
- 1. Check for selected records.
- 2. Fill Panel.
Post Enter Actions
- Check for any selected records on post-enter.
- Reset reposition flag and check for any selected records.
- Check for reposition
- Check field only if not passed as parm.
- If reposition values entered, set key values to reposition values.
- Reset/clear reposition values to parms passed
- Refresh screen if record selected or if reposition was selected.
- Set pointer to file.
- Fill Panel.
Screen Subroutines
- S01BKW SCRN SUB
- Scroll information backward
- Clear hidden key arrays used for record retrieval.
- Save key values in key arrays.
- Fill any possible work fields in list panel with secondary file fields.
- S01EDT SCRN SUB
- Process Maintenance List Panel (ML)
- 1. Check for any selected records
- Add new record
- Set key values to header file
- Update existing record
- Delete existing record
- Process any optional action choices.
- 1. Set key values to hidden key arrays.
- 2. Retrieve file and any secondary files.
- 3. Display screen.
- If the action choice is not one of the allowed values, display error message.
- S01FWD SCRN SUB
- Scroll information forward
- Clear Hidden key arrays used for later >record retrieval.
- Save key information in key arrays.
- Set any work fields to values in secondary file fields.
SCEXIT Exit window panel
*****5***10***15***20***25***30***35***40***45***50***55***60***65***70***75***80*
01. * *
02. * *
03. * ******************************** *
04. * * Exit Options * *
05. * * * *
06. * * E 1. Exit Program * *
07. * * 2. Sign off * *
08. * * 3. Resume * *
09. * * * *
10. * * Enter F1=Help F12=Cancel * *
11. * ******************************** *
12. * *
13. * *
14. * *
15. * *
16. * *
17. * *
18. * *
19. * *
20. * *
21. * *
22. * *
23. * *
24. * *
*****5***10***15***20***25***30***35***40***45***50***55***60***65***70***75***80*
Function Keys
CF01
*** Display help
CF12
*** Resume
Post Enter Actions
*** Edit for correct option
User Documentation (example)
Sales Master Template
Program Description
The salesman master entry program is a list entry panel which enables the user to create or amend salesman details on the
system.
Full referential integrity has been set up in order to maintain the integrity of the whole system.
List Screen for SLSMXXX

Action code
- Create an new salesman record
- Amend an existing record
- Delete an existing record
If more than one screen of details exists enter the required
salesman number in the position to field at the foot of the
screen and the display will be repositioned.
Function Keys
- F1        - Process help requests on function key 1
- F3        - Exit program on function key 3
- F7        - Scroll information backward on function key 7
- F8        - Scroll information forward on function key 8
- F12      - Exit program on function key 12
- PGUP  - Scroll information backwards
- PGDN  - Scroll information forwards
Exit window panel

Function Keys
- F1       - display help
- F12       - Resume
Data Model Diagrams
Data model diagrams can be produced as printed reports from the AS/400, as AS/400 source files or as PC text files which are generated in a specified folder on the AS/400. These files can then be included into any of the popular PC based word processors or AS/400 text editors.
Diagrams for data models can be produced as follows :-
- By the whole repository
- By individual data model
The following example was generated using the ADK training set.
Application Set: SET1
Data Model: OEXXX Order Entry System

File Layout Reports
Users of AS/SET now have the facility to document all files as follows:-
- By repository
- By data model
- By individual file
The file layouts can be printed as a report, generated as an AS/400 source member or generated as a PC text file. The resulting files can then be included into AS/400 text managers or any of the popular PC based word processors.
File Layout by data model example
File Layout Report
Application Set: SET1
Data Model: OEXXX
File: *ALL
File: CUSTXXX Customer Master File
Physical
| Seq | Key | Field | Length | Description
|
| 10 | 1 A | CUCUST | P 7 0 | Customer Master Number
|
| 20 | | CUNAME | A 30 | Customer Name
|
| 30 | | CUADDR | A 25 | Address
|
| 40 | | CUCITY | A 15 | City
|
| 50 | | CUSTAT | A 2 | State
|
| 60 | | CUZIPC | A 10 | Zip Code
|
| 70 | | SLSNOXXX | P 5 0 | Slsprsn Number
|
Logicals based on file:
*NONE
File: OEPORDH Order Header File
Physical
Unique
| Seq | Key | Field | Length | Description
|
| 10 | 1 A | OHCUST | P 7 0 | Customer Master Number
|
| 20 | 2 A | OHONBR | P 7 0 | Order Number
|
| 30 | | OHORDT | S 6 0 | Order Date
|
| 40 | | OHSHDT | S 6 0 | Ship Date
|
| 50 | | OHLPDT | P 6 0 | Last Paid Date
|
| 60 | | OHSTS | A 1 | Order Status
|
| 70 | | ORTCST | P 10 2 | Total Cost
|
| 80 | | ORSTAX | P 10 2 | Sales Tax
|
| 90 | | ORNETD | P 10 2 | Net Due
|
| 100 | | ORPAID | P 10 2 | Total Paid
|
Logicals based on file:
*NONE
File: OEPORDD Order Detail File
Physical
Unique
| Seq | Key | Field | Length | Description
|
| 10 | 1 A | ODCUST | P 7 0 | Customer Master Number
|
| 20 | 2 A | ODONBR | P 7 0 | Order Number
|
| 30 | | ODINBR | P 5 0 | Item Number
|
| 40 | 3 A | ODLNBR | P 3 0 | Line Number
|
| 50 | | ODSHDT | P 6 0 | Ship Date
|
| 60 | | ODBODT | P 6 0 | Backorder Date
|
| 70 | | ODSTS | A 1 | Item Status
|
| 80 | | ODQTY | P 3 0 | Item Qty
|
| 90 | | ODUCST | P 9 2 | Unit Cost
|
| 100 | | ODTCST | P 10 2 | Total Cost
|
| 110 | | ODSTAX | P 10 2 | Sales Tax
|
| 120 | | ODNETD | P 10 2 | Net Due
|
Logicals based on file:
*NONE
File: SLSMXXX Sales Master File
Physical
| Seq | Key | Field | Length | Description
|
| 5 | 1 | SLS#XXX | P 5 0 | Slsprsn Number
|
| 10 | | SLSNAMEXXX | A 25 | Slsprn Name
|
| 15 | | SLSOFXXX | A 15 | Sales Office
|
Logicals based on file:
*NONE
Summary
- Documentation can be automatically generated and merged with keyed text
- Repository action subroutines can be cross referenced
- An enquiry only facility is available this allows a compiling program to be browsed
- PDM type scan over all actions for a definition or all definitions
- Cross reference report which runs over all application sets
- global application sets and referring application sets are supported
- Cross reference for audit trails
- User defined action codes allow interfaces for many other utilities
- Technical documentation can be easily generated into the following forms
- PC text files
- AS/400
reports
- AS/400
Source members
DOCUMENTOR will save the developer valuable time in the following areas:
- Automatically generating required documentation
- Quicker , easier access to definitions with browse only option
- Comprehensive cross referencing capabilities to identify definitions and associates