CA2E ToolkitConcepts ENU PDF
CA2E ToolkitConcepts ENU PDF
CA2E ToolkitConcepts ENU PDF
This documentation and any related computer software help programs (hereinafter referred to as the Documentation) is for the end users informational purposes only and is subject to change or withdrawal by CA at any time. This Documentation may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, without the prior written consent of CA. This Documentation is confidential and proprietary information of CA and protected by the copyright laws of the United States and international treaties. Notwithstanding the foregoing, licensed users may print a reasonable number of copies of the documentation for their own internal use, and may make one copy of the related software as reasonably required for back-up and disaster recovery purposes, provided that all CA copyright notices and legends are affixed to each reproduced copy. Only authorized employees, consultants, or agents of the user who are bound by the provisions of the license for the product are permitted to have access to such copies. The right to print copies of the documentation and to make a copy of the related software is limited to the period during which the applicable license for the Product remains in full force and effect. Should the license terminate for any reason, it shall be the users responsibility to certify in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed. EXCEPT AS OTHERWISE STATED IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION AS IS WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. The use of any product referenced in the Documentation is governed by the end users applicable license agreement. The manufacturer of this Documentation is CA. Provided with Restricted Rights. Use, duplication or disclosure by the United States Government is subject to the restrictions set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.2277014(b)(3), as applicable, or their successors. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies. Copyright 2009 CA. All rights reserved.
Contact CA
Contact Technical Support For your convenience, CA provides one site where you can access the information you need for your Home Office, Small Business, and Enterprise CA products. At http://ca.com/support, you can access the following: Online and telephone contact information for technical assistance and customer services Information about user communities and forums Product and documentation downloads CA Support policies and guidelines Other helpful resources appropriate for your product Provide Feedback If you have comments or questions about CA product documentation, you can send a message to [email protected]. If you would like to provide feedback about CA product documentation, complete our short customer survey, which is also available on the CA support website, found at http://ca.com/support.
Contents
Chapter 1: Introduction
Documentation ............................................................................... 1-1 Online Help ............................................................................... 1-1 Help Menu ................................................................................ 1-1 Assumptions.............................................................................. 1-2 CA 2E Toolkit Concept Summary ........................................................... 1-2
Contents
User Profiles ................................................................................ 2-67 Introduction ............................................................................ 2-67 General Considerations for User Profiles .................................................. 2-68 Password Validation ..................................................................... 2-78
vi
Checking or Verifying Lists ............................................................... 4-28 Combining Lists .......................................................................... 4-29 List Selection Functions .................................................................. 4-30 Generic Processing .......................................................................... 4-32 Generic Commands ...................................................................... 4-32 Using Generic Commands ................................................................ 4-34 Generic Command Messages ............................................................. 4-34 Generic Move Commands................................................................. 4-35 Generic Compile ......................................................................... 4-37 Generic Change Ownership ............................................................... 4-38 Generic Remove Member ................................................................. 4-38 Generic Delete Object .................................................................... 4-38 Generic Duplicate Object ................................................................. 4-39 Generic Command Change ............................................................... 4-39 Debug Aids .................................................................................. 4-39 Work with Database Files Utility .......................................................... 4-40 Start Debug Utility ....................................................................... 4-45 Utility to Copy a List of Database Files..................................................... 4-46 Setting a Break Program ................................................................. 4-47 Utility to Display a Programs Message Queue.............................................. 4-47 Compile Preprocessor ........................................................................ 4-48 Overview ................................................................................ 4-48 Enhanced functionality within the compile preprocessor .................................... 4-48 Preprocessor directive limit increased to 50 ................................................ 4-49 Wider range of substitution variables ...................................................... 4-49 Separation of pre- and post-compilation commands ........................................ 4-49 Exit program call functionality ............................................................ 4-50 Global control data area YBRTPXA......................................................... 4-51 Use of external source members to hold preprocessor directives ............................ 4-52 Integration with CA 2E using EXCUSRSRC ................................................. 4-53 General Considerations for the Compile Preprocessor ....................................... 4-55 Source Directives ........................................................................ 4-57 Edit Aids .................................................................................... 4-59 Display and Change Commands Manual: .................................................. 4-60 Message Manipulation Commands ......................................................... 4-60 Source Manipulation Commands .......................................................... 4-61 Source Conversion Commands ............................................................ 4-62 Special Display Commands ............................................................... 4-65
Contents
vii
Overview of Documentation Aids .......................................................... 5-3 System Documentation ....................................................................... 5-4 General Features of the Documentation Utilities ............................................ 5-4 General Considerations for System Documentation ......................................... 5-4 Toolkit Program/File Cross-Reference Documentation ...................................... 5-12 Execution Cross-Reference Documentation ................................................ 5-16 Field Cross-Reference Documentation..................................................... 5-20 Message Cross-Reference Documentation ................................................. 5-21 Authorization Cross-Reference Documentation ............................................ 5-24 Source Documentation................................................................... 5-27 Source Scan Documentation ............................................................. 5-27 Print Key Conversion .................................................................... 5-28 Documenting Designs ....................................................................... 5-30 General Considerations for Documenting Designs .......................................... 5-30 Documenting Menus ..................................................................... 5-31 Documenting Panel Designs .............................................................. 5-33 Documenting Report Designs............................................................. 5-35 Documenting Utilities ........................................................................ 5-35 Documenting Lists ....................................................................... 5-35 Documenting User Profiles ............................................................... 5-36
viii
Contents
ix
Index Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5 Error! Cannot open file referenced on page 5
Chapter 1: Introduction
CA 2E Toolkit is an integrated package comprised of software utilities for IBM i. This chapter provides an overview of Toolkit documentation, including help text and help menus. The arrangement of the Toolkit Concepts Guide is summarized and related publications are listed.
Documentation
The documentation for the Toolkit utilities is divided into two guides:
The CA 2E Concepts Guide gives a functional overview of the utilities, and how they link together. The CA 2E Reference Guide contains detailed explanations of each of the Toolkit commands that run the utilities.
This guide provides the basic concepts behind the product utilities, and how you can efficiently use these tools. If you have purchased only specific CA 2E modules, some of the utilities described in this guide are not available. Appendix E of this guide provides the contents of each CA 2E module. For details on how to invoke the individual utilities, see the CA 2E Reference Guide.
Online Help
Further documentation is available in the form of online help. All of the interactive CA 2E utility programs have full user procedures. You can access context-sensitive help by pressing Help in the application.
Help Menu
Help menus are also supplied for CA 2E. They display all of the commands in alternate groupings by subject and name. To display the help menus you can use the command Go to Menu (YGO *Y1).
Summary of Capabilities
Each chapter in this guide begins with an overview that summarizes the specific capabilities covered. The overview is followed by a more detailed consideration of the topics.
Chapter 1: Introduction
11
Documentation
Toolkit Reference Guide Standards Guide IBM i Programming: Control Language Programmers guide IBM i Programming: Control Language Reference Volume 1, Volume 2 SC21-9776-0, Volume 3, Volume 4, Volume 5. IBM i Programming: Data Description Specifications IBM i Text Management/38 Users guide and Reference Manual
Assumptions
It is assumed that the reader of this guide has a working knowledge of the Toolkit and, in particular, familiar with the following i OS concepts:
Subfiles Messages
Refer to the appropriate i OS manuals if you need more information on these topics.
Increase your productivity Improve the quality of what you produce Provide insight about using the Toolkit to the best advantage
The computer is used to assist and to organize both the developer and the user wherever possible. A consistent user interface is used throughout development.
12
Documentation
Help text, help menus, and select functions are available throughout the interface. A high-level object-orientated design approach is incorporated.
Chapter 1: Introduction
13
Introduction
The CA 2E Toolkit user access aids provide an easy way to set up and maintain operating environments for your Toolkit users. With the Toolkit user access aids, you can create and maintain a highly supportive environment for your users, without the need for programming changes.
Overview
There are four main areas covered by the user access aids:
21
Introduction
Each of the components can be used separately or all of the components can be linked together to form an integrated system. The four areas are discussed individually in detail in the pages that follow.
Type LIBL
Display command Other Toolkit commands YDSPLIBLST YCHGLIBL YCHGJOBDLL YBLDLIBLST YDLTLIBLST YCPYLIBLST YEDTLIBLST YCHGLIBLST YWRKLIBLST YRNMLIBLST YRNMLIB YDLTMNU YCPYMNU YRNMMNU YCRTDSNF YADDDSNFM YBLDDOC YADDHLPTBL YCPYUSRPRF YRTVUSRPRF YCRTUSRPRF YCHGUSRPRF YDLTUSRPRF YRNMUSRPRF YCVTUSRPRF YCHKPWDVAL YCHGPWD
MNU
YWRKMNU
YDOCMNU
YGO
TXT USR
(STRSEU) YWRKUSRPRF
YDOCSRC YDOCUSRPRF
YDSPHLP YDSPUSRPRF
PWD
YEDTPWDVAL
Example
The menus and help text provided as part of the Toolkit documentation have been prepared, and are displayed, using the Toolkit utilities. They provide examples of what they describe, and illustrate some of the ways that you yourself can use the utilities.
22
Introduction
An interactive list editor Documentation facilities Retrieval and replace facilities Selection facilities
Menu Facilities
CA 2E provides you with virtual menus: menus that have all the function and more of program type menus, but which require no compilation, and which can be interactively created and maintained. Menu features include:
SAA design Fully interpretive, that is, no compilation is required Message handling, including logging Option and menu level Help text Full recursion Integral system security Trapping of Cancel requests: the menu program is a requestor Command request entry (optional) Multi-page menus (optional) Option confirm prompt (optional) Direct transfer to a named menu (optional) Central logging of exception messages (optional) Immediate exit facility (optional) Optional debug and syntax checking facilities Automatic numbering of options (optional)
23
Introduction
Variable text display attributes, including color Full screen menu editor, similar to SEU Menu selection functions Full documentation facilities, including cross-referencing Option authority checking
Fully interpretive, that is, no compilation Full screen entry Automatic numbering Support of display attributes Support for embedding subdocuments
Support for help compliant with common user access (CUA) standards:
Help text index Contextual (cursor-sensitive) Help text Keys help Extended help Help for help
Full integration with system commands Interactive edit display Generic documentation facilities Extension attribute retrieval facilities Password validation
24
Introduction
2.
Use the command Build Library List (YBLDLIBLST) to create the list:
YBLDLIBLST LIBLST(LIBEL) LIBL(QTEMP QGPL Y1SY ORDENT) FRED) TEXT(Library list for
3.
Decide which initial menu or program you wish the user to have. For example, menu ORDENT in file YDSNMNU in library ORDENT.
25
Library Lists
4.
Use the Work with Menus (YWRKMNU) command to create the menu, if it does not already exist.
YWRKMNU MENU(ORDENT)
5. 6.
Decide what name you wish to give the new user profile; for example, FRED. Use the command Create User Profile (YCRTUSRPRF) to create the profile, specifying LIBEL as the initial library list, and ORDENT as the initial menu:
YCRTUSRPRF USRPRF(FRED) TEXT(Freds user profile) LIBLST(LIBEL) MENU(ORDENT)
7.
Library Lists
This section highlights CA 2E Toolkit library list facilities including naming, creating, changing, deleting, copying, editing, retrieving, displaying, and selecting library lists. The contents of the library lists are outlined and the commands that link the library lists, user profiles, and job descriptions are listed.
Introduction
Library lists provide an easy way of controlling what objects a job can access. The i OS library list is a very simple, yet powerful concept, but it does have some limitations, most notably that a library list is transient. The library list lasts only for the duration of a job or until replaced by another list, and all of the libraries in a list must be specified every time the list is required. For batch jobs, only the complete specification of all the libraries in a list, or the addition or removal of a single library from a list is possible, although the libraries in a list are edited interactively. Toolkit provides the capability to edit library lists, store them away permanently under a given name, and then retrieve and use the lists.
26
Library Lists
User portion of library list (*USRLIBL) including current library. Special value no change (*NOCHG) for current library makes storage of current library optional. Optionally, the name of a job description with an initial library list maintained by Toolkit commands to match the Toolkit library list. Library list type to enable subsetting Toolkit library lists. Text associated with the library list.
27
Library Lists
YCHGLIBL LIBLST(QGPL/FRED)
You can synchronize maintenance of an initial library list with a library list you are building. For example, using YBLDLIBLST to build a library list FRED in QGPL from the current jobs library list and to ensure that the initial library list (INLLIBL) of job description QBATCH in FREDLIB is synchronized, you would use the following command:
YBLDLIBLST LIBLST(QGPL/FRED) LIBL(*JOB) LSTTYPE(*INLL) LSTJOBD(FREDLIB/QBATCH) TEXT(Library list for FRED) CURLIB(*JOB)
28
Library Lists
You can also use this command to retrieve the contents of a library list into a program. Note that the command first verifies your authority to use and maintain the list.
29
Library Lists
210
Library Lists
If a Toolkit library list contains a Current Library entry, then the command Change Library List (YCHGLIBL) will, by default, also change the current library of the invoking job:
YCHGLIBL LIBLST(FRED) CURLIB(*LST)
211
Library Lists
The command Change Library List is available in an abbreviated form R, which enables you to refresh or replace your library list very conveniently. For example:
R FRED
You can use a library list on the command Create Objects (YCRTOBJ). The list is used for the Initial Library List (INLLIBL) and Current Library (CURLIB) parameters of the i OS command Submit Job (SBMJOB) used to submit the creates. For instance:
YCRTOBJ OBJLIB(FRED) LIBLST(FRED) MBRLST(TEMPLST)
You can set the Job Description (JOBD) parameter to the special value List Job Description (*LSTJOBD). This enables you to rematch the initial library list (INLLIBL) for the job descriptions referenced within library lists with their corresponding library lists.
YCHGJOBDLL JOBD(*LSTJOBD) LJBLST(*ALL)
The library list for a job description referenced on a library list is synchronized with the library list whenever the library list is updated using a library list command. You can turn off this action using the Update Job Description (UPDJOBD) parameter. For example:
YRMVLLE LIB(QRPG) LIBLST(FRED) UPDJOBD(*NO)
212
Library Lists
The command Remove Library List Entry (YRMVLLE) removes a named library from a list or lists:
YRMVLLE LIB(QPLI) LIBLST(FRED*)
The Toolkit command Rename Library List Entry (YRNMLLE) renames a named library list entry in a library list or lists:
YRNMLLE FROMLIB(QPLI) TOLIB(YPLI) LIBLST(FRED*)
In addition, you can specify that all references to the library by user profiles are also updated. For example:
YRNMLIB FROMLIB(BEAM) TOLIB(MOTE) LIBLST(*ALL) UPDUSRPRF(*YES)
213
Menus
A value of *SELECT allows you to choose one library list, while a value of *ALL allows you to choose many items.
Menus
This section highlights menus, indicating how the menu utilities can be used as both design and development tools. An illustration of a CA 2E Toolkit menu is provided and menu features are described. Other topics covered include:
214
Menus
Introduction
Dynamic menus system removes the need to have an individual i OS display file (and accompanying HLL program), for each application menu. All menus are instead stored in a special form with the help of a sophisticated interactive utility, the CA 2E Toolkit Work with Menus (YWRKMNU) program. A single menu display utility Go to menu (YGO), is used to present any menu to the user. This dynamic menu approach has many advantages:
Menus can easily be changed; in fact the process of creating or altering menus becomes so easy, that menus can be used for many other purposes. Menu changes are effective immediately; no compilation is involved. The menu display program conforms to SAA common user interface standards. Menus created with the System/38 version of Toolkit can automatically be displayed in Toolkit format. Changing or adding a menu does not disrupt live systems. Different versions of menus can easily be kept. The same menus can appear in different environments with different command keys. Advanced functions can be provided in all menus, including the ability to jump to any other menu, and to provide help text. Toolkit menus allow both a fast path and a slow path, so menus are more efficient to use: your users time is saved, especially when response times are slow. Less CL programming is required, as the menu display program can provide commonly required functions, such as obtaining confirmation, and job submission. Greater standardization is achieved. Less storage is required.
215
Menus
216
Menus
As a design tool: User functions and menus are rapidly designed in outline, and presented to the user for comment. Help text and panel designs can be set up for each option, and the associated documentation prepared. See the chapter Toolkit Design Aids for further details. As a development tool: The design menus are carried straight into development, with actual programs replacing panel and report designs when they are completed. Menus are also used:
To provide a framework to hold large documents for presentation, and for maintenance To provide a training aid: users can move around the menus in a system, looking at the help text for options, rather than executing them. Extra explanatory text and formatting can make menus very easy to understand. To group commonly used commands with different default parameters, without the need to write CL programs or alternative commands. As a presentation tool: functions are combined with explanatory text to provide a structure for computer-based presentations.
Importance of Menus
Menus are especially important for ensuring user satisfaction because they are the part of the system that is used most often. The requirements of your users as to how their menus are arranged are almost bound to change as the users become more familiar with a system, and as their work patterns evolve. It is important that you can respond quickly (and economically) to their demands. The Toolkit menus also allow you to cater to different levels of user sophistication.
217
Menus
218
Menus
The Toolkit menu display program is designed to be consistent with IBMs SAA standards, and in particular with IBMs menu display program (see the i OS command Go to Menu (GO)). Particular features include:
Request line entry: i OS CL commands may be entered on the bottom lines of the display. F09 - Duplicate previous request F10 - Invoke i OS QCMD program (optional feature) F14 - Display submitted jobs F16 - Return to major menu F23 - Reset current menu to be major menu
The menus you create with Toolkit are efficient to use, whatever the level of the users experience: beginners can take a step by step slow path, supported by explanatory text, while experts can take a fast path to specify their requirements quickly and concisely.
Naming Menus
Menus are referred to by a menu name. Menu names must be valid system names, that is, up to ten characters long and begin with a letter. For instance, to display a menu called FRED:
219
Menus
YGO MENU(FRED)
Storing Menus
Toolkit menus are stored in a data base file member. Many different menus can be stored in a single member, and a menu file can contain many members. When you refer to a menu, you may optionally also specify a name of the file and member containing the menu. For example:
YGO MENU(FRED) FILE(FREDSMENU) MBR(FREDERICK)
You can keep different sets of menus for different users in different files, and control access to the menus by granting or revoking authorization rights to the files. A default menu file is supplied with the Toolkit shipped system; it is named YDSNMNU. You can create your own copies of the menu file and give them any name you like, but each copy must have the same format as the shipped YDSNMNU file. The Toolkit command Create Design File (YCRTDSNF) is provided to give you an easy method of creating new menu files. For example, to create a menu file in library QGPL:
YCRTDSNF TYPE(*MNU) FILE(QGPL/YDSNMNU) TEXT(Menus for my system)
The recommended name for Toolkit menu files is YDSNMNU because it is the default name for the menu file on all the Toolkit commands that use menus. It is suggested that you call all your menu files YDSNMNU, and control which version you use using the library list. Menus within a menu file member can be regarded as analogous to source members within an i OS source file, such as QRPGSRC. You may have different sets of menus in different members in the design file. The Toolkit command Add Design File Member (YADDDSNFM) is provided to give you an easy method of adding additional members to design files. For example, to add a new member to menu file in library QGPL:
YADDDSNFM TYPE(*MNU) FILE(QGPL/YDSNMNU) MBR(EXTRA) TEXT
Menu Features
Two types of Toolkit menus are allowed:
Single option menus allow selection of only one option at a time: options are requested by specifying the option number.
220
Menus
Multiple option menus allow the selection of several options at a time, by typing a 1 against each option that is to be executed. When you select more than one option, the selected options are executed in the order in which they appear on the menu. If an error occurs among any of the selected options, the selections after the erroneous option will not be executed: un-executed options will be highlighted. Multiple selection menus are useful for occasions when you are likely to require a variable selection of several items, such as selecting reports to print.
The menu type is specified on the detailed edit display for the menu title line: see the section, Editing Menus.
Execute a given command, with or without parameters. The command request can either be in i OS syntax or in S/38E syntax. Execute a given program, with or without parameters (PGM). Call another menu (MNU).
221
Menus
Prompt the option: when the option is taken, the command specified as the option request will be prompted for some or all parameter values. This facility is mainly for use with commands. Note that selective prompting can also be used to protect particular parameter values. See the i OS Programmers Guide for details on the use of selective prompting. Submit the option: when the option is taken, the request associated with the option is not to be executed immediately, but rather is to be submitted to a batch queue. This feature can assist in development, performance tuning, and problem finding, since the function that determines whether a program runs in batch or interactively can easily be changed at any time. The job description used by the menu program to submit jobs can be specified as a parameter (JOBD) on the Toolkit command Go to Menu (YGO). You may specify for the option either: Y: The values on the specified job description are used to route the job. J: The job description values are overridden with values from the current interactive job. This can be used, for instance, to ensure that the submitted job had the same library list as the submitting job. The following values are overridden: INLLIBL, SWS, OUTQ, OUTQLIB, DATE, INQMSGRPY, LOG, Color
Confirm the option: when the option is taken, an answer to an additional confirmation prompt will be requested before the option request is executed. The confirmation prompt can require positive action either to confirm or to cancel execution. Thus: CONFIRM Y: Positive action to cancel. Pressing ENTER will confirm execution. Typing N will cancel. CONFIRM N: Positive action to confirm. Pressing ENTER will cancel execution. Typing Y will confirm.
Automatic Numbering of Menu Options The numbering of options can either be absolute, for example, 5, or relative, .N; the latter will cause the display program to generate an option number at display time. Using relative numbering, you can insert options on a menu at any time, and have the menu option numbering automatically re-sequenced.
222
Menus
Display Attributes for Menu Option Text Several features are available that make menus clearer to the user: text lines can be highlighted or underlined, or displayed in a different color, marginal headings can be specified on the left, and blank lines can be included to space out options. The color options will only be affected at terminals that support color attributes. Menus can continue onto several pages. Specifying Help Text for Menu Options You can specify help text for each menu option. This will be displayed if, when displaying the menu with the Toolkit utility Go to Menu (YGO), you move the cursor to the line showing the option you want to read the help text, and press the HELP key. If no help text document name is specified for an option, the menu display program assumes a default document name - which will be the same as the name of the program, command or menu invoked by the option. The name of the file in which it will look for the document name defaults to QTXTSRC: you may override this value yourself. Specification of a default help file name is done using two data areas:
YMHPFLA, containing the name of the default help file YMHPLBA, containing the name of the default help library
You can also keep different copies of the data areas, containing different default values, and control which is used using the library list. See the section in this manual on Help Text for further details.
Editing Menus
Menus are created or changed using the Toolkit utility Work with Menus that is invoked by the Toolkit command Work with Menus (YWRKMNU). The menu to be added/edited can either be named directly, or else chosen from a selection list:
YWRKMNU MENU(FRED) /* Work with Menus FRED */ YWRKMNU MENU(*SELECT) /* display existing menus for seln*/
An outline edit allows rapid full-panel design of menus, including text and numbering. The outline edit display allows you to enter online edit commands similar to those of the i OS SEU source editor Start SEU (STRSEU).
223
Menus
Detailed editing allows you to specify what each option does. The detailed menu edit display has i OS syntax checking and prompting support available.
224
Menus
225
Menus
You can select the menu title line for detailed editing by placing a Z in the selection column on the title line; the menu title display allows you to specify menu level details, such as the menu type, and the initial program for the menu (if any). The display attributes or colors specified for a menu title control the display attributes or colors used for the title line and the command line of Toolkit menus. You may use this facility to override the shipped defaults (green, reverse image).
226
Menus
The following diagram shows the main interconnections between the displays of the Toolkit program Work with Menu.
227
Menus
Documenting Menus
You can print menus using the Toolkit command Document Menu (YDOCMNU). This command prints a picture of each menu as it appears when used. The action associated with each option on the menu can optionally be listed below the picture of the menu. An additional Toolkit command Document Menu References (YDOCMNUREF) enables you to list where all commands, menus or programs are referenced by a menu or menus. The Toolkit command Document Execution References (YDOCEXCREF) also shows where Toolkit menus are used and which options are called from menus. See the section on documentation later in this manual.
YCRTDSNF: Create a new menu file. YADDDSNFM: Add a new member to a menu file. YCPYMNU: Copy a menu. YDLTMNU: Delete a menu. YRNMMNU: Rename a menu.
The Toolkit command Rename Menu (YRNMMNU) allows you not only to rename a Toolkit menu, but also to update all references to the menu on other menus within the same menu file so that they reflect the change.
Selecting a menu
Using a select function facilitates the use of menus. You can select or add to a list of existing menus, or perform any of the menu manipulation functions for a selected menu. The select function is invoked by specifying a value of MENU(*SELECT) when using the command Work with Menu (YWRKMNU). For example:
YWRKMNU MENU(*SELECT) FILE(YDSNMNU)
228
Menus
Displaying Menus
To display a menu use the Toolkit menu display utility which is invoked using the Toolkit command Go to Menu (YGO). The command requires you to specify a menu name: the named menu will appear as an initial menu. The YGO command can be entered either from the i OS command entry display (QCMD), or from any menu with a command request line, such as the i OS programmers menu (QPGMMENU), or be called from your own HLL programs. The command is also called by the Toolkit initial program (YINLPGM).
229
Menus
Users may branch to other menus from the initial menu. The branching may either be restricted to a hierarchical tree, or may be unrestricted, that is, branching is allowed to any existing named menu. When using the menu program they may at any point return to the previous menu (F12), or the initial menu (F03), or sign off (SO) altogether. As well as allowing users to branch to named menus, you may allow them to enter commands directly from the menu display.
230
Menus
A user who is not allowed to call menus directly may only follow a hierarchical tree, that is, call menus that are explicitly set up as menu options on the menus. With hierarchical calling of menus, in the following diagram menus D and E can only be reached and left using menu B, just as menus F and G can only be reached using menu C. Menu H cannot be reached at all.
A user who is permitted direct menu calling may either follow a hierarchical tree, or at any time transfer to another named menu:
Only menus within the same menu file member as that of the menu currently being displayed may be called directly. To call a menu directly, you type in *GO, followed by the name of the menu which you want to display. You will probably want to set up a separate menu file member for each user profile, user profile group, or both. This would permit users or user groups to move around their individuals freely, but only allow access to other menus belonging to other users on a strictly controlled basis.
231
Menus
You may combine restricted and unrestricted calls in the same menu tree.
232
Menus
Commands are entered on the request line at the bottom of the display. Parameters may be specified for entered commands. The command prompter may be invoked to help with command entry by pressing F04.
Commands can also be submitted: to submit a command, *SBM (or *S for short) must be entered immediately before the request. The job will be submitted using the job description specified on the JOBD parameter of the YGO command. Alternatively you may enter a value of *JOBSBM (or *J for short) which will submit the request, overriding the job description with the current jobs attributes, for example, library list, and output queue. To examine submitted jobs use F14 to invoke the i OS command Work with submitted jobs (WRKSBMJOB). If command entry is allowed, F10 will call the i OS Command entry program (QCMD).
233
Menus
If *CHECK (or *C for short) is specified prior to the option number (for example, *CHECK 3), the request string for any menu option taken will be syntax checked by the i OS command checkers (QCMDCHK or QCACHECK according to the option type), but not actually executed. If *MNUWRK (or *M for short) is specified on the request line, the Toolkit command Work with Menus (YWRKMNU) will be invoked for the current menu. On returning from the edit program, the menu display will be refreshed with the newly edited menu. This gives a convenient way of correcting menus in error. If *AUT (or *A for short) is specified prior to the option number, the command Display Object Authority (DSPOBJAUT) will be invoked for the program or command specified as the option action. Note that to be allowed to use the debug aids while displaying menus, you must specify CMDENT(*YES) on the command Go to Menu (YGO) when you enter the menu program.
Function Submit a request - JOBD Submit a request - *JOB Go to a menu Work with current menu Display option request Check option syntax Check option authority
Value in request line Command request Command request Menu name Option number Option number Option number
When the cursor is on one of the menu option lines, the Help text for that option is displayed. When the cursor is on the menu title line, the Help text for the menu is displayed.
234
Menus
When the cursor is anywhere else, the Help text for the menu display program is displayed.
For information on other types of help available, see the section on Help Text later in this chapter.
The menu program has a program message queue subfile: all messages appear on line 24 as a subfile. You can examine the messages by moving the cursor to line 24 of the menu display, and scrolling up or down and/or pressing Help. If your programs crash, the escape messages will automatically be trapped and displayed on the message line. Completion messages and diagnostic messages will automatically be displayed on the message line, where they can be scrolled. Your own messages can be made to appear on the message line of the menu display, complete with second level Help text and substitution variables. To make a message appear on the display you may either: a. Simply send the message to the previous program message queue in the invocation stack.
For example, the following impromptu message will cause HELLO SAILOR to appear on line 24 of the menu display: SNDPGMMSG MSG(HELLO SAILOR) While this predefined message: ADDMSGD MSGID(USR0001) MSGF(QUSRMSG) MSG(&1 Pints today &2) SECLVL(Must be gold top.) FMT((*DEC 3) (*CHAR 10) )
235
Menus
will cause the message 002 Pints today please to appear on line 24 if it is sent to the menu program by your own CL program: SNDPGMMSG MSGID(USR0001) MSGF(QUSRMSG) MSGDTA b. Send the message directly to a named program message queue. If you have nested invocations of application programs - program A calling program B calling program C - you may wish to send messages directly to the Toolkit menu program by name. Such messages should be sent to the Toolkit menu message handling program YDMNGOC. For example: SNDPGMMSG MSGID(USR0001) MSGF(QUSRMSG) MSGDTA(002please) TOPGMQ(*SAME YDMNGOC) The menu program provides a completion message for each option executed. The message (YMN0027 in the Toolkit message file, YYYYMSG) has the form: Last option was N. option text Use of this feature can reduce the amount of CL programming that you have to do.
The execution messages of programs called by menu options will be logged according to the jobs logging level: refer to chapter 13 in the i OS Programmers Handbook for details on message logging levels. Request messages are also logged: it is possible to use the display low level messages facility (F10) of the command entry display to examine request messages that were initially sent as the result of taking menu options on a Toolkit menu. The message logging level of your jobs, which can be changed by, for instance, the i OS command Change Job (CHGJOB) - affects which messages are displayed in your log.
Security Considerations
To be able to execute a menu option, users must be authorized to the program or command that the option calls. The appropriate i OS error message will be displayed if the user is not authorized, namely: CPD0032 : Not authorized to command CMDNAME in LIB CPF9802 : Not authorized to object OBJNAME in LIB type PGM. Authorization to menus - the right to display a menu or menus (though not necessarily to invoke the menu options) - can be implemented by dividing menus into separate files, and granting or revoking users authorizations to those files. For example:
GRTOBJAUT OBJ(YDSNMNU) OBJTYPE(*FILE) USER(FRED) AUT(*READ)
236
Menus
AUT(*READ)
Concurrency Considerations
A user is given the version of the menu that is current when he first displays the menu, that is, a menu is not reloaded between the selection of options on the same menu. Therefore, if a menu that is being displayed at one workstation is changed at another workstation, the change does not alter the displayed version until the displayed version is refreshed. Refreshing will occur if a second menu is called, and then the original menu called again.
Recursion Considerations
The Toolkit program Display Menu can appear more than once in the job invocation stack. A new invocation of the program will be made every time the command YGO is invoked, either as a menu option or through the request line. Typically this will be done to change menu file, or menu file member, or when the menu display program is called recursively using another program. New Invocation: If recursive calling of the menu display program using another program:
237
Menus
New Invocation: If recursive calling of the menu display program by means of YGO, so as to change file or member: Same Invocation: If new menu is called by a menu name (for example, *GO Fred) or a menu type option:
238
Help Text
You may specify a value for the Go to Menu SIGNOFF option as part of the Toolkit user profile extension attributes:
YCHGUSRPRF USRPRF(FRED) LOGOFF(*LIST)
As a means of providing selection options from your own programs. As a framework to hold documents. Say that you have a large document such as a system specification, that requires repeated editing. You could set up a menu with a separate option to edit each section. A final option could print the complete document. As a training tool. Users may go to Menus and examine help text without actually executing options. Additional explanatory text can be added to the menu displays. Problem determination trees can be created to guide users through areas requiring operator intervention. As a framework for CL commands, that is, to present commonly required CL commands in a specified order, with or without override parameter values. This can be especially useful for functions where a lot of operator intervention may be required, or where frequent procedural changes are required. For instance, you could set up a menu for your backup.
1. DSPDKT ??DEV(DKT01)??DATA(*SAVRST) See whats on diskette 2. ?DSPLIB See how big library is 10. SAVLIB FRED DEV(DKT01) CLEAR(*ALL)/* Mondays */ 11. SAVLIB ALFONSO DEV(DKT01) CLEAR(*ALL)/*Fridays/ 12. SAVLIB GREGORY DEV(DKT01) CLEAR(*ALL)/* Both days */ 13. SAVOBJ CYRIL/*ALL DEV(DKT01) OBJTYPE(*JRNRCV) CLEAR(*ALL)
As a presentation tool. If you need to present information using the computer, you can use Toolkit menus to provide a framework. The headings and text can be placed on menus, interspersed with calls to the appropriate programs or functions that illustrate your argument or explanation. Course handouts can be prepared directly from the printed menu images.
Help Text
This section tells you how to write, index, display, and document help text. Contextual and conditioned help text is described, and commands to manipulate help text are listed. Help text directives are outlined indicating how to control the display of help text.
239
Help Text
Introduction
The Toolkit help text facilities enable you to provide interactive help text for all of your menus and application programs.
You can specify an index for the help text. You can specify which part of the text is to be displayed for a given cursor location (contextual or cursor sensitive help text). You can condition the relevant part of a help topic to be displayed, based on the circumstances.
Using Toolkit you can create online help text in a fast, flexible, way using the command Start SEU (STRSEU) of the i OS Source Entry Utility or S/38 Edit Text command (QSYS38/EDTTXT) of IBMs Text Management/38. Both utilities have full screen editors that allow you to lay out text as it is to appear (Whatyou-see-is-what-you-get), and to specify an index for the help text. Help text for a program is stored as a text document. When the user presses Help, either while displaying a menu with the Toolkit Go to Menu program (YGO), or while using an interactive application program, the program is temporarily suspended, and a specified document is displayed as help text. True context- sensitive help text can easily be provided in your own application, such as the right words in the right place.
You can write help text as it is to appear. Several special facilities provide useful short cuts, such as numbering sections automatically, and imbedding standard paragraphs. Most of the print control facilities of Text Management/38, such as underlining, are implemented, so you can format readable help text.
240
Help Text
241
Help Text
All the text, starting at the beginning An index, which allows you to jump to the part of the text you are interested in Text relevant to the position of the cursor on the panel from which the help text was called Text relevant to the conditions under which the help text was called (for example, different text depending on whether you are adding or changing records)
242
Help Text
Contextual - Specific to cursor position gives the purpose and use of the item for which the user requested help. Extended - Describes the application panel from which the user requested Help. Help Index - Sequenced list of help topics for the application from which the user can select a topic for display. Keys help - List of application function keys, including brief descriptions. Help for Help - Information on how to use help facilities, including how to access contextual, extended, keys, and index help.
Enlarged help enlarges the help window to full window size (CUA/Text style only). Reposition moves the help window to the cursor position (CUA/Text style only). Print help prints extended help for the application. Edit help invokes the edit function on the extended help source member.
Requesting Help
Users can request help in two general ways:
Select one of the Help action bar pull-down choices, which results in display of a help pop-up window containing the requested topic. Press function keys assigned to common help actions, which results in one of the following: For F1= Help from an application panel, access to contextual or extended help in a help panel, depending on cursor location For function keys from help panels, access to the type of help specific to the function key
To request Contextual help, press F1= Help from an entry field, a selection field, or other defined contextual help area on the application panel. A help panel appears containing information about the specific field or item.
243
Help Text
To request Extended help, press F1= Help from anywhere on the application panel other than a defined contextual help area, or press F2= Extended from any help panel. A full help panel appears containing information on how to use the application panel. To request Keys help, press F9= Keys help from any help panel. A help window displays a list of application function keys and the purpose of each. To request Help Index, press F11= Index from any help panel. A help window presents a scrollable list of help topics from which to select one for display. To request Help for Help, press F1= Help from any help panel. A help popup displays information on using the help facilities.
Users navigating through various help panels can either end the help session directly by pressing F3= Exit or back out one panel at a time by pressing F12=Cancel. Once a help panel appears, users can size and position the panel to their preference as follows:
To enlarge the help window, simply press F20= Enlarge from any help window. To reposition the help window, position the cursor at the desired location and press F19= Reposition. (An enlarged help window will return to its original size when repositioned.)
Users can also have the option to print and edit help as follows:
To print help, press F14= Print from any help panel (except Help Index). To edit help, press F15= Edit from any help panel (except Help for Help and Help Index). You can disable the edit capability by removing the F15 function key definition from the shipped window definition for help panels.
Key F1 F2 F3 F7 F8
244
Help Text
Function Keys help Index Cancel Print Edit Reposition Enlarge More keys
Character .N m
245
Help Text
Notes Various effects, for example, underline, capitals Document reference has syntax: (Document File Library)
.IM (doc)
.date .docid Document/File/Library will appear where specified Line will not be displayed
Comment line
.*
Text Directives
Toolkit also introduces a number of extra control characters (directives) to provide additional functions. All Toolkit control characters begin with .*: this means they do not appear when help text is printed. The following table includes Toolkit text control characters executed by YDSPHLP
Notes Text appears as title line on Help text display Text appears on display, but not in printed document. Not displayed, but used to control which part of the text is displayed. LBL points to a Label entry line: it can be up to 10 characters long. Text appears as entry in Help display index. LBL points to a Label entry line: it can be up to 10 characters long. LBL corresponds to an Index entry line, or to a Vector table entry line.
Index entry
Label entry
. *YH: LBL
In each case the directive must begin in column one with a . (full stop) followed by the directive name *T: in columns 2-4 or *Y*:, *YV:, *YI: or *YH: in columns 2-5 . The directive name, labels, and so on, may be entered in upper or lower case (abc and ABC are equivalent).
246
Help Text
Notes Dimensions of window to display help text. If .*YW: not present, default is from data area YMHPYWA. Tab and margin formats of help text. (Not required if TM/38 paragraph definitions are used.) Identifier of format definition (. *YD:) for text entry Label corresponds to help text about function keys. If . *YK not present default is taken from data area YMHPYKA.
Format definition
Text entry
. *YF: ID
. *YK: LBL
To specify points in the document to which the help display program may jump: At entry (vectored entry). Under user control once within the document (index choices).
To specify an index to be displayed on entry or at the request of the user. To specify a title to appear on the top of all help displays. To specify help window attributes.
247
Help Text
Example The following diagram illustrates how a help text document might be structured to provide both an index and to support vectored entry, that is, display of the help text starting at a specified point.
1. 2. 3.
A cursor coordinate is passed into the help display program. The help display program uses the vector table at the beginning of the text to translate this into a label. The help display program displays the help text indicated by the specified label.
1. 2.
A label name is passed into the help display program. The help display program displays the help text indicated by the specified label.
248
Help Text
1. 2. 3. 4.
The help display program displays extended help. The user specifies an option from the help index. The help display program translates this into a label. The help display program displays the help text indicated by the specified label.
Invoking EDTTXT
While displaying a help text document, you can invoke the S/38 Text Management/38 Edit Text command (QSYS38/EDTTXT) to edit the same document, simply by pressing F15= Edit. If desired, this facility can be used to allow users to write or amend their own help text. You may not update a help text member unless you are authorized to update the file containing the member.
Press Help to get the help text appropriate to the program being used. Select a choice from the help action bar pull-down.
The following section describes how to specify which help text document is displayed, and when.
249
Help Text
The default document name used by the Toolkit program Go to Menu (YGO). If no help text member is specified for an option, the default help text document name used by the menu program is the name of the program or command specified for the option. It will save you coding effort if you give a help text member the same name as that of the program or command that it explains. How to associate programs with their help text. The standard help text call included in application programs can use the program name (retrieved from the Program Status Data structure) as the help text document name, to save coding effort. How the documents will be grouped when they appear in indices. It helps to have documents grouped in a logical order. If you already give your programs names that cause them to be grouped in a logical order on indices, then it would be sensible to give each help text document the same name as the program that it explains.
250
Help Text
Note: You should give a help text member the same name as the command or program for which it gives an explanation.
YMHPFLA - specifies the name of the default help text file. YMHPLBA - specifies the name of the default help text file library.
Default versions of the data areas are provided in the Toolkit library. You are free to change the values of these, or to provide additional copies in other libraries. If the YMHPFLA data area contains a value of QTXTSRC, and YMHPLBA contains a value of *LIBL, then the following text member names will be used:
PGM/cmd
Used by YDSPHLP Mbr BILL BILL BILL BILL HUBERT File QTXTSRC FREDTXT QTXTSRCT FREDTXT Library *LIBL *LIBL HUBERT
-FREDTXT --
---
*LIBL *LIBL
FREDTXT
FRED HUBERT
FREDTXT
Note: A member name must be specified when calling the help text display program from within an application program.
251
Help Text
Examines UHLPTXT in QGPL for FRED and does not find a candidate member. Examines UHLPTXT in EVERYMAN for member FRED, finds a candidate, and uses the candidate.
252
Help Text
253
Help Text
Where a panel can operate in more than one mode (for example, adding or changing records) and different help text is required for each mode. Where there is a choice of fields to display in one place on a panel (for example, fields conditioned by an indicator). Where you wish to provide more than one level of help text (for example, novices or experts).
The Toolkit help display program makes use of label groups to determine which section of help text will be displayed. Label groups are specified as part of the vector table entries described previously. Up to three label groups may be specified for each vector table entry, each preceded by a space or an N. The N indicates not, that is, not belonging to that label group. If more than one label group is specified on a vector table entry, the conditions are ANDed together. The YDSPHLP program compares these label groups with those supplied at run time by the LBLGRP parameter to decide whether a particular vector table entry is eligible for use or is to be ignored. For a vector table entry to be eligible, all the label group conditions specified on the entry must be satisfied by the list of label groups supplied by the LBLGRP parameter. Thus, both the following conditions must be satisfied for an entry to be eligible:
If an entry has a label group specified for it (not preceded by an N), that label group must be in the list supplied by the LBLGRP parameter. If an entry has a label group preceded by N specified for it, it must definitely not be in the list supplied by the LBLGRP parameter.
If LBLGRP(*NOCHK) is specified, then no label group checking will take place. If LBLGRP(*NONE) is specified, then only those entries with no label group at all, or with all label groups preceded by an N, will be eligible. For example:
LBLGRP A A A A A A
Result Eligible Eligible Not eligible Not eligible Not eligible Eligible
254
Help Text
LBLGRP A A A A B B B B
Result Eligible Eligible Not eligible Not eligible Eligible Not eligible Eligible Not eligible Eligible Eligible Eligible Eligible
index is displayed first page of help text will be displayed if there are no index entries
Example of the Use of Label Groups This example illustrates how you could produce different help text for the same area of a panel under different circumstances. For instance, you might have a customer code which, depending on what the user has specified on preceding displays, could either be the code of a customer to whom delivery is to be made, or the code of the customer to invoice. The help text could have two entries in the vector table, each with a different label group, for example, A or B, and a different label, for example, CUS_INV, or CUS_DELIV.
The actual text displayed for a cursor location within the specified area would then depend on the label group specified:
If LBLGRP(A) is specified, the display of help text starts at label CUS_INV. If LBLGRP(B) is specified, the display of help text starts at label CUS_DELIV.
255
Help Text
Create Source Physical File CRTSRCPF: Create a file for Help documents. Copy Source File CPYSRCF: Copy a Help document or documents. Remove Member RMVM: Delete a Help document.
256
Help Text
257
Help Text
Order of Directives
The directives must appear in the following order: 1. 2. 3. 4. 5. 6. 7. 8. 9. *T: (Title) must occur before any *YH: entries. *YW: (Window size) must occur before any other entries except *T:. *YD: (Window format definition) must occur before any *YF: , *YV: entries. *YK: (Keys help vector) must occur before any *YV: entries. *YV: (Vector table) must occur before any *YI:, *Y*: or *YH: entries. *YI: (Index entry) must occur before any *YH: entries. *Y*: (Index display-only entry) must occur before any *YH: entries. *YH: (Label entry) must occur after all *T:, *YV:, *YI:, *Y*: entries. F: (Window format) must occur after all *T:, *YD:, *YK:, *YV:, *YI:, and *Y*: entries.
Title text: The text specified in columns 6-80 will be used as the title.
258
Help Text
Window width: 2-digit number (32 through 74) for the width of the help window. Window depth: 2-digit number (09 through 21) for the depth of the help window. Vary depth: 1-character indicator: Y - adjust initial help window depth lower than the given depth either to fit displayed help text or to size window on the application panel N - or blank - no adjustment
259
Help Text
Definition ID: 2-digit identifier (01 through 99) for the definition. You can reference this identifier in subsequent window format (*YF:) directives. Start Tab position: 2-digit number (00 through 09) for number of tabs from the left margin at which to start text. Window width is divided into ten tabs. YDSPHLP calculates tab size based on window width. Start Text size: 3-digit number (-99 through +99) for the absolute size of starting text for the format. You can use starting text for headings and definition terms (to which you can attach word-wrapped descriptive text). Starting text is formatted exactly as entered including blanks. A negative number indicates how many spaces to indent the first line. The length of starting text and the start tab position determine the left margin to which the formatted text wraps. Blank before: 1-character indicator; Y - precede format with a blank line, N or blank - do not precede with a blank line.
260
Help Text
Keys help label: Marks the location of Keys help within the help document.
261
Help Text
Label group: up to three separate label groups (a label-group is one character long) may be specified, each preceded by a space or an N. Label groups allow you to display different parts of the same text member under different circumstances. Any alphabetic or numeric character may be used to identify a label group. The YDSPHLP program will compare these label groups with those supplied at run time by the LBLGRP parameter, if any, to decide whether a particular vector table entry is eligible for use or is to be ignored (see the following section on conditioned help text). Row coordinates: must be between 1 and 24; leading zeroes may be entered as blanks. Column coordinate: must be between 1 and 132; leading zeroes may be entered as blanks. Label name: must refer to the label specified on a *YH: directive placed in the body of the help text. You may also specify the same label on an index entry directive (*YI:), though this is optional. Any text in columns 36-80 following a label name will be ignored.
Label name: must be a unique identifier, up to ten characters long, of an index entry. For each *YI: entry a corresponding *YH: label entry is required. Index entry text: The text specified in columns 18-80 will be displayed in the help text as the index entry. Note: If the index entry text has a display attribute, that is, is highlighted or underlined, then it should not start before column 19 (to allow for the display attribute byte).
262
Help Text
Index entry text: The text specified in columns 9-80 will be displayed as part of the help text. If the text has a display attribute, that is, is highlighted or underlined, then it should not start before column 10 (to allow for the display attribute byte).
263
Help Text
Label name: must be a unique identifier up to ten characters long corresponding to an index or vector table label entry. Label entry text: The text specified in columns 18-80 will be displayed as part of the help text. If the text has a display attribute, that is, is highlighted or underlined, then it should not start before column 19 (to allow for the display attribute byte).
Definition ID: 2-digit identifier for the format of text to follow. Enter the same identifier as that of the window format definition to be used. If the Definition ID is zero, the text to follow remains unformatted and is not word-wrapped.
264
Help Text
Text Management/38 Paragraph Option Left margin Right margin Align Right Paragraph Indentation Blank Line before paragraph Automatic Hyphenation
Display Help Derived Format Option Divide by tabsize and round to nearest whole tab. Set Start Tab Position to ths number. Right margin is always the current window width. Text is not aligned right. Negate this to give Start Text size. Set Blank Before option to this. Text is not hyphenated.
265
Help Text
For this example of text source, the Keys Help would be displayed as follows:
266
User Profiles
User Profiles
This section tells you how to create, change, delete, rename, document, and copy user profiles. Other topics covered include retrieving user profile details and using user profile extension attributes.
Introduction
CA 2E Toolkit provides facilities both to help manage your existing user profiles, and to set up and maintain Toolkit user profile extension attributes for your profiles. A user profile is the i OS object used to control user access to Toolkit, and to define what objects a user may use on the Toolkit. There are good reasons for making full use of i OS user profiles:
The i OS security that is obtained through user profiles is implemented at a microcode level and so is very secure. User profiles give you a convenient means of specifying exactly what a given user may or may not do. User profiles give you a convenient means of finding out exactly who did what, when; that is, they provide a means for system auditing.
267
User Profiles
A Toolkit user profile corresponds to the i OS definition; that is, it is a description of what a particular user may do on the computer, accessed by a single password, and guarded by security implemented at the microcode level. Toolkit allows extensions to the attributes that can be given to a user profile. The Toolkit user profile extension attributes are mainly concerned with the initiating of interactive jobs; that is with controlling user access onto the system, and include an initial library list, an initial menu, and a suspension status. Users may be suspended so that they cannot sign on.
The library list for the job is set to the specified stored library list. Password expiry is checked. The specified initial menu is displayed, or initial menu option executed.
The source of YINLPGM is available, so that you may add in any requirements that are peculiar to your environment. With the Toolkit user profile extensions, you can create and maintain a highly supportive environment for your users, without the need for programming changes.
268
User Profiles
YRTVUSRPRF YWRKUSRPRF
The following diagram shows how the Toolkit user profile commands interconnect.
Extension Attributes
Toolkit allows you to specify the following extension attributes for user profiles:
A password expiry date or change period (see below) An initial library list to be used at sign-on An initial menu, (and menu file + library) to be used at sign-on
269
User Profiles
Whether the user is restricted to direct menu calling (see section on menus in this manual) Whether the user is allowed to enter commands from his menu (see section on menus in this manual) Whether the user is suspended: this option can be used to prevent users signing on, for example, while new application programs are being implemented The name of a job description to be used when the user submits jobs from his menu Whether to sign off with LOG(*YES)
270
User Profiles
If 5 is specified as a select value against a line on the previous display, the Display User Profile details display is obtained, which allows you to examine and change the Toolkit attributes of existing user profiles. From the display you may invoke commands to both to change the profile and to edit the contents of the initial library list and initial menu associated with the profile.
The following diagram shows the interconnections between the displays of the Toolkit Work with User Profile program.
271
User Profiles
Any new profiles created with the Toolkit Create User Profile utility will have the Toolkit initial program (YINLPGM) as their initial program, unless you specify an override value. LMTCPB(*PARTIAL) is specified to prevent a user from overriding the initial program from the Toolkit sign-on screen or the i OS command Change Profile (CHGPRFF).
272
User Profiles
Existing user profiles can be brought within the Toolkit system by using the Toolkit change user profile command upon them. YINLPGM should be specified as the initial program. If you wish to bring all of your existing user profiles into the Toolkit system, the Toolkit object list utilities can be used. See the section on lists later in this manual for further details. For example:
YBLDOBJLST OBJ (QSYS/*ALL) OBJTYPE (*USRPRF) /* Build list */ YFLTOBJLST FILTER(*OMIT) OBJ(Q*) /* Omit all sys prfs */ YEXCOBJLST RQSDTA(YCHGUSRPRF USRPRF(@O) INLPGM(Y1SY/YINLPGM) INLMNU(*SIGNOFF)) rfs */
273
User Profiles
Security Considerations
To be able to use the Toolkit user profile manipulation commands, you must be authorized to the systems create, change and delete user profile commands: typically (and in the i OS shipped system) only the security officer will have such authorization.
274
User Profiles
4.
Set the initial library list for the user. If the initial library is not found, send a diagnostic message and terminate the job. If the initial library list contains libraries that either do not exist, or that the user is not authorized to use, send a diagnostic message and terminate the job.
5.
Execute the specified action for the user: Either: display the specified initial menu for the user. Or: execute the program specified by the initial menu option for the user. See Using Different Control Programs below.
6.
Return. Subsequent processing will depend on the value specified for the INLMNU parameter on the profile: If INLMNU(*SIGNOFF) is specified, the job will terminate. If any other value is specified for INLMNU, the nominated i OS menu will be displayed.
Note: If you alter the Toolkit initial programs we suggest that you keep the modified versions in a different library from the Toolkit shipped library. This is because modified versions of the initial program may be shipped in subsequent releases of Toolkit.
To use Toolkit user profile extension facilities without having to code your own versions of the Toolkit initial programs To invoke additional initialization processing - for instance to set overrides which are to be in effect globally To supply parameters to an initial control program
275
User Profiles
To use Toolkit user profile extension facilities in conjunction with i OS menu objects
The Toolkit initial program (YINLPGM) will still be used as the initial program for the profile. The overall sequence of control is shown in the following diagram:
276
User Profiles
2.
277
User Profiles
To provide QPGMMENU as the initial program, with the restricted changes allowed, you would specify:
YCHGUSRPRF USRPRF(FRED) MENU(FRED) OPTION(2)
This method gives you an easy and instant way of specifying and changing the parameters for the i OS Programmers Menu (QPGMMENU): you could specify a menu option consisting of the i OS Start Programmer Menu (STRPGMMNU) command with the appropriate override values. Note: You should not use relative numbering to number menu options used by the initial program. For a definition of relative numbering, see the section in this manual on menus.
Using i OS menus
You may also use i OS menus in conjunction with the Toolkit user access system: on normal completion, the initial program YINLPGM returns without invoking the i OS command Sign off (SIGNOFF). This causes control to be returned to the system, which will then display any menu specified by the INLMNU parameter on the user profile. 1. If you want to display a Toolkit menu (or menu option) but not an i OS menu, specify the name of the Toolkit menu for the MENU parameter, the name of the Toolkit menu file for the MENUFILE parameter, and a value of *SIGNOFF for the INLMNU parameter. For this to be effective, you must specify LMTCPB(*YES) on the user profile (otherwise INLMNU can be overridden from the Toolkit sign-on screen or the i OS command Change User Profile (CHGPRF) . If you want to display an i OS menu but not a Toolkit menu, specify the name of the i OS menu for the INLMNU parameter and a value of *NONE for the MENU and MENUFILE parameters.
2.
Normally you will not wish to display both a Toolkit menu and an i OS menu, but you may do so. You might for example use a Toolkit menu option to run a job initialization step prior to displaying an i OS menu.
Password Validation
Toolkit provides two optional features to assist you in enforcing the effective use of passwords by your users:
278
User Profiles
A password expiry date: this specifies an absolute value for the expiry date; for example, that the password will expire on 01/04/05. A password expiry period in days: this specifies a value for password expiry relative to the profiles password last change date - for example, that users must change their passwords at least every 30 days A password expiry option: this specifies what is to happen if the password has expired. User may either be prevented from signing on, or be allowed to change their passwords, provided that they are within a grace period: see the following section. A password expiry grace period: this specifies the number of days after the notional password expiry date, during which users may still sign on. During this period they will be automatically prompted to change their passwords every time they sign on.
The password control values are used to calculate two dates - a base expiry date and a grace expiry date. The next section, on the Initial Password Expiry Program, indicates how the dates are calculated. The following two diagrams show how these two dates are used to determine whether the user may sign on or not.
279
User Profiles
2.
4.
If the current system date is earlier than the base password expiry date, the password is still current, so return without further checking.
280
User Profiles
If the current system date is later than the grace password expiry date, the password has expired, so send a diagnostic message (YUS0027) and sign off. User must have their user profiles changed by a security officer before they may sign on again. If the current system date is later than the base password expiry date but earlier than the grace password expiry date, the password is within the grace period. If the password expiry option is *NOSIGNON, the user will not be allowed to specify a new password, so send a diagnostic message (YUS0027) and sign off. If the password expiry option is *PMTCHG, send message (YUS0048) and prompt the user with the Toolkit display Change Password (YCHGPWD) (see the section Checking New Password Values) to change the password (that is, users are still allowed to sign on, but should change their passwords before the grace period expires). When the user exits from the display, whether the password has been changed or not, proceed with the sign-on process. Note that when the password is changed, if there is an absolute password expiry date and it is earlier than the grace period expiry date, then the password expiry date will be reset to zero.
That user profile names are not used as password names. That new passwords are not values on a list of forbidden values. You may add to this list of forbidden values yourself. You may forbid a value for a particular profile (for example, QSECOFR) or for all profiles. That a new password has not already been used. You may specify that Toolkit is to log old passwords to ensure that they are not reused: the passwords are added to the list of forbidden values.
281
User Profiles
282
User Profiles
Changing a Password
Users may change their own passwords using either the i OS command Change Password (CHGPWD) or the Toolkit command Change Password (YCHGPWD). The Toolkit command YCHGPWD will be prompted automatically by the Toolkit initial program if the users password expiry date has been exceeded, see the previous section. If password logging is specified, then on a successful change of password, the old password value will automatically be added to the forbidden passwords file. At release V1R2 (or higher) of i OS, Toolkit password validation and logging is carried out by the Password validation program (YPWDVLDPGM) (see following) called from the i OS CHGPWD command. The i OS CHGPWD command can be called either directly or from the Toolkit display Change Password YCHGPWD.
283
User Profiles
The source for the YPWDVLDPGM program is shipped with the Toolkit product, so that you can include any additional password validation that you require. If you amend the Toolkit YPWDVLDPGM program, we suggest that you keep the modified version in a library different from the Toolkit product library; this is because new versions of the program may be shipped in future releases.
284
Introduction
The CA 2E Toolkit design aids provide an easy and rapid method of designing application systems. Design aids covering menus, panels, and reports are provided, as well as the means to connect the component parts into an integrated whole. Design is done on-line using interactive utilities. All parts of the design can be printed to a high standard, or presented to the user interactively.
The printed version can form the basis of a system specification, as it is straightforward enough for your user to understand, yet specific enough for a programmer to work from. The interactive prototyping facility enables a complete model of the system to be created, with realistic data and program connection. You and your user can test this model and work out any problems before programming is begun. The advantages of greater user involvement and feedback are self-evident.
Full use of the information contained in the designs can be made in programming the system.
Overview
There are two main components to the Toolkit design utilities:
There are other components of Toolkit that may be useful when designing systems. In particular the facilities provided by the Toolkit user access aids may be of interest:
31
Introduction
Each of the components can be used separately; all of the components can be linked together to form an integrated system.
Commands
See the command diagrams for the following Toolkit commands in the CA 2E Reference Guide for operational details:
Panel Design
The Toolkit panel design aids include facilities both for creating and presenting panel designs. Panel designs can quickly be created using an interactive editor:
Panel images, narrative and branching logic to describe how the panel designs connect with other panel designs can all be specified and documented. The panel design utility has many features to accelerate design, including line move, block move, save, and copy functions. Existing display file source can be converted back to a design.
32
Introduction
Panel designs can be displayed as simulated programs using a special prototyping utility:
All fields have their appropriate display attributes for example, only input capable fields are input capable). No compilation is required. Realistic data values can be set up in both input and output fields to help the user understand what goes where. The specified branching logic will be followed, so that panel conversations can be fully illustrated.
Report Design
Report designs can quickly be created using an interactive editor:
Report images and narrative can both be specified. The report design utility has many features to accelerate design, including windowing, line move, block move, save, and copy functions. Existing print file source can be converted back to a design.
Menus in Design
The Toolkit menu utilities provide a rapid way of designing and presenting menus. Menus are the ideal top down framework within which to design a system. They represent how the system will appear to the user, and so provide a checklist of available functions. Since every task is allocated a menu, and every menu is associated with a user, menus help you to highlight an often neglected aspect of system design: who will do what, when. The Toolkit Menu concepts are discussed in detail in the section on menus in this manual. From the point of view of design, the following features of Toolkit menus should be stressed:
33
Introduction
User functions and menus can rapidly be designed in outline and presented to the user for comment. Help text, panels and reports can be associated with each menu option so that when a user takes the option, the appropriate design is displayed. The design menus can be carried straight into development, with actual programs replacing designs when they are completed
2.
34
Introduction
3. 4.
If necessary, add a help text to explain the scope of each function. For each option, prepare panel designs or report designs using the Toolkit Work with Design utilities YWRKPNL and YWRKRPT.
5.
Link the panel and report designs into the appropriate menus; for example the Toolkit command Display Panel Design (YDSPPNL) could be specified as a menu option to display a panel design when an option is taken.
After only a few minutes work, you can show a user a realistic simulation of what the system will look like and print a description of that system.
35
Panel Designs
Panel Designs
This section describes CA 2E Toolkit panel design concepts. Toolkit provides facilities for:
The rapid design of panels The specification of how the panel designs connect to menus and to other panel designs
36
Panel Designs
Once finalized, the panel designs can be converted into i OS Data Description Specifications (DDS), ready for programming. Panel presentation standards - standard layouts, display attributes, message presentation and so on, can be specified centrally. The standards will then be automatically implemented on all the displays that are generated, reducing the amount of work required to specify a panel design, and also improving the standard of presentation throughout the application system.
37
Panel Designs
Presentation Standards
Panel presentation standards may be specified centrally using the Toolkit command Edit Design Defaults (YEDTDSNDFT). The presentation standards are used both when entering and when displaying panel designs. Among the items that can be specified are: Display attributes (high intensity, column separators, and so on) for each type of field (input, output, input/update, and so on). Representation characters for each type of field on panel designs (I, O, B, 3, 6, 9). These are shipped as being the same as those used by the Toolkit utility Screen Design Aid (SDA). Standard values to be used when generating source, including the name of the field reference file, the print key file, and the message file. Standard indicators can be assigned to condition certain DDS keywords, for example SFLEND, SFLCLR.
38
Panel Designs
Naming Conventions
Each Toolkit panel design is given a name and the designs are referred to in Toolkit panel design commands by this name. Names must be valid system names (that is, begin with a letter and be up to ten characters long). For example:
YWRKPNL PANEL(FRED)
Storing Conventions
Toolkit panel designs are stored in database files. When using Toolkit panel design commands you may also specify the name of the data base file containing the panel design. For example:
YWRKPNL PANEL(FRED) FILE(CHARLOTTE)
Assigning Default Names: If you do not specify a name for a panel design file, the default name is used: *LIBL/YDSNPNL.
39
Panel Designs
Since the default name for a panel design file on all the Toolkit panel design commands is YDSNPNL, it is recommended that you call all of your panel design files YDSNPNL, and make use of your library list to distinguish between different versions of designs (in the same way as you would use the i OS default source file names) this will save you having to specify the file name. Creating Panel Design Files: Toolkit panel designs are stored in a special database file format. Additional files of the correct type to contain panel designs can be created using the Toolkit command Create Design File (YCRTDSNF), for example:
YCRTDSNF TYPE(*PNL) FILE(QGPL/YDSNPNL) TEXT(Panel designs for my system.)
You may have different sets of panel designs in different members in the design file. The Toolkit command Add Design File Member (YADDDSNFM) is provided to give you an easy method of adding additional members to design files. For example, to add a new member to panel design file YDSNPNL in library QGPL:
YADDDSNFM TYPE(*PNL) FILE(QGPL/YDSNPNL) MBR(EXTRA) TEXT(More panels)
Title information The layout of the panel design Narrative describing the panel design Command key usage, including command key and data dependent branching
Title Information: For each panel design you may specify title information: this includes a title, the order the panel is to be printed, and whether the design uses a fixed standard layout for the top and bottom of the panel. Layout Information: The panel design layout information consists of the actual panel image: special characters, defined with the Toolkit command Edit Design Defaults (YEDTDSNDFT), are used to indicate field positions and attributes, just as for the Screen Design Aid (SDA).
310
Panel Designs
Narrative Information: For each panel design, write up to three pages of twenty-four lines of narrative information. This narrative text can be made to appear under the panel image when the panel design is printed, or appear as the Help text for the panel if the HELP key is pressed when using the Toolkit Panel Design Prototyping Program Display Panel Designs (YDSPPNL). Command Key Usage: Specify how the panel design connects with other panel designs. This can be done in two different ways: 1. For each command key on a panel design, specify an action to be taken if the command key is pressed; the action may be expressed either as the name of another panel design to be displayed, or as a keyword denoting a standard function:
*PRV: display previous panel. *SAME: re-display panel. *EXIT: exit program. *EXEC: execute a command string, specified in the text field.
2.
Specify an action to be taken conditional on a value being entered for a particular line and column on the panel design. For instance, on a subfile display, specify that a 5 entered against a selection field on a line will cause a separate display of details for that line to be displayed.
It can appear as part of the documentation for the panel design. It will be used by the interactive Display Panel Design utility (YDSPPNL) to simulate the programs action if a command key is pressed, or an option selected. It provides programmers with an exact description of a designers intentions regarding program flow.
311
Panel Designs
Specify one default panel design for each member in a panel design file. The default panel design must be called #DFTPNL. The default panel design can include narrative, data, and command key usage information.
The YWRKPNL title display enables you both to specify title details, and to indicate what you wish to do next, for example edit the image.
312
Panel Designs
Option 1 from the panel design title display causes the panel design image display to be shown. The image of the panel design is laid out using a free format display. The top and bottom may optionally be protected.
Option 2 from the title panel causes the panel design narrative display to be shown. The explanatory narrative for the panel design is laid out using a free format display of 24 lines. You may use the ROLL keys to move between pages, up to three pages are supported.
313
Panel Designs
Option 3 from the panel design title display causes the panel design branching display to be shown. The display for specifying branching looks like this:
Exit Work with Panel display Pressing F03 from any of the panel design displays causes an exit display to be shown. The exit display allows you to make a controlled exit from the Work with Panel Design program. The design is not updated to the panel design database file until this point.
314
Panel Designs
This diagram shows the main interconnections between the displays of the Toolkit program Work with Panel Design.
315
Panel Designs
The prints of panel designs can include sample data in the fields on the panel design image. The sample data is set up with the Toolkit command Display Panel (YDSPPNL).
Interactive Display
Toolkit provides you with a sophisticated means of presenting panel designs interactively to your users, thus giving them a realistic view of what the finished system will look like - a form of prototyping. Panel design presentation, is done using the Toolkit Display Panel Design utility (YDSPPNL). Panel designs can contain sample data in input and output fields: sample data can help users to understand a design, as they can see what goes where. The panel design display utility can be used in one of three modes, as specified by the OPTION parameter on the Toolkit command Display Panel (YDSPPNL):
CHGDTA mode allows the designer to set up realistic data values for the fields on a panel design, regardless of attribute, so that your user can understand what goes where. DSPDTA mode displays a panel design with the realistic data values in the appropriate places, and with all fields having their correct attributes, that is, input and update fields are input capable, output fields and constants are not. DSPATR mode displays a panel design with all fields having their correct display attributes, leaving out any example data.
The Display Panel Design utility initially displays a specified panel design. It will branch to other panel designs if command keys are pressed, or if field values are input: the exact nature of the branching is specified as part of the panel design edit process. The Toolkit utility Go to Menu (YGO) provides a framework for design prototyping. Simply create a menu, specifying as the menu option action the command Display Panel Design and giving as parameters on the command the names of panel designs which you want prototyped when the option is taken. No compilation is required. A panel design may be displayed as soon as it has been edited.
316
Panel Designs
Using the panel design example shown earlier, we could add sample data using the YDSPPNL command with OPTION (CHGDTA):
And then display the panel design using YDSPPNL with OPTION (DSPDTA).
Design Cycle
Using the Display Panel Design facilities, the typical design cycle consists of the following steps:
317
Panel Designs
Use YWRKPNL to enter a panel design and narrative text. Use YDSPPNL with OPTION(*CHGDTA) to set up sample data for the panel design image. Use YWRKMNU (or write a CL program) to create a menu, specifying as a menu option YDSPPNL with OPTION(DSPDTA).
Present the design to the user by letting him display the menu and take the option. (Also provide a printed version prepared with the YDOCPNL and YDOCMNU commands.)
Use YWRKPNL to revise the panel design to incorporate the users modifications. Use YCRTPNLDDS to generate DDS from the panel design.
YCRTDSNF - Create a new panel design file. YCPYPNL - Copy a panel design. YDLTPNL - Delete a panel design. YRNMPNL - Rename a panel design.
A panel design may be converted into a report design, and conversely, by means of the CVTOPT parameter on the Toolkit commands Copy Panel Design (YCPYPNL) and Copy Report Design (YCPYRPT).
318
Panel Designs
319
Panel Designs
A default field name is assigned to each field. You may specify override values for the field names, and also refer the fields back to reference fields in a data dictionary. Field references may either be to a field of the same name, or a different name, or to a name related by the CA 2E naming convention. The CA 2E naming convention provides a method of systematically assigning meaningful field names. See the CA 2E Standards Guide for further details.
320
Panel Designs
The YCRTPNLDDS program displays the design image that has previously been entered using the Toolkit command Work with Panel Design (YWRKPNL). When the format area has been marked out, F9 is pressed to add field details for the format.
321
Panel Designs
For each format, press F09 to show a second display that allows you to specify the name of the format and the name of the fields on the format. If you have specified that the format is a subfile (F20), both the subfile control and subfile detail records are shown at the same time. When you press Enter, you are prompted to confirm that the details are correct. When you confirm the prompt the source for the format is generated.
Use the available inquiry facility to browse the names of fields in existing database files. The field inquiry is invoked by specifying a ? in any field name on the YCRTPNLDDS field detail display.
322
Panel Designs
Repeat steps 2 and 3 for each format that is to be produced from the specified panel design. One special type of format, a program message queue subfile, is supported.
323
Panel Designs
Refer to the following listing which shows sample DDS source as would be generated by the YCRTPNLDDS utility. In addition to generating code for the format and field details in the design, the YCRTPNLDDS program also generates all the appropriate supporting code and comments, such as a banner, keywords, and indicator text. Code for a program message queue has also been generated. The default values set up with the YEDTDSNDFT command have been used for the attributes of the code that can be standardized, such as the name of the field reference file, and indicator usage.
324
Panel Designs
325
Panel Designs
The PUTOVR keyword will be conditioned by the indicator specified in the central design defaults. Otherwise it is conditioned by the indicator associated with the Help function key on the design defaults. For input only fields, the DDS OVRATR keyword will additionally be generated. It will be conditioned by the indicator associated with the Help function key on the design defaults. For output only and both fields, the DDS OVRATR and OVRDTA keywords will additionally be generated. They will be conditioned by the indicator associated with the Help function key on the design defaults. The Time field will be treated differently: instead of the DDS Time keyword being generated, an output field will defined instead. The field will be named according to the value on the design defaults. This is done because the DDS OVRDTA keyword cannot be used in conjunction with the DDS Time keyword.
This diagram shows the main interconnections between the displays of the Toolkit program Create Panel Design DDS.
326
Report Designs
Report Designs
Toolkit provides facilities for the rapid design of reports, the specification of how the report designs connect to menus, and the presentation of the report designs to the user. Once finalized, the report designs can be converted into i OS Data Description Specifications (DDS), ready for programming. Report presentation standards, for example, standard layouts and file attributes can be specified centrally. The standards will then be automatically implemented on all reports created; thus both reducing the amount of work required to specify a report, and also improving the standard of presentation throughout your application systems.
327
Report Designs
report designs report design defaults naming and storing conventions report design components
The representation characters used to represent each type of field on report designs (O, 6). These are shipped as being the same as those used by the Screen Design Aid utility (SDA). Standard values used when generating print file DDS source, including the name of the field reference file, default print attributes (page length, width, CPI, LPI, and so on).
328
Report Designs
Default Names for Toolkit Report Design Files The default name for the report design file on all Toolkit Report Design commands is YDSNRPT. It is recommended that you call all of your report design files YDSNRPT, and make use of your library list to distinguish between different versions of report designs, in the same way as you would use the i OS default source file names. Creating Toolkit Report Design Files Toolkit report designs are stored in special database file formats. Files of the correct type can be created using the Toolkit command Create Design File (YCRTDSNF):
YCRTDSNF TYPE(*RPT) FILE(QGPL/YDSNRPT)
You may have different sets of report designs in different members in the design file. The Toolkit command Add Design File Member (YADDDSNFM) is provided to give you an easy method of adding additional members to design files. For example, to add a new member to report design file YDSNRPT in library QGPL:
YADDDSNFM TYPE(*RPT) FILE(QGPL/YDSNRPT) MBR(EXTRA) TEXT(More reports
329
Report Designs
Narrative
Report Design Title For each report design, you may specify title information: this includes a title, the order in which the report design is to be printed, the report width, and whether the design uses a standard header for the top of the report. Report Design Layout: Report design layout information consists of the actual report image: special characters are used to indicate field. Report Design Narrative: For each report design, you may enter up to twenty-four lines of narrative information. This narrative text can appear under the report design when the design is printed. Printing is done using the Toolkit command Document Report Design (YDOCRPT).
330
Report Designs
Toolkit allows you to set up a default report design that will be provided as a starting position on any new report design that you add. You can specify one default report design for each report width for each member in the report design file. For example, you could name the default report design, #DFTRPTnnn, where nnn is the report width, for example, #DFTRPT132, #DFTRPT198. An example of the Work with Report Design display is:
YWRKRPT REPORT(ALSTSTKVAL) FILE(YDSNRPT)
Selecting 1 from the report title details display giving the report design image. The image of the report is laid out using a free format display.
331
Report Designs
Selecting a 2 from the title details display gives the text display. The explanatory narrative for the report design is also laid out using a free format display:
Pressing F03 from any display causes the exit display to be shown. The exit display allows you to make a controlled exit from the Work with Report Design program. The design is not updated to disk until this point
332
Report Designs
333
Report Designs
YCRTDSNF - Create new report design file. YCPYRPT - Copy a report design. YDLTRPT -Delete a report design. YRNMRPT - Rename a report design.
A report design may be converted into a panel design, and vice versa, by means of the Toolkit commands Copy Panel Design (YCPYPNL) and Copy Report Design (YCPYRPT), using the CVTOPT parameter.
334
Report Designs
2.
The YCRTRPTDDS program displays the design image that has previously been entered using the Work with Report Design (YWRKRPT) command.
335
Report Designs
When the format area has been marked out, press F09 to add field details for the format.
336
Report Designs
3.
For each format, press F09 to show a second display which allows you to specify the name of the format and the name of the fields on the format:
When you press Enter, you will be prompted to confirm that the details are correct. When you confirm the prompt, the source for the format will be generated.
337
Report Designs
4.
When the format area has been marked out, press F09 to add field details for the format:
338
Report Designs
5. The following listing shows sample DDS source as would be generated by the YCRTRPTDDS utility. In addition to generating code for the format and field details in the report design, the YCRTRPTDDS program also generates all the appropriate supporting code and comments. The default values set up with the YEDTDSNDFT command are used to obtain such attributes of the code as can be standardized, such as the name of the field reference file.
The following diagram shows the main interconnections between the displays of the Toolkit Create Report Design DDS program.
339
Report Designs
340
Introduction
Toolkit provides a variety of utilities designed to help programmers. The programmer utilities include generic manipulation aids, compilation aids, edit aids, and debug aids. Note that many of the other Toolkit utilities, notably the documentation and the menu design utilities, will also be of great use to programmers. All of the Toolkit utilities are invoked with commands: the commands may be incorporated into your own programs, in particular, you may wish to make use of the list manipulation utilities in this manner.
Overview
The programmer aids are grouped into five main areas:
List manipulation aids Generic manipulation aids Debug aids Compile preprocessor utility Edit aids
List Facilities
The concept of a library list will already be familiar to i OS users. Toolkit also introduces the concept of four other types of lists: object lists, data base file lists, member lists and format lists. A list is a collection of item descriptions that can be built from existing descriptions of items, and then manipulated, stored, and used to drive other processing. Toolkit list processing includes the following capabilities:
41
Introduction
Lists can be executed. Any CL commands that operate either on objects or on members can be invoked on lists of objects or list of members by means of the Toolkit Execute List commands: (YEXCOBJLST, YEXCMBRLST, YEXCDBFLST). Nongeneric commands can be made to work generically, and generic commands can be made to work on selections of items.
Lists can be stored indefinitely. Lists can be edited interactively. Lists can be trimmed, either interactively, or in batch. Lists can be combined as sets. Lists can be converted from one type to another. Lists can be transferred from machine to machine.
Create a list of objects using the Toolkit command Build Object List (YBLDOBJLST). Remove the ones you do not want using the Toolkit command Edit Object List (YEDTOBJLST). Use the Toolkit command Move Object (YMOVOBJ) to move the objects remaining in the list.
To stop and restart journalling a group of files (perhaps so as to carry out a physical file reorganization using the Reorganize Physical file command (RGZPFM). You could:
Create a list of the files, using the Toolkit command Build Database File List (YBLDDBFLST). Trim the list if necessary, using the Toolkit Edit commands Database File List (YEDTDBFLST), the Filter Database List (YFLTDBFLST), or both. Then use the Toolkit command Execute Database File List (YEXCDBFLST), to stop journalling, reorganize the files, and then restart journalling.
If you expand your application, and wish to have additional files journalled, all you have to do is amend the list of files. To recompile a group of programs that all reference a given program, you could:
42
Introduction
Use the Toolkit utility Scan Source (YSCNSRC) to build a list of the source members of the programs that call the program. Change the source, making use of the Toolkit Edit command Member List (YEDTMBRLST), to present each source member in turn for editing with the i OS utility Start SEU (STRSEU). Then use the Toolkit command Create Objects (YCRTOBJ), to recompile all of the changed source members.
RMVM: To remove obsolete work members. CRTDUPOBJ: To replicate a list. CHGPF: To change the attributes of a list of files. CLRPFM: To clear a list of physical file members. RGZPFM: To reorganize a list of physical file members.
Secofring:
V. to secofr - to perform a security officers duties YMOVOBJ: To install new programs, or replacements preserving any existing authorities. CHGOBJOWN: To change ownership generically. DSPDEVD: To list all the device descriptions.
Programming:
STRSEU: To present a list of source members for editing. CHGCMD: To change the attributes of a list of commands. CHGPGM: To optimize programs. ALCOBJ: To reserve a list of objects. DLCOBJ: To release a list of objects. CHGDSPF: To change display file attributes.
Documentation:
YSCNSRC: To look for the occurrence of a string. DSPDTAARA: To print the contents of a list of data areas. DSPDEVD: To print all or some device descriptions.
43
Introduction
DSPJOBD: To print the contents of all the job descriptions. DSPUSRPRF: To print the attributes of all user profiles.
Debug Aids
Toolkit includes utilities that can greatly speed up your testing and debugging:
A utility to change the data on any database file directly, without creating an HLL program, or DFU. Add, update, copy, delete, positioning, and formatting functions are available. A utility to set up debug sessions from directives contained in the source. This gives you the ability to re-instate rapidly a complicated debug environment, after recompilation or interruption. Breakpoints can be specified relative to executable statements, rather than as absolute source line numbers, and several different debug sets can be maintained. A utility to take a snapshot of the contents of a list of files. The snapshots can be used to establish check points for system testing, and for recovery.
Compile Preprocessor
An aspect of i OS system documentation that is often overlooked is the recording of the object attributes that are specified as compiler overrides on the various create commands (CRTRPGPGM, CRTCLPGM, CRTPF, and CRTDSPF). This information, which in some cases is essential for the successful use of an object, is stored on the object description, and can easily be lost if the object is recompiled. Here are some examples:
44
Lists
For a database file - the maximum number of members For a program - the profile that the program is to run under For a command: the name of the command processing program, and the modes under which the command may run
Toolkit provides a utility, the Compile Preprocessor that ensures the information is not lost; instead it is stored in the source of objects and is automatically added when compilation takes place. The utility also provides several other extremely useful functions:
Cancellation of previous compilation listings (thus the default listing retrieved by SEU is always the latest version). Storing of compile time overrides. Synchronization of object text, source titles, and source member text Suppression of non-essential cross-reference listings
Edit Aids
Toolkit Edit Aids include several small, but very useful, aids that help you to program faster, and more accurately. These include:
A command to rename an object and its source with one instruction A command to create a set of source files with one instruction A command to search source for the occurrence of a specified search string, or combination of search strings A command to search source for the occurrence of a specified search string, and to replace all found instances with another string A command to compare source members and list the differences A command to retrieve, display and change a data areas contents A command to retrieve, display and change a message description An abbreviated command for common display functions. A command to add a source member of a given type to a source file
Lists
CA 2E Toolkit list facilities are an extremely powerful extension to the generic capabilities of the i OS operating system.
45
Lists
Lists Concepts
Using the list facilities, whole sets of objects or members may be processed with a single instruction. Toolkit allows you to store a list of items under a single name, and then to subsequently identify all the items in the list just by referring to the list name. Toolkit allows you to create, manipulate, and use, four types of lists:
Lists of objects Lists of database files Lists of database file members Lists of formats
Each list is made up of list entries containing information about the elements within the list relevant to the list type; for instance:
For objects - owner, object attribute For members - source type, last change date For database files - journalling status, database relations For formats - file, format identifier
Database file lists can be regarded as a special type of object list. Note: Toolkit also has facilities for referring to a list of libraries by a single name.
Edit Command Filter Command YEDTOBJSLT YEDTDBFLST YEDTMBRLST YEDTFMLST YFTOBJLST YFLTDBFLST YFLTMBRLST YFLTFMTLST
YADDOLE YADDMLE
46
Lists
YCPYLST YINXLST YDLTLST YOPRLST YCHGLST YCHKLSTE YSCNSRC YCVTDBR YCVTPGMREF YCVTUSRPRF YCVTAUTL
The list manipulation functions can be incorporated into your own utilities by using the appropriate commands.
Storing Lists
Lists can be referred to with qualified names, as if they were objects in their own right, for example, OBJLST (QGPL/FRED). Each list name of a given type must be unique within its library. Lists are actually stored as database file members: a file which contains a list must have the format of the database OUTFILE from the associated i OS command which generates the list. You do not generally need to be concerned with the implementation details of lists; further details are given in the discussion on list parameters in Appendix A of the CA 2E Toolkit Reference Guide.
Creating Lists
Lists can be built:
Directly from objects - YBLDOBJLST, YBLDDBFLST, YBLDFMTLST Directly from members - YBLDMBRLST, YSCNSRC, YSCNRPLSRC From references to objects - YCVTDBR, YCVTPGMREF, YCVTUSRPRF From other list types - YCVTOBJLST, YCVTDBFLST, YOPRLST From named items - YADDOLE, YADDMLE As output from list processing commands - YCPYLST, YFLTMBRLST, YFLTOBJLST, YCHKLSTE
47
Lists
Once the list has been built, the list entries are independent of the items to which they refer. So, for example, an entry will remain in the list even if the corresponding item has been deleted. For example to use the Build Object List command (YBLDOBJLST) to build a list of all objects that are in library QGPL and whose names begin with the letters FR, see the following diagram:
For example, to add an entry for a member FRED of source type CL in file QCLSRC:
YADDMLE MBR(FRED) LIB(QGPL) FILE(QCLSRC) SEUTYPE(RPG) MBRLST(QTEMP/PGMS)
48
Lists
The Add List Entry commands are primarily intended for use in your own CL programs. They can be useful when you wish to build a list of items that do not yet exist.
Editing Lists
All lists can be interactively edited, that is, all the items in the list can be displayed and examined in detail. The list edit functions are invoked either by using the appropriate Toolkit Edit List command (namely YEDTDBFLST, YEDTFMTLST, YEDTOBJLST or YEDTMBRLST) or by using the EDIT parameter on one of the Toolkit generic commands, for example, Translate Physical File (YTRNPF), Move Object and Source (YMOVOBJSRC), Remove Members (YRMVM). The list edit functions for database file lists and format lists differ from the list edit functions for object lists and member lists. The two types of list edit functions are described below.
49
Lists
410
Lists
The YEDTMBRLST command allows member specific operations such as option 2 to invoke the i OS Start SEU command (STRSEU) to edit the source member.
411
Lists
412
Lists
Filtering Lists
Filtering allows you to remove the items from a list that you do not want, using selection criteria that can apply to whole classes at a time.
Filtering can be invoked either by pressing a function key from the Toolkit displays Edit List, (Work with List Entries), or by using the Toolkit filter command appropriate to the list type, YFLTOBJLST, YFLTMBRLST, YFLTFMTLST, or YFLTDBFLST. The filtering functions available are different for each list type, reflecting the different attributes possessed by the different types of list items.
Filter Type Object Names Library Names Member Names Object Type Object Text Attribute Object Owner
PF or LF Yes CT DATA/SRC
413
Lists
Filter Type Create Date Chg. dt. (Obj&Src) Save file Save File lib Sys Compiler lvl Object size Damaged object Journal Select/omitused Access path Acc. path maint Alt. Coll. Seq Level Check No. active rcds No. deleted rcds Flag value Last used date Date usage counter reset Days used Creator System where Created Object domain User modified Auxilliary storage pool Compression status Compiler level
OBJ List Yes: (1) Yes: (1) Yes Yes Yes: (1) Yes: (1) Dmgd/Undmgd
DBF List
FMT List
Yes Select/omit Key/Arrival Yes Yes Yes (1) (1) Yes: (2) Yes: (1) Yes: (1) Yes: (2) Yes: (1)
Yes
Yes
Yes
(1) Any of the relational operators *GT, *LT, *EQ, *NE may be used. (2) Either of the relational operators *EQ, *NE may be used.
414
Lists
Either selection or omission logic can be used when filtering, that is, either every item meeting the criteria may be selected, or every item that does not meet the criteria may be selected. Name selection can be specified; not just to select generic names, but also to select any combination of letters appearing anywhere in the name. For instance, all names containing the letters PGM could be selected. You specify the name selection that you desire by means of a name mask. Rules for specifying name masks are given below.
At the end of the Mask Generic name beyond this character Anywhere within the Mask Floating scan beyond this character
A* would select all names beginning with the letter A. *A* would select any names containing the letter A. *A would select any names ending with the letter A. A?C would select any names that begin with the letter A, and that also have the letter C in the third position - any character may be in the second position. *A? would select any names with the letter A as the last character but one. A*B* would select any names beginning with the letter A, and containing the letter B in any other position. Q???SRC will match QRPGSRC and QDDSSRC, but not QCLSRC. Q*SRC will match QRPGSRC and QCLSRC, but not QRPGSRC1. Q*S?C* will match all QRPGSRC, QCLSRC, QDDSSRC, plus names such as QSXC.
415
Lists
Filtering Examples: Your example is an object list call FRED in library QGPL with the following items in it:
To select all RPG programs in object list FRED that are owned by user ME and that have object names:
either containing the letters FRED anywhere in the name. or beginning with the string M?SH, where ? represents any character.
416
Lists
Using Lists
You will have built a list because you want to carry out an operation on many items. There are two main ways of using a list to drive processing:
In Toolkit commands that have the LST or xxxLST parameters In any other command by means of the YEXCxxxLST command
417
Lists
Using an Existing List You indicate that a list is to be used by specifying a special value for the object name, OBJ(*OBJLST), and you indicate which list is to be used by a special parameter, OBJLST(list-name). The following will change the ownership of all objects in object list HENRY in library QGPL:
YCHGOBJOWN OBJ(*OBJLST) OBJTYPE(*OBJLST) NEWOWN(FRED) OBJLST(QGPL/HENRY)
Likewise for member lists you would use a MBRLST parameter, and for database lists a DBFLST parameter. Toolkit generic commands are described in further detail in the section Generic Commands in this chapter.
In other words if the list FRED contained the qualified names of three data areas, XX/AA, YY/BB and ZZ/CC, then invoking the YEXCOBJLST command would be equivalent to specifying the following three commands:
DSPDTAARA DTAARA(XX/AA) OUTPUT(*PRINT) DSPDTAARA DTAARA(YY/BB) OUTPUT(*PRINT) DSPDTAARA DTAARA(ZZ/CC) OUTPUT(*PRINT)
By using the Toolkit Execute List functions, commands that are not generic can be made generic, and generic commands can be made to work on lists of items. See the respective command diagrams for further details.
418
Lists
Updating Lists
Updating lists allows you to control the updating of lists and the output lists.
Whether items in the list are to be flagged as a result of processing. - FLAGERR - flag only those list items for which errors occurred. - FLAGOK - flag only those list items for which no errors occurred.
Whether items in the list are to be removed as a result of processing - RMVERR - remove list items for which errors occurred. - RMVOK - remove list items for which no errors occurred.
On some commands, the list need not be updated as a result of processing. - NONE - do not flag or remove any list items.
UPDLST actions Actions *None *RMVERR *RMVOK *FLAGERR *FLAGOK Pass No Change Leave Remove No Change Flag Fail No Change Remove Leave Flag No Change
419
Lists
Output Lists
Certain of the generic commands allow you to specify an output list: the results of executing the list will be to produce a new list. In some cases a separate output list is mandatory. For example, in the following command to convert an object list into a member list:
YCVTOBJLST OBJLST(SIMBA) MBRLST(CHUUI)
In other cases a separate output list is optional. For example, the following command would scan the members named in an input list called NUGU and produce an output list FISI containing just the names of the members containing the search string:
YSCNSRC SELN(*IF QCAEXEC) MBRLST(NUGU) OUTLST(FISI) UPDLST(*RMVERR)
420
Lists
Command
UPDLST UPDLST UPDLST OUTFLAGVAL OUTFLAGVAL Value Value Value Ass/Opt Default FLAGERR FLAGOK RMVERR RMVOK Value A Y A Y Y Y Y Y Y Y Y Y -(1) Y Y Y Y Y Y Y Y O O O O O O O A A A Null On Fail On On Fail Fail (3) FailOBJ FialMBR (4)
YBLYxxxLST YFLTxxxLST YEXCxxxLST YCHKLSTE YSCNSRC YCMPSRC YCRTOBJ YMOVOBJ YMOVM YMOVOBJSR -(2) Y Y Y Y Y Y Y Y Y
UPDLST
Y Y Y Y A A
: A = Always assumed : Y = Default, may be overridden Y = Available OUTFLAGVAL :O = Optional, that is chosen value or *NULL A = Always assumed, value cannot be changed
Flagging Lists
This topic explains the purpose of the list flag value and how to use them.
To control which items in the list are to be processed To determine which items in a list were successfully or unsuccessfully processed
421
Lists
Implicit - some of the Toolkit generic commands automatically set flags to indicate whether items have been processed successfully or not. For example, the Toolkit command Move Member (YMOVM) flags the list entries for any members which it failed to move, with a *FAILMBR status. Explicit - On other Toolkit generic commands you may use the OUTFLAGVAL parameter optionally to specify a flag value to be given to particular items. You must also specify a value of *FLAGOK or *FLAGERR for the UPDLST parameter to indicate the circumstances under which the flag is to be set.
For example, on the Toolkit command Filter Object List (YFLTOBJLST) you could specify that items which meet the filter criteria are to be given a particular flag value:
YFLTOBJLST TEXT(USRPGM) OUTFLAGVAL(*ON) UPDLST(*FLAGOK)
Similarly, you could use the Toolkit command Scan Source (YSCNSRC) specifying that items which meet the search criteria are to be given a particular flag value:
YSCNSRC SELN(*IF QCAEXEC *FALSE) UPDMBRLST(*FLAGERR) OUTFLAGVAL(X)
422
Lists
In the special case of the Filter List commands (YFLTxxxLST), items that do not satisfy the flag value may be subject to further processing (depending on the UPDLST parameter). For example, the following command will remove, from the list, all items that do not have a flag value of A.
YFLTOBJLST FLAGVAL(A) UPDLST(*RMVERR)
The following table shows which Toolkit list commands support the use of flag values. Note that for some commands the use and value of an output flag value is automatically assumed.
Toolkit Command YBLDxxxLST YADDxLE YFLxxxLST YEXCxxxLST YCHGLST YCHKLSTE YSCNSRC YCMPSRC YCRTOBJ YMOVM YMOVOBJ YMOVOBJSRC
O = Optional
O O O O O
O O
O O O
O O O O
A = Assumed
A (Flagerr), O (Flagerr) A A A
Convert object lists to member lists. Convert database relations into an object list. Convert program references into an object list. Convert user profile references into an object list.
423
Lists
Convert authorization list references into an object list. Convert DBF lists into member lists. Convert member lists into text documents.
424
Lists
*OBJOWN - An object list of the objects owned by a profile. *CMDAUT - An object list of the commands to which the user is explicitly authorized. *GRPMBR - If the profile is a group profile, an object list of all the user profiles belonging to the group profile. *DEVAUT - An object list of the device descriptions to which the user is explicitly authorized. *OBJAUT - An object list of the objects to which the user is explicitly authorized.
425
Lists
All objects that are referenced by the specified profile in the specified manner will be included in the list. The resulting list can be used to manipulate all the objects belonging to the profile. For example, the effect of the following two commands would be to change the ownership of all objects owned by user profile FRED to user profile BASIL:
YCVTUSRPRF USRPRF(FRED) TYPE(*OBJOWN) YCHGOBJOWN OBJ(*OBJLST) OBJTYPE(*ALL) NEWOWN(BASIL)
*AUTOBJ - An object list of the objects secured by the authorization list. *USRPRF - An object list of the user profiles contained in the authorization list.
All objects that are referenced by the specified authorization list in the specified manner will be included in the list. The resulting list can be used to manipulate all the objects secured by the authorization list. For example, the effect of the following two commands would be to change the ownership of all objects secured by list FRED to be owned by profile BASIL:
YCVTAUTL AUTL(FRED) TYPE(*AUTOBJ) YCHGOBJOWN OBJ(*OBJLST) OBJTYPE(*ALL) NEWOWN(BASIL)
426
Lists
Different combinations of the same sub-documents can be used for different purposes, for example, manuals for different user departments. The separate documents that appear as the Help text for individual menu options and application programs, can be grouped together in any combination and order, and printed as a single document.
The Toolkit function Build Document (YBLDDOC) helps you prepare master documents. It converts a list of members, previously built and edited with the member list build and edit functions, into a master document containing all the necessary references to the documents in the member list. For example, the help text for each Toolkit display is stored as a document in a file Y1HLPTXT in the Toolkit shipped library. The following three commands would print all the Help text for Toolkit:
YBLDMBRLST FILE(Y1HLPTXT) /* build list of documents */ YBLDDOC DOCUMENT(HLPINX) FILE(QGPL/QTXTSRC) TEXT(Help index) /* convert list to document */ QSYS38/PRTDOC SRCFILE(QGPL/QTXTSRC) DOCUMENT(HLPINX) /* print it /
Manipulating Lists
Toolkit provides various service functions that are useful in manipulating lists. These functions are:
YCPYLST - Copy a list from one library to another. YMOVLST - Move a list from one library to another. YDLTLST - Delete a list. YINXLST - Add a logical view to a list.
If you are making use of lists in your own commands, the Index List function can be very useful: it performs the commonly required function of adding a logical view on a list. Refer to the command diagram for further details.
427
Lists
Printing Lists
Lists may be printed using the Toolkit commands Document List (YDOCOBJLST, YDOCMBRLST, YDOCDBFLST and YDOCFMTLST). For example:
YDOCOBJLST OBJLST(FRED)
Such a facility can be useful when you wish to bring an old list up to date, for instance after moving everything in a list from one library to another. It can also be useful when you are comparing lists - see combining lists below.
The Check List Entry command can be particularly useful for testing whether objects have a corresponding source member or vice versa. It can also be used to compare the contents of two libraries. Using the UPDLST parameter of the Check List Entry command, you may specify either that the list entries which are found to be in error are to be removed or flagged, or that list entries which are successfully verified are to be removed or flagged. The latter option provides a convenient way of examining a member list to see which source members still need compiling. For example, the following command would check the entries in member list FRED to ensure that for each member there was a corresponding object in library QGPL. Any entries without objects would be removed:
YCHKLSTE LSTTYPE(*MBR) LST(FRED) CHKLIB(QGPL) UPDLST(*RMVERR)
428
Lists
You can also use the YCHKLSTE command in your own CL programs to test whether a list is empty: an escape message will be sent if no entries can be found. For example:
YCHKLSTE LSTTYPE(*OBJ) LST(FRED) MONMSG MSGID(YYY0103) EXEC(RETURN) /* list is empty */
Combining Lists
The Toolkit command Operate on List (YOPRLST) gives you the ability to combine or divide lists. Lists can be combined together using set theory operations such as intersection and union. Such a capability is very powerful and can be used in many ways. Here are some examples:
To compare two libraries and list the differences, build a list of the desired type from the contents of each library, use the Operate on List function to create a list of the differences, and then use the Document List (YDOCxxxLST) function to print the result list.
YBLDOBJLST OBJ(A/*ALL) OBJLST(A) /* library A contents */ YBLDOBJLST OBJ(B/*ALL) OBJLST(B) /* library B contents */ YOPRLST LSTTYPE(*OBJ) LSTA(A) LSTOPR(*DIFF) LSTB(B) TOLST(C) IGNLIB(*YES) /* differences */ YDOCOBJLST LSTB(C) /* print */
To compare two libraries and list all the objects which have identical names, creation dates/times and change dates/times, use the YOPRLST command with LSTOPR(*INTERSECT).
YBLDOBJLST OBJ(A/*ALL) OBJLST(A)/* library A contents */ YBLDOBJLST OBJ(B/*ALL) OBJLST(B)/* library B contents */ YOPRLST LSTTYPE(*OBJ) LSTA(A) LSTOPR(*INTERSECT) LSTB(B) TOLST(C) IGNLIB(*YES) IGNCRTDTE(*NO) IGNCHGDTE(*NO)/* find identical obj */ YDOCOBJLST LSTB(C)/* print*/
To find out if all the objects in a library have a corresponding source member, build an object list of the objects, and convert it to a member list using the Convert Object List function (YCVTOBJLST). The member list so created could then be subtracted, using the Operate on List function from a member list built from the source file itself. The resulting list, which can be printed, represents the objects without source.
YBLDOBJLST OBJ(A/*ALL) OBJLST(A) /* library A contents */ YCVTOBJLST OBJLST(A) MBRLST(A)/* library a contents * / YBLDMBRLST FILE(B/Q*) MBRLST(B)/* src files in b contents */ YOPRLST LSTTYPE(*MBR) LSTA(A) LSTOPR(*SUB) LSTB(QTEMP/B) TOLST(QTEMP/C) IGNLIB(*YES) /* differences */ YDOCOBJLST LSTB(QTEMP/C) /* print */
429
Lists
To change the ownership of everything in a library, except for a given list of exceptions, build a list of everything in the library, subtract the exceptions, then change the ownership of the remainder.
430
Lists
DCL VAR(&FILEATR)
DCL VAR(&TEXT) TYPE(*CHAR) LEN(10) VALUE (SELECT A TEXT MEMBER) /*Text*/ YDSPMBRLST FILE(&FILE) LIB(&LIB) MBR(&MBR) FILEATR(&FILEATR) TEXT(&TEXT)
The name, file name, library and text of the selected member would be returned in the appropriate variables. You may specify that only members from files of a given format type are to be displayed.
431
Generic Processing
Generic Processing
The following section describes the Toolkit generic command concepts and generic commands.
Generic Commands
Through the Execute List facilities that Toolkit provides, it is possible to turn any command, i OS, Toolkit, or user-defined, into a generic command. In addition to this capability, Toolkit provides ready made generic versions of certain commonly used i OS commands.
432
Generic Processing
Toolkit generic command concepts are closely linked with Toolkit list concepts: refer to the section on lists in this manual before reading this section. Note that the meaning of generic under Toolkit is a considerable enhancement upon the i OS concept. The name masking and attribute selection capabilities of the edit and filter list utilities of Toolkit allow you great flexibility in specifying items - far more than that allowed by the mere specification of a generic name.
Toolkit Command YCHGCMD YCPYF YCRTOBJ YCRTODUPSBJ YDLTOBJ YMOVOBJ YMOVOBJSRC YMOVM YRMVM
Related i OS Commands CHGCMD CPYF, ENDJRNPF, STR, JRNPF CRTRPGRGM, CRTDSPF, CRTPF, CRTCLPGM CRTDUPOBJ DLTPGM, DLTF, DLTCMD MOVOBJ,GRTOBJAUT MOVOBJ, CPYF, RMVM CPYF, RMVM RMVM
List Type OBJLST DBFLST MBRLST OBJLST OBJLST OBJLST OBJLST MBRLST MBRLST
Most of the Toolkit generic commands provide additional functions beyond that provided by the simple command; for instance, the Toolkit command Change Object Ownership (YCHGOBJOWN) can revoke authorities as well as change ownership. The following table shows other Toolkit commands that use Toolkit lists.
Related i OS Command
DOC DOC
433
Generic Processing
Related i OS Command
Simple generic use of a command to move all programs whose names begin with the letters FR in library QGPL to library FRED:
YMOVOBJ OBJ(QGPL/FR*) OBJTYPE(*PGM) TOLIBOBJ(FRED)
Note: The parameter usage is exactly analogous with that of the i OS command Move Object (MOVOBJ):
MOVOBJ OBJ(QGPL/FREUD) OBJTYPE(*PGM) TOLIBOBJ(FRED) MOVOBJ OBJQGPL(FREEZE) OBJTYPE(*PGM) TOLIBOBJ(FRED) MOVOBJ OBJ(QGPL/FRIED) OBJTYPE(*PGM) TOLIBOBJ(FRED)
Explicit use of a list to move all objects in object list FRED in QTEMP to library QGPL:
YMOVOBJ OBJ(*OBJLST) OBJTYPE(*ALL) TOLIBOBJ(QGPL) OBJLST(FRED)
434
Generic Processing
Moving the source for an object Saving the previous version of the object, source, or both, into an archive library Preservation of existing object authorities Logging the movement of the object, its source, or both Automatic separation of application objects, objects containing data, and source objects, into separate libraries Selective movement of only the new objects, or only the objects that already exist in the destination library, or all objects
435
Generic Processing
You wish to replace these with new versions from library FREDNEW. You wish also to transfer the source for the objects you are moving to a library FREDSRC, which contains the source for your live objects. You want to preserve the previous version of the program and source in an archive library FREDOLD, deleting any existing previous version in FREDOLD.
436
Generic Processing
You also wish the new versions of the objects to be given the same authorizations that the existing versions possess. In addition you wish to keep a record of what you have done, in the form of a message sent to a message queue, MOVLOG.
Generic Compile
The Toolkit generic command, Create Objects (YCRTOBJ), recompiles some or all of the source members in a source file with a single instruction. For example, the following command will submit compiles of all display file members in QDDSSRC in *LIBL whose names begin with the letters FR. Job description BODJ in *LIBL will be used. Any existing versions will first be deleted.
YCRTOBJ OBJLIB(FRED) SRCFILE(QDDSSRC) MBR(FR*)SEUTYPE(DSPF) JOBD(BODJ) CRTOPT(*ALL)
The names of the members that are to be compiled can be specified in one of two ways:
Using a source file name and a generic member name Using a Toolkit member list name which can be created in a number of ways: Using the Toolkit command Build Member List (YBLDMBRLST). Using the Toolkit command Scan Source (YSCNSRC), or the command Scan and Replace Source (YSCNRPLSRC). Using the Toolkit functions Convert Object List (YCVTOBJLST), or Convert Database File List (YCVTDBFLST).
437
Generic Processing
You may edit or filter your member list with the Toolkit commands Edit Member List and Filter Member List (YEDTMBRLST, YFLTMBRLST).
Re-compilation Order
If you are compiling source members of many different source types, the Create Object command will order the compilations so as to give the maximum chance of establishing logical dependencies. For example, physical files will be compiled before logical files, database files will be compiled before device files, commands will be compiled before CL programs. Refer to the CRTORD parameter on the command diagram for further details.
438
Debug Aids
For instance, the following single instruction would build a list of all files in library QGPL, display the list for editing and confirmation, and then delete all the objects in the edited list.
YDLTOBJ OBJ(QGPL/*ALL) OBJTYPE(*FILE) EDIT(*YES)
Debug Aids
This section describes CA 2E Toolkit Debug Aid concepts. There are five Toolkit aids specifically concerned with helping you to debug programs:
Work with database file utility Start debug utility Copy a list of files utility
439
Debug Aids
Ability to change, add, delete, or copy records. Ability to work on single or multi-format files: formats may also be selected within a multi-format logical file. Positioning functions If the file has a keyed access path, the display may be repositioned using the key fields. If the file has an arrival sequence access path, the display may be repositioned using the relative record number.
Ability to specify select/omit criteria, using a separate display A two level display: A record level display which enables you to scan through records quickly, and to compare records. Fields may be dropped from the record level display. A field level display that enables you to examine all the fields for a record.
Alternate field labels - You may specify that fields are to be described either with their DDS field names or their DDS column heading text. File, format, and field descriptions. Hexadecimal displays. Change values may also be specified in hexadecimal. A confirm prompt. When you press Enter after having entered new values for one or more fields, a confirm prompt will be displayed. You must answer the prompt with a Y before the program will update the database. You may switch this facility off or change the default from Y to N if you wish.
YWRKF Example
Examples of the YWRKF displays are given over the next few pages. The first display would be obtained by entering the Toolkit command Work with File upon a nominated file, for example:
440
Debug Aids
YWRKF FILE(QGPL/AARPGNL1)
The following represents the Work with File - Multi record display.
The following represents the Work with File - Single record display.
441
Debug Aids
Select a single record for update with selection option 5. The following represents the Work with File - Extended Field display.
Pressing F17 on a field gives the Extended Field display: The following represents the Work with File - File/Format Details display.
Pressing F14 causes the following display of format and field definitions to be shown: The following represents the Work with File - Prompt format display.
442
Debug Aids
You may use YWRKF upon a multi-format logical file, but only one format can be keyed on or added to at a time. You may specify which format is the current format using the following display, which is obtained by pressing F05. The following represents the Work with File - Select details display.
Pressing F07 on the top level display gives the following display, which allows you to specify select/omit criteria for records. The following represents the Work with File - Prompt key display.
443
Debug Aids
Pressing F04 allows you to specify positioning criteria for records using the following display: Note that this screen is only available if the file you are working with is indexed. The following diagram shows the main interconnections between the displays of the Work with File program: The following represents the YWRKF - Display connection map.
444
Debug Aids
Identical debug sessions can be entered repeatedly. If you alter the source for a program and recompile it, the line sequence numbers for your breakpoints will automatically be adjusted. Many different debug sets are allowed. A debug set consists of one or more breakpoints to be inserted according to the source directives. Variables can be specified for display at each breakpoint.
Refer to the YSTRDBG command diagram for details about how to specify breakpoint sets.
445
Debug Aids
The Toolkit command Start Debug helps you to program in an efficient top down manner. Sets of debug directives can be placed at strategic points in a new program as a routine part of your programming. Each debug set can reflect a different control level in your program, for example, main control, key validation, detail validation, update routines. You can then make use of the debug facilities for routine testing of the program and for problem shooting later on.
Many snapshots can be kept in the same library. Journalling is suspended while restoring.
Use of test pack libraries: you will probably keep one or more data libraries, each containing a complete set of all of the application files required by a system: these alternative libraries can be used in place of the library of live files when testing. Such a library will typically contain the physical files and all necessary dependent logical views. Creating or restoring such a library may be fairly cumbersome and slow, as it must either be done via an off-line media, or by using the i OS command Create Duplicate Object (CRTDUPOBJ) in a controlled manner that is on physical files before logical files. Use of journalling. Journalling may be of use of the immediate unravelling or tracing of errors. It is of limited use if there has been significant subsequent update of the database.
The Toolkit utility Copy File simplifies the process of creating test data: you need to keep only one or two complete sets of test files. Repeated snapshots can be taken of the contents of selected physical files: you can specify which files by use of the Toolkit facilities Create List and Edit List. The snapshots constitute a full description of the data in the library for the purposes of recovery.
446
Debug Aids
The files within each snapshot can be given an identifying prefix. This allows you to store many snapshots of a given file in the same library.
Suspension of Journalling
The Toolkit utility Copy File will stop the journalling of a physical file before replacing its contents: this makes the copy operation run faster. You may specify that journalling is to be restarted by the YCPYF utility after the copy has finished.
447
Compile Preprocessor
Compile Preprocessor
This chapter describes the Toolkit compile preprocessor including installing and invoking instructions, required routing data, and information on the source directives.
Overview
The compile preprocessor is a program that can be automatically invoked to run as a preliminary step on batch compiles. It has 256 Compiler crossreference independent options to:
Cancel any previous spool file listings. This ensures that only the latest compilation listings are retained, thus making the use of the i OS facility Source Edit Utility (STRSEU) for browsing compilation listings both quicker and easier. Synchronize source member text, object text and source title. You can ensure that objects and members have the same description. Invoke CL command(s) prior to compiler execution. A compilation environment can be created within the batch job. For instance, file overrides can be supplied if the name of a file required by a program differs from the name used in the program, or pre-requisite objects such as data areas can be created in the QTEMP library. Add compiler options from source member lines. The i OS shipped system requires that any compiler options be entered by hand for each compilation. This process is both time consuming and prone to error; and is especially a problem with maintenance programming done some time after the original development. If objects are recompiled without the correct overrides, the consequences can be far reaching. This facility enables these compiler directives to be stored in the source, and automatically re-applied whenever the object is compiled - and because the directives are applied automatically, it becomes possible to carry out generic recompilations of whole systems, or parts of systems, correctly. Suppress XREF listings. Compilations run significantly faster if crossreference listings of program variables are not producti ve.
448
Compile Preprocessor
449
Compile Preprocessor
Any Y* or P* directives which appear before the first Z* directive will be processed before the source member is compiled. Any Y* or P* directives which appear after the first Z* directive will be processed after the source member is compiled. If multiple Z* directives appear in the source member separated by other compile preprocessor directives, the first Z* directive will determine the separation of pre-compilation and post-compilation commands (but all subsequent Z* directives will be processed as part of the compilation command).
If both pre-compilation commands and post-compilation commands are required but no compilation overrides are required, a blank Z* directive (a directive containing only a Z* or a /*Z:) or a Z* directive containing only the compilation command itself can be used to separate pre-compilation commands and post-compilation commands, e.g.:
Y* SNDMSG MSG('About to compile &N...') TOUSR(*REQUESTER) Z* Y* SNDMSG MSG('Compilation completed!') TOUSR(*REQUESTER)
or
Y* SNDMSG MSG('About to compile &N ...') TOUSR(*REQUESTER) Z* CRTBNDRPG Y* SNDMSG MSG('Compilation completed!') TOUSR(*REQUESTER)
In this case, the compile preprocessor will recognize that the command in the second Y* directive should be executed after the compilation command has been executed. Both pre-compilation and post-compilation commands can contain the full range of substitution variables.
In a free-format source member (such as CL), an exit program preprocessor directive will have the following format:
/*P: [library-name/]program-name */
450
Compile Preprocessor
If the library name is not specified, *LIBL is assumed. All exit programs have the same parameter format, as follows: 1. 2. 3. 4. Compile command Source member Source file Source library
For instance, if the following compile preprocessor directive is found in an RPGLE source member called MYPGM in file QRPGLESRC in library MYLIB which is being compiled with the CRTBNDRPG command:
P* QGPL/EXITPGM
then the following command will be executed as part of the compilation process:
CALL PGM(QGPL/EXITPGM) PARM('CRTBNDRPG ' 'MYPGM ' 'QRPGLESRC ' 'MYLIB ')
Note that if an exit program is called before the source member is compiled, it can make changes to the source before the source member is compiled. It is the responsibility of the user to create and test exit programs thoroughly before deploying them in a production environment.
Cancel compilation if error ('1'/'0') (default: '0') Currently unused (default: blank)
If a global pre- or post-compilation exit program is specified, it must have the parameter format as defined in the "Exit program call functionality" section above) which will automatically be called during the compilation process. If the exit program library is not specified, *LIBL will be used. The global pre-compilation exit program (if specified) will be called before any exit programs defined using a P* directive and the global post-compilation exit program (if specified) will be called after any exit programs defined using a P* directive.
451
Compile Preprocessor
If byte 41 in the YBRTPXA data area is set to '0' (the default), then if the compile preprocessor encounters an error, the source member will be compiled using the system defaults, with all compile preprocessor directives ignored this is the default that has been used in previous versions of the compile preprocessor. However, if byte 41 is set to a value of '1', an error in the compile preprocessor will cause the compilation to end immediately. This setting allows the user to immediately identify any problems with, for instance, invalid compile preprocessor directives. Using the YBRTPXA data area to specify global pre- and post-compilation exit programs in this way allows users to perform automatic source manipulation (such as the addition of color to directives in the source) prior to compilation, without needing to specify a P* directive in every source member.
In a free-format source member (such as CL), an exit program preprocessor directive will have the following format:
/*X: [[library-name/]file-name,]member-name */
If the library name is not specified, *LIBL is assumed. If a file name is not specified, the current source member file name is assumed. For instance, a user could create a source member called RPGDFTOVR with the following directives in it:
Z* TGTRLS(V5R1M0) Z* DBGVIEW(*LIST) Z* OPTION(*NODEBUGIO)
and place it in file QRPGLESRC in library QGPL. Then, in all RPGLE source members, the user could simply have the following directive:
X* QGPL/QRPGLESRC,RPGDFTOVR
and when the program is compiled, the compile preprocessor will retrieve the Z* compilation overrides from the RPGDFTOVR source member and include them in the compilation command.
452
Compile Preprocessor
Any compile overrides specified in an external source member may themselves be overridden by compile overrides specified further down in the source member itself (or in a different external source member which is defined further down in the source member being compiled). So for instance, if the following preprocessor directive directives are coded into an RPGLE source member:
X* QGPL/QRPGLESRC,RPGDFTOVR Z* TGTRLS(V5R2M0)
then the source member will be compiled using TGTRLS(V5R2M0), since the Z* directive is after the X* directive. An external source member can itself contain X* directives pointing to 'nested' external source members (there is a limit of 100 nested source members). External source members can also contain Y* directives, to perform precompilation or post-compilation tasks. For instance, if a user has a number of modules MOD1, MOD2 and MOD3, which are bound into a single service program SRVPGM1, they could have single source member called e.g. SRVPGM1 which contains the CRTSRVPGM command to create the service program, e.g.:
Y* CRTSRVPGM SRVPGM(&L/SRVPGM1) + Y* MODULE( MOD1 MOD2 MOD3) + Y* TEXT('Service program 1')
In each of the modules MOD1, MOD2 and MOD3, the user can include the following directive anywhere after the first Z* directive:
X* QGPL/QRPGLESRC,RPGDFTOVR X* QGPL/QRPGLESRC,SRVPGM1
and whenever any of MOD1, MOD2 or MOD3 are recompiled, the module will be compiled using the defaults in the RPGDFTOVR external member and then the SRVPGM1 service program will also be automatically recreated to include the changed module.
453
Compile Preprocessor
The following should be noted when including compile preprocessor directives in EXCUSRSRC within CA 2E 1. All generators have now been standardized for backwards-compatibility so that any standalone X* directives in EXCUSRSRC will be converted into Y* directives that are inserted into the generated source of functions which call the EXCUSRSRC function after any Z* directives (i.e. as postcompilation commands). Standalone Y* directives continue to be inserted into the source before any Z* directives (i.e. as pre-compilation commands). This only applies to existing stand-alone X* compile preprocessor directives. To use the new compile preprocessor directive types (X* and P*), they must be in a block surrounded by directives which begin with '/*', e.g.:
/* compile preprocessor directives /*
2.
The /* directives can contain directives, e.g. '/* Start of preprocessor block' but will not be generated into the source. Only a single /* directive should start and end the preprocessor directive block. Directives within a preprocessor directive block are copied into the final source member prior to any Z* directives, until a Z* directive is found in the preprocessor directive block. If a non-blank Z* directive is found, it is inserted into the source with the default Z* directives generated into all 2E functions. If a blank Z* directive is found, it will not be generated into the source, but it will be used to delimit pre- and post-compilation commands (see the section on "Separation of pre- and post-compilation commands" for more details). All subsequent preprocessor directives are inserted into the final source member after any Z* directives. 3. Any P* (exit program call) directives will be ignored if they are found outside a preprocessor block. P* directives are only valid within a preprocessor directive block. For instance, if an EXCUSRSRC function contains the following code:
/* Start of preprocessor directive block Y* SNDMSG MSG('About to compile...') TOUSR(*REQUESTER) X* QRPGSRC,DOCSRC1 P* QGPL/PREPROCRPG Z* USRPRF(*OWNER) P* QGPL/PSTPROCRPG X* QRPGSRC,DOCSRC2 Y* SNDMSG MSG('Compilation completed!') TOUSR(*REQUESTER) /* End of preprocessor directive block
Then the final code that would be seen in the source of a function that calls this EXCUSRSRC would be as follows:
... Y* SNDMSG MSG('About to compile...') TOUSR(*REQUESTER) X* QRPGLESRC,DOCSRC1
454
Compile Preprocessor
P* QGPL/PREPROCRPG Z* <default-2E-compile-overrides> Z* USRPRF(*OWNER) P* QGPL/PSTPROCRPG X* QRPGLESRC,DOCSRC2 Y* SNDMSG MSG('Compilation completed!') TOUSR(*REQUESTER) ...
The first three directives of the EXCUSRSRC (not including the starting '/*' directive) have been inserted into the source. Next come the default Z* directives that are generated for 2E functions, followed by the Z* directive from the preprocessor directive block. Finally, the last three directives in the preprocessor block (not including the ending '/*' directive) are inserted into the source.
The preprocessor utility must be installed in the subsystem in which the compile is taking place. This is done by adding a routing entry to the subsystem. The submitted job must have the correct routing data, and also the switch settings to invoke the desired options. Any combination of options may be selected via the job switch settings. For the options specifying extraction of directives from the source, the directives must have been coded in the source in the correct format (see Source Directives below).
2.
Add the following routing entry (An alternative sequence number can be specified if 1111 is already in use).
ADDRTGE SBS(subsystem-name) SEQ(1111) CMPVAL(YCRTOVR) PGM(YBRTPRC)
455
Compile Preprocessor
3.
The installation only has to be done once per subsystem. Thereafter all jobs submitted to that subsystem with the correct routing data will invoke the preprocessor. The preprocessor can be installed in as many subsystems as desired.
To reroute a job:
RRTJOB RTGDTA(YCRTOVR) RQSDTA(CRTRPGPGM DEMO)
To change a job description so that all compilations using the job description invoke the preprocessor:
CHGJOBD JOBD(QBATCH) RTGDTA(YCRTOVR)
The routing data on a job description only has to be changed once. When submitting jobs with the SBMJOB command change the routing data parameter to *JOBD. This will ensure that the routing data defined in the job description is used by the SBMJOB command and the preprocessor will be invoked. This is particularly convenient if compilations are submitted using the i OS Programmers Menu.
456
Compile Preprocessor
Switching Settings
The options for the preprocessor are controlled by setting the SWS parameter on the job as follows:
Switch 1 off: SWS(0XXXXXXX). Remove old compilation listings of the object being compiled. Switch 1 off, Switch 4 on: SWS(0XX1XXXX). Remove old compilation listings of the object being compiled, but only move those belonging to the current user profile. Switch 2 off: SWS(X0XXXXXX). Process source file directives. Switch 3 off: SWS(XX0XXXXX). Suppress XREF listings.
The normal default, if no switches are set, is thus that all features will be invoked. Switches can be set either using the job description or the SBMJOB command.
CL Syntax
The compile preprocessor can handle CL statements in either i OS or S/38 syntax. It examines the request string to determine the syntax and then If the request string contains qualified names specified in S/38 syntax, that is the form OBJ.LIB, or S/38 keywords, PUBAUT, the string will be deemed to be in S/38 syntax and the request string will be rerouted with routing data QCMD38 which will invoke the i OS Environment request processor QCL. For example:
CRTRPGPGM PGM(FRED.QGPL) SRCFILE(QRPGSRC.QGPL)
If the request string contains qualified names specified in i OS syntax, for example the form LIB/OBJ, or i OS keywords (that is, AUT, REPLACE), the string will be deemed to be in i OS syntax and the request string will be rerouted with routing data QCMDB which will invoke the QCMD request processor. For example:
CRTRPGPGM PGM(QGPL/FRED) SRCFILE(QGPL/QRPGSRC)
Source Directives
Instructions for the compile preprocessor may be coded in source, using special types of comment lines. These instructions are referred to as source directives.
457
Compile Preprocessor
&L - Library into which object is compiled. &O - Name of object compiled. &T - Type of object compiled (for example, *PGM, *CMD)
Compiler directives specify extra parameters to be added to the actual create command string. For example:
On CRTPF and CRTLF: MAXMBRS (*NOMAX), AUT(*ALL), SHARE(*YES) MAINT(*REBLD), SIZE(*NOMAX), RECOVER(*AFTSTRCPF), LVLCHK(*NO) On CRTDSPF: RSTDSP(*YES), DFRWRT(*YES) On CRTPRTF: PAGESIZE, LPI, etc. On CRTRPGPGM: IGNDECERR(*YES), USRPRF(*OWNER) On CRTCLPGM: USRPRF(*OWNER), LOG(*NO) On CRTCMD: PGM(PGM), MODE(*BATCH), ALLOW(*BPGM), VLDCKR(CKR), PRDLIB(PRODLIB)
458
Edit Aids
Example
Source directives in DDS source
Example
Source directives in CL and CMD source
Example Restrictions
Any source directives for the compile preprocessor must appear within the first twenty lines of the source member.
Edit Aids
The Toolkit Edit Aids enable you to carry out certain commonly required functions more quickly and more accurately. The Toolkit Edit Aids can be divided into three categories:
Display and change commands Source manipulation commands Special display commands
459
Edit Aids
Message descriptions: (YEDTMSGD) Data area contents: To change any data area: YEDTDTAARA To edit the LDA: YEDTLDA To edit the GDA: YEDTGDA
When you need to translate messages into other National languages: it is generally easier to carry out the text editing of messages using SEU rather than the command entry display. This is especially true for IGC versions of i OS, when ideographic message text must be entered using SEU. When merging or reconciling messages files, for instance when development has been taking place on two different machines
Refer to the command diagram for an example of the CL which is generated by the YRTVMSGF command.
460
Edit Aids
Rename an object and its source (YRNMOBJSRC). Create a set of source files in a given library (YCRTSRCPF). Scan source (YSCNSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be scanned for the occurrence or absence of a search string, or combination of search strings. The output can either be in the form of a report, or be a result list specifying the members containing the string, or both. The list output is especially useful if you wish to subsequently process all items containing the string. Compare source (YCMPSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be compared against another member or members. A listing of the differences may be produced. If many members are compared a member list may be created of the members which differ or which match. Scan and replace source (YSCNRPLSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be scanned for the occurrence or absence of a search string, and any found occurrences replaced by another specified string. Tidy RPG/400 source (YTDYRPGSRC). The start and end statements of RPG/400 structured programming constructs can be documented automatically.
461
Edit Aids
The above example would scan through all source files whose names begin with the letter Q in library QGPL for occurrences of the string CALL FRED anywhere in columns one to eighty. It would produce a report of every line containing the specified string, as well as a member list of the names of the source members containing the string.
462
Edit Aids
converting DDS command key usage utility translating with a translation table commands converting source for ideographic support utility
Command key usage is mapped according to the values you specify in a table. For instance you could specify that CF01 should be mapped to CF03, CF03 to CF01. The resulting indicator to be set when the command key is pressed is not changed, so the programs which used the display file will not need altering. Mapping of a given key may be fixed - to a specified command key - for example, CF01 to CF03, or variable - to use the first available unused command key. As an optional feature you may specify that an attempt be made to convert the command key explanation text, also according to the table, for example, from CMD: 1-Exit to F3= Exit. You may also specify that text leaders be converted to SAA standards: any instances of dot leaders (...:) will then be converted to the SAA standard (. . :).
The actual mapping is specified by a table which you may edit using an interactive program invoked by the Toolkit command Edit Command Key Conversion Table (YEDTCKYTBL). Refer to the respective command diagrams for information about the table values, and for examples of converted source. The following diagram represents the use of DDS conversion utilities.
463
Edit Aids
When preparing an upper-case only version of an application, for instance to run under the ideographic version of i OS. When converting data to run under a different multinational character set.
Translate Physical File Command The Translate Physical File (YTRNPF) command will translate the data in all the alphanumeric fields in a database file or files. For example, the following would convert all data fields in Y1MNU to upper case:
YTRNPF FILE(Y1MNU) TRNTBL(QCASE256)
Translate Source File Command The Translate Source file (YTRNSRCF) command will translate all the source data in a source file or files. For example, the following would convert all source files in library QGPL to upper case:
464
Edit Aids
The command can also be used to strip out Text Management/38 attributes and comments from a source member.
465
Introduction
The Toolkit documentation aids are based on simple fourth generation principles:
Self-documenting systems: Keep documentation on the computer as far as is possible. Use the computer both to edit and to organize the documentation. Tools should be available to search and manipulate the documentation. Make documentation available in the correct context: for example, help text for the displays of a program should be available when using the program; program descriptions should be available in the program source. Make documentation complete and sufficient: it should be possible to re-create a system from source without the addition of further information.
Structured documentation: Keep only one version of the documentation. The computer can be used to organize it into the various permutations that will be required. Different users will have different needs: for example a system analyst needs to see a different level from a programmer. Ideally the different needs will be supplied by different routes through the same underlying data. Each level should contain information possessing a degree of detail appropriate to the level. Keep documentation to a minimum: this requires the use of standard conventions for common types of documentation.
i OS provides you, in profusion, with the basic information needed to document a system. The Toolkit utilities help you to structure the information into a documentation pyramid, that has different levels of access.
51
Introduction
Note that as far as is possible, Toolkit documentation utilities enable you to generate documentation as a by product of your normal activities.
Documentation
The Toolkit Documentation Aids help to improve your documentation in several important ways:
By providing documentation utilities that will assemble up-to-date descriptions of your actual systems, collated with the relevant descriptive text. By providing computer-generated cross-references to index your documentation. By providing a method of extracting selected comments from program source into a higher level summary. By providing a method of storing information about additional object attributes in the source. For details of this facility, see the section Compile Preprocessor in the chapter Programmer Aids.
52
Introduction
By providing utilities to present on-line Help text. For further details, see the section on help text in the User Access Aids chapter. By providing good hard copy for all of the Toolkit utilities: for example, menu, panel and report designs, and object, database file and member lists. By providing standards that can be used to streamline and structure documentation. The importance of this last point should not be underestimated: a good standard structure removes the need for repetition of information already given by the context.
System documentation commands, including cross-reference utilities Documentation commands for the Toolkit design utilities Documentation commands for the other Toolkit utilities
All of the documentation utilities are invoked by commands, so they can be used by your own utilities.
53
System Documentation
System Documentation
CA 2E Toolkit provides a comprehensive range of utilities to document your application systems. In particular:
The Toolkit Summary documentation commands, Document Program (YDOCPGM) and Document File (YDOCF), provide compact, pertinent documents, that describe the salient features of programs and files for reference purposes. The Toolkit Cross-reference documentation commands provide concise descriptions of how the entities in your system connect. The Toolkit Print key conversion commands (YSTRCVTPRT, YCVTPRT) provide an easy method of obtaining illustrations of actual panel displays for inclusion in your user instruction manuals. The Toolkit Source scan commands (YSCNSRC, YSCNRPLSRC) provide listings of source lines containing a specified search string.
The Toolkit List utilities can be used to help with system documentation; for example, to record configuration details.
The documentation commands can all be run generically on whole systems. Your company name can be made to appear on all documentation. The utilities are all command driven and may be invoked either interactively or in batch.
54
System Documentation
The company name data area can conveniently be changed using the Toolkit command Edit Data Area (YEDTDTAARA) which will display the existing value and allow you to override it:
YEDTDTAARA DTAARA(YYCOTXA)
A second data area, YYSYTXA, determines the application system name; the data area is used by the Toolkit Create Design DDS commands (YCRTPNLDDS and YCRTRPTDDS) when generating program banners. The data area is also used by the Toolkit Create Source File command (YCRTSRCPF) as a default, when generating descriptive text for new source files.
Object information Access path information, including key fields Join file information, including join fields Source member information Format information Database dependency information Field information, optionally including offsets, and definition references Additional field explanation comments, extracted from the field dictionary
Examples of the output of the YDOCF command are shown in the following two illustrations. Two levels of list detail are allowed: a basic level (80 characters per line), suitable for inclusion in system specifications, and a detailed level (132 characters per line), suitable as a reference document for programmers.
55
System Documentation
The command may be run on a file, a generic file name, or on a list of files. For instance, the following command would document all of the physical files in a library:
YBLDOBJLST OBJ(QGPL/*ALL) OBJTYPE(*FILE) /* build list */
56
System Documentation
Object information (from object) Functional synopsis (extracted from source) Source member information (from source member) File/format used information (from object) Sub-programs used information (from source analysis) Entry parameters required (from source analysis) Where called from information (from source analysis)
57
System Documentation
Maintenance notes (extracted from source) Warning notes (extracted from source)
Examples of the output of the YDOCPGM command are shown in the next three illustrations.
58
System Documentation
59
System Documentation
*H Header source directives *M Maintenance source directives *T Title source directives;documentation W Warning source directives
510
System Documentation
Program descriptions can be written ahead of the program, so that they serve as program specifications. If programmers fail to provide even a basic description of their programs, the program documenter makes the fact obvious, and so helps you control the quality of your documentation. For example, the marked comments from the CL program shown following in the first diagram, would be summarized as shown in the diagram that follows it:
511
System Documentation
Examples of the output of the YDOCPGMREF command are shown in the following four illustrations.
512
System Documentation
513
System Documentation
514
System Documentation
515
System Documentation
List by calling object List by referenced object Explosion listing by calling object Explosion listing by referenced object
The utility brings together source, object, and menu file references into a single uniform listing. Examples of the output of the YDOCEXCREF command are shown in the next four illustrations.
516
System Documentation
517
System Documentation
518
System Documentation
519
System Documentation
Specification of file name, or generic file name, and file attribute, for inclusion in listing Specification of one library, or several libraries
Examples of the output of the YDOCFLDREF command are shown in the following illustration:
520
System Documentation
List messages by program List programs by message List messages in alphabetical order List unreferenced messages
Examples of the output of the YDOCMSGREF command are shown in the following four illustrations.
521
System Documentation
522
System Documentation
523
System Documentation
Selection of object name, object type, object owner, user, or both, for inclusion in listing List authorizations by object name List authorizations by object owner List authorizations by user profile
Examples of the output of the YDOCAUT command are shown in the next three illustrations.
524
System Documentation
525
System Documentation
526
System Documentation
Source Documentation
The Toolkit Document Source utility (YDOCSRC) provides compact source listings of a list of source members. Features include:
Optional indentation of RPG III source Can run in batch Can be list driven
527
System Documentation
528
System Documentation
1.
You enter print conversion mode by means of the Toolkit command Start Print Conversion (YSTRCVTPRT). The command allows you to nominate up to four print files for conversion; for example:
YSTRCVTPRT PRTF(QSYSPRT YPRTKEY$)
Any output to the nominated files will be trapped for conversion. Starting print key conversion mode invokes the i OS command entry program QCMD, thus allowing you to call the commands or programs whose displays you wish to document. 2. You create the print output for the displays that you want illustrated. This can be done by pressing the PRINT key while displaying any screen that is to be illustrated: provided the print file used by the print key is one of the nominated print files. You convert the print output into a text source member by means of the Toolkit command Convert Print (YCVTPRT), for example:
YCVTPRT PRTF(*ALL) SPLNBR(*ALL) FILE(QTXTSRC) MBR(FRED)
3.
This command would convert all print key output to a spool file member FRED in file QTXTSRC. The following commands would produce the illustration shown next:
529
Documenting Designs
YSTRCVTPRT /* Start print conversion. */ STRPGMMNU /* Call programmers menu. */ Type in (for example) YGO *Y and press PRINT key..... YCVTPRT /* Convert print output to source. */
You may control the characters used to form the frame by using the Toolkit Edit Design Defaults command (YEDTDSNDFT).
Documenting Designs
Each of the Toolkit design objects has an associated print command. The print output from the commands to document Toolkit menus, Toolkit panel designs, and Toolkit report designs is designed to be compact, comprehensive, and tidy. The prints of the designs can be bound up directly, to form a complete system specification: narrative text is inserted alongside the relevant designs, and indices will be generated automatically.
530
Documenting Designs
Documenting Menus
The Toolkit command Document Menu (YDOCMNU) will print a menu, or menus. The output will fit on 80 column (A4) paper.
531
Documenting Designs
Options include:
An index of menus An image of the menu (suitable for including in user instruction manuals) A record of the actions invoked by each menu option
The Toolkit command Document Menu References (YDOCMNUREF) prints all menu usage by option.
532
Documenting Designs
533
Documenting Designs
Options include:
An index An image of the panel design A key explaining the symbols used in the panel design The narrative text associated with the panel design The branching conditions associated with the panel design
The Panel designs can include sample data in the fields. The sample data is set up with the Toolkit Display Panel Design utility (YDSPPNL) - see the Design Aids chapter of this manual.
534
Documenting Utilities
An index An image of the report design A key explaining the symbols used in the report design The narrative text associated with the report design
Documenting Utilities
This section describes the documentation available for the CA 2E Toolkit utilities. Note that the documentation for the design utilities is described in a separate section of this manual.
Documenting Lists
Each of the Toolkit list types has an associated print command:
535
Documenting Utilities
List type Object list Database file list Member list Format list Library list
536
Spooled files arriving on the QPRINT output queue with a USRDTA attribute of MYATTR, produced by user JOHN should be immediately converted into HTML files in the /YSPLFS/User/JOHN/ directory. In addition, user JOHN should be notified that the above processing has occurred. Spooled files arriving on the QSYS/QEZJOBLOG output queue, which were produced by user QSPLJOB, should be copied to a specified physical file member and then deleted. Any spooled files on any output queues, which have the USRDTA attribute as blank, should have the USRDTA attribute set to the name of the user who produced the spooled file.
You can use any or all of the above examples. Spooled file routing entries are added, edited, and deleted with the YWRKSPLRTE (Work with Spooled File Routing Entries) command.
61
Once spooled file routing entries have been created, a spooled file router can be started by using the YSTRSPLRTR (Start Spooled File Router) command and ended using the YENDSPLRTR (End Spooled File Router) command. Additionally the YRSTSPLRTR (Restart Spooled File Router) command is available to restart the spooled file router, if spooled file routing entries have been added, changed, or deleted. The Spooled File Router can be distributed to any of your IBM i systems, even if the machine in question does not have the full CA 2E Toolkit installed.
62
63
71
Storage Requirements
The complete Toolkit package takes about 18 MB of disk storage. The package is contained within two libraries, Y1SY and Y1SY38. About 3.4 MB of the storage is required for the interactive help text, including command diagrams. If you are short of storage, you may delete the help text without affecting the performance of any of the utilities. This can be done as follows:
DLTF FILE(Y1CMDTXT) DLTF FILE(Y1HLPTXT) /* to delete command diagram text*/ /* to delete Help text */
Backup Requirements
There are several Toolkit objects whose data contents you are likely to change as a result of using the Toolkit utilities, and which therefore may require saving onto an off-line storage medium.
Backup Strategies
Here are four different approaches to backing up Toolkit. 1. Regularly save the entire library Y1SY:
SAVLIB LIB(Y1SY)
This would allow for recovery in a single step - but requires the unnecessary saving of objects that you have not changed. 2. Save only the items that you have changed since the last full save of the library:
SAVCHGOBJ OBJ(*ALL) LIB(Y1SY) REFDATE(*SAVLIB)
This is efficient, but requires two steps to recover: the restoration of the utilities, followed by the restoration of the changes. 3. 4. Move any objects in Y1SY that require saving into other libraries that are already covered by your backup regime. Explicitly save just those objects in Y1SY that require backing up.
If you adopt either of the last two approaches, you will need to bear in mind the backup considerations described below.
72
Backup Considerations
The Toolkit objects that might require saving can be divided into three categories:
Description Menu design file Panel design file Report design file 80 Report design file 132 Report design file 190 System text file Name of Help text file Help text file library
Create command YCRTDSNF YCRTDSNF YCRTDSNF YCRTDSNF YCRTDSNF YCRTDUPOBJ YCRTDUPOBJ YCRTDUPOBJ
List objects
The following table shows list objects:
Description Object list Member list Database file list Format list
73
Object YLIBLST YUSRPRF YYCOTXA YDSCDFA YDRPDFA YDSCDCA YPEXCHA YPBXCHA YPLGOQA
*Type *FILE *FILE *DTAARA *DTAARA *DTAARA *DTAARA *DTAARA *DTAARA *DTAARA
Description Library list file User profile file Company text Panel design defaults Report design defaults DDS design defaults Substitution character Frame characters Name of job log queue
Create command
CRTDUPOBJ
Different considerations apply to each category of object: Design objects: you are likely to have several different sets of the design files in different libraries, which will be saved as part of the back-up regimes for those libraries. You will probably keep at least one set of design files per application and it is quite possible that you will not actually keep any data in the versions of the design objects in the Y1SY library. The design files can be regarded as being similar in concept to source files such as QCLSRC and QRPGSRC - and similar considerations apply to using them. List objects: most of the lists you use will probably be temporary ones stored in QTEMP. When you do create a permanent list you will probably want to create it in a named library other than Y1SY. Thus it is again quite possible that you will not keep any data in the versions of the list objects in the Y1SY library. System parameter values: You will probably want to keep only one version of the objects containing system values. It may be very important that the objects, especially the library list and user profile file, are saved correctly and frequently. The system parameter objects are therefore prime candidates for either moving to a library that you already save regularly (e.g. QGPL), or for saving explicitly by means of the i OS Save changed objects command (SAVCHGOBJ).
74
Print Output
You may want to change the print file attributes for the print files in the Y1SY library, forms length, lines per inch, etc. This can be done for all files using the command Change Print File (CHGPRTF):
CHGPRTF FILE(Y1SY/*ALL) CPI(8) LPI(15)
CL Commands
There are seven commands in Toolkit which are intended mainly for internal use by Toolkit, but which may also be of use in your own CL programs. Refer to the respective command diagrams for further details. The commands are as follows:
YRTVOBJLIB - A command to search the invoking jobs library list for a given object and return the library in which it resides YCVTBIN - A command to convert a binary number to a decimal number YCHKVN - A command to check whether a character string is a valid i OS system name. YCHKLIBLST - A command to check whether a library list exists in a given Toolkit library list file
75
YCHKMNU - A command to check whether a menu exists in a given Toolkit menu file YCHKPNL - A command to check whether a panel design exists in a given Toolkit panel design file YCHKRPT - A command to check whether a report design exists in a given Toolkit report design file
76
Libraries
Object Name Y1SY Description Toolkit Utility library. Toolkit S/38 Utility library. Crt. Cmd. CRTLIB Parameters TEXT(Toolkit Utility + library) TEXT(Toolkit S/38 + Utility library)
Y1SY38
CRTLIB
A1
39BDatabase Files
Database Files
Object Name YDSNMNU YDSNPNL YDSNRPT Description Menu file. Panel design file. Report design file. Crt. Cmd. YCRTDSNF YCRTDSNF YCRTDSNF Parameters TYPE(*MENU) + OPTION(*CREATE) + TYPE(*PNL) + OPTION(*CREATE) + TYPE(*RPT) + OPTION(*CREATE) +
Object list file. Member list file. Dbf list file. Format list file. Help text. Command diagrams. Help text for YGO/YDSPHLP Library list file.
YBLDOBJLST YBLDMBRLST YBLDFMTLST YBLDFMTLST CRTSRCPF CRTSRCPF CRTSRCPF TEXT(Toolkit help text) TEXT(Toolkit menu text) TEXT(YGO/YDSPHLP help text)
YLIBLST
CRTPF TEXT*Toolkit library + lists) TEXT(Toolkit User + profile extensions) TEXT(YCHGPWD forbidden + passwords) TEXT(Toolkit User src)
YUSRPRF
CRTPF
YPWDVAL
CRTPF
Y1USRSRC
CRTSRCPF
A2
40BPrograms
Programs
Object Name YINLPGM YINLPGMPWD YPWDVALPGM YBRTPRC YDDSHPR Y1PGMSC Description Initial program. Password expiry chk Password validation Compile preprocessor Help text display. Message sender. Crt. Cmd. CRTCLPGM CRTCLPGM CRTCLPGM CRTRPGPGM CRTRPGPGM CRTCLPGM Parameters (1) (1) (1)
(1)
Message Files
Object Name YYYYMSG Y1USRMSG Description Toolkit messages. Toolkit messages for execution of end user pgms. Toolkit messages for compilation of end user objects. Toolkit device message Crt. Cmd. CRTMSGF CRTMSGF Parameters MSGF(YYYYMSG) + TEXT(Toolkit messages) MSGF(Y1USRMSG) + TEXT(Toolkit messages + for end user programs) MSGF(Y1USRPMT) + TEXT(Toolkit messages + for end user objects) MSGF(Y1PMTMSG) + TEXT(Toolkit messages)
Y1USRPMT
CRTMSGF
Y1PMTMSG
CRTMSGF
A3
42BData Areas
Data Areas
Object Name YMHPFLA Description Default help file name Crt. Cmd. CRTDTAARA Parameters DTAARA(YMHPFLA) + TYPE(*CHAR) LEN(10) + VALUE(QTXTSRC) TEXT(Default help file + name) DTAARA(YMHPLBA) + TYPE(*CHAR) LEN(10) + VALUE(*LIBL ) TEXT(Default help file + library name) DTAARA(YMHPOPA) + TYPE(*CHAR) LEN(10) + VALUE(*USRPRF ) TEXT(Default help display + ???) DAARA(YMHPYKA) + TYPE(*CHAR) LEN(10) + VALUE(FUNCK ) TEXT(Default keys help + label) DAARA(YMHPYWA) + TYPE(*CHAR) LEN(7) + VALUE(70 15 Y) TEXT(Default window + size) DTAARA(YPBXCHA) + VALUE(| | . . ) TEXT(Frame characters) DTAARA(YPLGOQA) + TYPE(*CHAR) LEN(10) + VALUE(*LIBL ) TEXT(Job log output + queue name)
YMHPLBA
CRTDTAARA
YMHPOPA
CRTDTAARA
YMHPYKA
CRTDTAARA
YMHPYWA
CRTDTAARA
YPBXCHA
CRTDTAARA
YPLGOQA
CRTDTAARA
A4
42BData Areas
Description Alternative substitution character for YEXCxxxLST commands Window borders and attributes
Parameters DTAARA(YPEXCHA) + VALUE( ) TEXT(Alternative + substitution character) DTAARA(YWWDBDA) + TYPE(*CHAR) LEN(10) + VALUE( B..::..::) + TEXT(Window + borders and attributes) DTAARA(YYCOTXA) + TYPE(*CHAR) LEN(40) + VALUE(Company name) TEXT(Company name for + displays and reports) DTAARA(YYFXNOA) + TYPE(*DEC) LEN(4) + TEXT(Toolkit Fix) level number) DTAARA(YYSYTXA) + TYPE(*CHAR) LEN(30) + VALUE(Application name) TEXT(Application name + for reports) DTAARA(YYPWCKA) + TYPE(*CHAR) LEN(100) + VALUE(0040Y) TEXT(Password control + values)
YWWDBDA
CRTDTAARA
YYCOTXA
Company name
CRTDTAARA
YYFXNOA
CRTDTAARA
YYSYTXA
CRTDTAARA
YYPWCKA
CRTDTAARA
A5
Print Files
File Name YCMPSRC$ YCVTCKY$ YDBFLST$ YDOCF$ YDOCKEY$ YDOCMNU$ YDOCMNUX$ YDOCPGM$ YDOCPNL$ YDOCRPT$ YDOCSRC$ YDOCUSR$ YEXPBYOBJ$ YEXPBYREF$ YFILBYPGM$ YFILNOREF$ YFLDREF$ YFMTLST$ YLIBLST$ YMBRLST$ YMSGBYPGM$ YMSGFIL$ YMSGNOREF$ YOBJAUT$ YOBJBYREF$ YOBJLST$ YOWNAUT$ YPGMBYFIL$ YPGMBYFMT$ YPGMBYMSG$ YPRTKEY$ YREFBYOBJ$ YSCNRPL$ YSCNSRC$ YUSRAUT$ YWRKF$ Type PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF PRTF Description Compare source Convert DDS command keys Database file list File documentation Command key conversion Toolkit menu documentation Document menu references Program documentation Toolkit Panel designs Toolkit Report designs Source listing Document user profiles Explode references by object Explode objects by reference Files by program Files without a reference Fields by file Format lists Library lists Member lists Messages by program Document messages references Unreferenced messages Document authority Objects by reference Object lists Authority by owner Programs by file Programs by format Programs by messages Print key file for print key output Execution references by object Source scan/replace report Source scan report Authorizations by user Work with file Command YCMPSRC YCVTDDSCKY YDOCDBFLST YDOCF YEDTCKYTBL YDOCMNURYDOC MNUREF YDOCPGM YDOCPNL YDOCRPT YDOCSRC YDOCUSRPRF YDOCEXCREF YDOCEXCREF YDOCPGMREF YDOCFLDREF YDOCPGMREF YDOCFMTLST YDOCLIBLST YDOCMBRLST YDOCMSGREF YDOCMSGREF YDOCMSGREF YDOCAUT YDOCEXCREF YDOCOBJLST YDOCAUT YDOCPGMREF YDOCPGMREF YDOCMSGREF All int pg YDOCEXCREF YSCNRPLSRC YSCNSRC YDOCAUT YWRKF
B1
44BDisplay Files
Display Files
File Name YDDSHPR# (1) Crt. Cmd. CRTDSPF Description FILE(YDDSHPR#) DFRWRT(*YES) SRCFILE(Y1USRSRC) RSTDSP(*YES)Text(YDSPHLP display help text.) FILE(YDMNDSI#) DFRWRT(*YES) SRCFILE(Y1USRSRC) RSTDSP(*YES) Text(YGO display menus) Command YDSPHLP
B2
Menu
Command Object rights Opr YCPYMNU YDOCMNU YGO YRNMMNU YDLTMNU YWRKMNU X X X X X X Mgt X Exs Data rights Read X X X X X X Add X Upd X Del X READ on lib READ on lib READ on lib OBJOPR on CRTPF READ on lib READ on lib READ on lib Additional Rights
X X
X X X
X X X
X X X
Design Files
Command Object rights Opr YCRTDSNF YADDDSNFM YEDTDSNDFT X X X Mgt X X X Exs X X X Data rights Read X X X Add Upd Del EXIST on obj EXIST on obj EXIST on obj Additional Rights
C1
47BPanel Designs
Panel Designs
Command Object rights Opr YCPYPNL YDSPPNL YDOCPNL YWRKPNL YRNMPNL YDLTPNL YRTVPNLDSN YDFNPNLDSN YCRTPNLDDS X X X X X X X X Mgt X Exs Data rights Read X X X X X X X X Add X Upd X X X X X Del X READ on lib READ on lib READ on lib READ on lib OBJOPR on CRTPF READ on lib READ on source OBJMGT on source file. Additional Rights
X X X
X X X X
X X
Report Designs
Command Object rights Opr YCPYRPT YDOCRPT YWRKRPT YRNMRPT YDLTRPT YCRTRPTDDSY RTVRPTDDS X X X X X X X Mgt X Exs Data rights Read X X X X X X X Add X X X X X Upd X X X X X Del X X X X X READ on lib READ on lib READ on lib OBJOPR on CRTPF READ on lib READ on lib OBJMGT on source READ on source Additional Rights
X X
C2
49BPassword Values
Password Values
Command Object rights Opr YCHKPWDVAL YCHKPWDVAL YCHGPWD X X X Mgt Exs Data rights Read X X X Add X X Upd X X Del X X READ on lib OPR+READ only to display values Enabled by pgm adoption Additional Rights
Lists
Command Object rights Opr YBLDxxxLST YEDTxxxLST YFLTxxxLST YEXCxxxLST YDOCxxxLST YRNMLST YCPYLST YCHGLST YCHKLSTE YDLTLST YOPRLST YINXLST YCVTDBR YCVTDBFLST YCVTMBRLST YBLDDOC YDSPMBRLST X X X X X X X X X X X X X X X XRX Mgt X Exs Data rights Read X X X X X X X X X X X X X X X XRX Add X Upd X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Del X X READ READ READ READ on on on on lib lib lib lib Additional Rights
X X X X X X
READ on input lst OBJOPR on CRTLF READ READ READ READ on on on on YDBFLST YMBRLST YMBRLST lib & fil
X X
C3
51BLibrary Lists
Library Lists
Command Object rights Opr YBLDLIBLST YCHGLIBLST YDLTLIBLST YEDTLIBLST YCPYLIBLST YRNMLIBLST YWRKLIBLST YCHGLIBL YCHGJOBDLL YRNMLIB X X X X Mgt Exs Data rights Read X X X X X X X X X X Add X X X X X X X Upd X X X X X X X Del X X X X X X X UPD on jobd UPD on jobd OBJMGT on LIB Additional Rights
X X X
Data Areas
Command Object rights Opr YEDTDTAARA YEDTLDA YEDTGDA X X X Mgt Exs Data rights Read X X X Add X X X Upd X X X Del X X X CHGDTAARA CHGDTAARA CHGDTAARA Additional Rights
Object Manipulation
Command Object rights Opr YCPYF YCHGCMD YDLTOBJ YMOVOBJ YCHGOBJOWN YCRTDUPOBJ YCRTOBJ X X X X X X X Mgt X X X X X X X Exs X X X X X X X Data rights Read X Add X Upd X Del X READ on from file OBJOPR on journal READ on YOBJLST READ on OBJLST READ on YOBJLST READ on YOBJLST OBJOPR on userprf READ on YOBJLST READ on YMBRLST READ on source Additional Rights
X X X
C4
Command
Object rights
Data rights
Additional Rights ADD on lib OBJOPR on jobd. OBJEXIST on obj MGT on src file. OBJEXIST on obj OBJMGT on src file
X X X
X X
X XD
X X XP255D
X X X X X X X
X OBJOPR on ENTDBG
X X X X
X X
X X X X X
X X X X X
OBJOPR on MSGF
C5
55BUser Profiles
User Profiles
Command Object rights Opr YDSPUSRPRF YCRTUSRPRF YDLTUSRPRF YCHGUSRPRF YDOCUSRPRF YRTVUSRPRF YCPYUSRPRF YRNMUSRPRF X X X X X X X X Mgt Exs Data rights Read X X X X X X X X X Add X X Upd Del Authority to use CRTUSRPRF cmd Authority to use DLTUSRPRF cmd Authority to use CHGUSRPRF cmd Additional Rights
X X
X X X
Authority to use CRTUSRPRF cmd Authority to use CRTUSRPRF and DLTUSRPRF cmds
C6
Overview
Several of the Toolkit utilities make use of directives encoded in HLL source statements. All such directives are coded as special types of comment lines in the source. The source types of HLL languages are classified by Toolkit as either fixed or floating:
For fixed source types, the directive control characters must always be in a particular column of the source. For floating types, the directive control characters may appear in any column position, and the end of the directive should be shown by the use of the end comment characters (*/).
Free Fmt Fixed Fmt Source Source 123456789 ....*D: ...D* ....*H: /*H: */ /*D: */
Where Used
YSTRDBG
Documentation synopsis
YDOCPGM
D1
56BOverview
Free Fmt Fixed Fmt Source Source 123456789 ...H* ....*M: ....M* *T .(1) : ...T* ....*W: ...W* ....*Y: ...Y* ....*Z: ...Z* /*Z: */ /*Y: */ /*W: */ /*T: */ /*M: */
Where Used
Documentation maintenance
YDOCPGM
Title line
YCRTOVR (2)
YDOCPGM
Documentation warning
YDOCPGM
YCRTOVR (2)
YDOCPGM
Compiler override
YCRTOVR (2)
YDOCPGM
(1) For RPG III source, /TITLE may also be used (2) Compile pre-processor directives should appear within the first twenty lines of a source member.
Examples
The following is an example of Toolkit Source directives for RPG III
D2
56BOverview
Text Source . *T: text . *Y*: text . *YI: XXXXXXXXXX . *YH: XXXXXXXXXX
Source Directive Type Text title statement Text index comment Text index entry statement Text index label statement
Source Directive Type Window size Window format definition Window format Keys help vector
D3
56BOverview
For explanations and examples of these directives, see the section Specifying Help Text Directives in the chapter User Access Aids.
D4
Toolkit Modules
The four modules are:
Administrator (*PGMR) To execute commands that administer and manipulate source code and objects as follows: Display, amend, or print any database files with selection on field or data values
Automatically scan for and replace values in source code Build and change lists of objects and source members, then apply any command to each list item without programming or compilation
Submit source members of different types to be compiled and automatically map correct attributes to each new object
Documaker (*DOC) To execute commands that document the Toolkit as follows: Document database and device files to show system-wide field usage Document programs, detailing all files, data areas and other programs used and summarizing program source automatically Cross reference the system with exploded object and object calls, producing a list of unreferenced files Authorization to use the modules is given with the Toolkit Grant Product Authorization command (YGRTPRDAUT).
E1
57BToolkit Modules
Menumaker (*USR) To set up and manage as a Toolkit environment as follows: Design and run menus without programming or compilation
Manage user environments by extending attributes of CPF user profiles without programming or user disruption
Designmaker (*DSN) To paint design layouts, create prototypes and automatically generate source as follows: Paint panel and report designs with an interactive editor Simulate complete systems with prototype tools
Automatically generate panel and report source code Following are the utilities included with each module. Note that some utilities are included in more than one module.
Administrator (*PGMR)
The contents of the Administrator module are: YADDHLPTBL YADDLLE YADDMLE YADDOLE YADDSCRM YBLDDBFLST YBLDDOC YBLDFMTLST YBLDLIBLST YBLDMBRLST YBLDOBJLST YCHGCMD YCHGJOBDLL YCPYMSGD YCRTDUPOBJ YCRTOBJ YCRTSRCPF YCVTAUTL YCVTBIN YCVTDBFLST YCVTDBR YCVTDDSCKY YCVTDDSIGC YCVTDEC YCVTPGMREF YCVTOBJLST YDSPHLP YDSPLIBLST YDSPMBRLST YDSPPGMQ YEDTCKYTBL YEDTDBFLST YEDTDTAARA YEDTFMTLST YEDTGDA YEDTLDA YEDTLIBLST YEDTMBRLST YEDTMSGD YGO YGRTPRDAUT YMOVOBJ YMOVLST YMOVM YRMVLLE YMOVOBJSRC YOPRLST YRNMLLE YRMVM YRNMLIBLST YRTVOBJLIB YRNMOBJSRC
E2
57BToolkit Modules
YCHGLIBL YCHGLIBLST YCHGLST YCHGOBJOWN YCHKLIBLST YCHKLSTE YCHKVN YCMPSRC YCPYF YCPYLIBLST YCPYLST
YCVTUSRPRF YDLTLIBLST YDLTLST YDLTOBJ YDOCDBFLST YDOCFMTLST YDOCLIBLST YDOCMBRLST YDOCOBJLST YDSPABR YDSPEXPDAT
YEXCDBFLST YEDTOBJLST YEXCCL YFLTDBFLST YEXCMBRLST YEXCOBJLST YFLTOBJLST YFLTFMTLST YFLTMBRLST YINXLST
YRTVMSGF YSETBRKPGM YSCNRPLSRC YSCNSRC YTRNPF YSTRDBG YTDYRPGSRC YWRKLIBLST YTRNSRCPF YWRKF
Documaker (*DOC)
The contents of the Documaker module are: YBLDDBFLST YBLDDOC YBLDFMTLST YBLDMBRLST YBLDOBJLST YCHKMNU YCHKVN YCMPSRC YCVTBIN YCVTDEC YCVTPRT YDOCAUT YDOCEXCREF YDOCDBFLST YDOCF YDOCFLDREF YDOCFMTLST YDOCMBRLST YDOCMNU YDOCMNUREF YDOCMSGREF YDOCOBJLST YDOCPGM YDOCPGMREF YDOCSRC YDSPABR YDSPEXPDAT YDSPHLP YEDTDTAARA YGO YGRTPRDAUT YINXLST YRTVMSGF YRTVOBJLIB YSTRCVTPRT YTDYRPGSRC
Menumaker (*USR)
The contents of the Menumaker module are:
E3
57BToolkit Modules
YADDHLPTBL YADDLLE YADDSNFM YBLDDBFLST YBLDFMTLST YBLDLIBLST YBLDMBRLST YBLDOBJLST YCHGJOBDLL YCHGLIBL YCHGLIBLST YCHGOBJOWN YCHGPWD YCHGUSRPRF
YCHKLIBLST YCHKMNU YCHKPWDVAL YCHKVN YCPYLIBLST YCPYMNU YCPYUSRPRF YCRTDSNF YCRTUSRPRF YCVTBIN YCVTDEC YDLTLIBLST YDLTMNU YDLTUSRPRF
YDOCAUT YDOCLIBLST YDOCMNU YDOCMNUREF YOCUSRPRF YDSPABR YDSPEXPDAT YDSPHLP YDSPLIBLST YDSPUSRPRF YEDTDTAARA YEDTLIBLST YEDTPWDVAL YGO
YGRTPRDAUT YINLPGM YINXLST YRMVLLE YRNMLIBLST YRNMLLE YRMNLIB YRNMLIBLST YRNMMNU YRNMUSRPRF YRTVOBJLIB YWRKLIBLST YWRKMNU YWRKUSRPRF
Designmaker (*DSN)
The contents of the Designmaker module are: YADDDSNFM YCHKMNU YCHKPNL YCHKRPT YCHKVN YCPYMNU YCPYPNL YCPYRPT YCRTDSNF YCRTPNLDDS YCRTRPTDDS YCVTBIN YCVTDEC YDFNPNLDSN YDLTMNU YDLTPNL YDLTRPT YDOCMNU YDOCMNUREF YDOCPNL YDOCRPT YDOCSRC YDSPABR YDSPHLP YDSPEXPDAT YDSPPNL YEDTDTAARA YEDTDSNDFT YGO YGRTPRDAUT YRNMPNL YRNMRPT YRTVOBJLIB YRTVPNLDSN YRTVRPTDSN YWRKMNU YWRKPNL YWRKRPT
E4
Index
*
*T title source directives help text, 2-58 *Y* Index comment source directives, 2-64 *YH label source directives, 2-64 *YI Index entry source directives EDTTXT for Help text, 2-63 manipulating help text, 2-57 member manipulation, C-5 menu manipulation, 2-28 panel design, 3-7 report designs, 3-28 source conversion, 4-64 source manipulation, 4-62 special display, 4-66 system documentation, 5-3, 5-4 YDSPHLP, 2-50, 2-56 compile pre-processor CMD source, 4-60 DDS source, 4-60 considerations for system documentation, 5-4 control programs, 2-76, 2-78 Create Panel Design DDS, 3-20
A
aids debugging, 4-4 documentation, 5-1 editing, 4-5 authorization cross reference documentation, 5-24
D
data areas, A-4 authority, C-4 database file descriptions, 7-5 database files, A-2 DDS source,source directives, 4-60 debugging, 4-4 design aids example, 3-4 introduction, 3-1 design files, authority, C-1 directives index, 2-63 index comment, 2-64 keys help vector, 2-61 label, 2-64 order of, 2-59 title, 2-59 vector table, 2-62 window format, 2-65 window format definition, 2-60
B
backup strategies, 7-2
C
CL commands, 7-5 CL source directives, 4-60 command prompter, 2-25 source directives, 4-60 commands CL, 7-5 copy message description, 4-62 design aids, 3-2 genetic manipulation, 4-4 list processing, 4-3 lists, 4-12
Index1
window size, 2-60 display files, B-2 display help text command (YDSPHLP), 2-49 display panel design utility, 3-16 documentation, 1-1 authorization cross reference, 5-24 execution cross reference, 5-16 field cross reference, 5-20 file cross reference, 5-12 message cross reference, 5-21 source directives, 5-10 source scan, 5-27 documentation aids overview, 5-3 documenting designs, 5-30 lists, 5-36 menus, 5-32 panel designs, 5-34 report designs, 5-35 Toolkit, 1-1 user profiles, 5-36 utilities, 5-35
files database, A-2 design, authority, C-1 display, B-2 message, A-3 print, B-1 filtering lists, 2-76
G
generic names,lists, 4-16
H
help text associating with HLL program, 2-50 associating with menu option, 2-50 attributes, 2-49 conditional, 2-54 contextual, 2-53 default source files, 2-51 displaying, 2-42, 2-49 displaying with YDSPHLP command, 2-50 documenting, 2-58 example display, 2-41 facilities, 2-4 in design, 3-4 indexing, 2-52 introduction, 2-40 naming documents, 2-50 requesting, 2-43 specifying directives, 2-58 storing, 2-42 styles of, 2-40 types of, 2-43 writing, 2-45 help,function keys, 2-44
E
exception message queue, 2-37 execute list errors, 4-20 function, 4-19 execution cross reference documentation, 5-16 expiry date, displaying, 7-1
F
facilities help text, 2-4 library list, 2-3 menu, 2-3 user profile, 2-4 field cross reference documentation, 5-20
I
i OS0 menus,using, 2-79 initial break message severity, 2-4 international character set considerations, 7-5
Index2
L
label groups, 2-55 libraries, A-1 library lists, 2-6 authority, C-4 changing, 2-8 changing individual entries, 2-13 changing of a job, 2-11 changing user profile, 2-12 checking, 2-9 contents, 2-7 copying, 2-9 creating, 2-8 deleting, 2-9 displaying, 2-9 editing, 2-10 facilities, 2-3 naming, 2-7 renaming, 2-9 renaming entries, 2-13 resolution, 2-52 retrieving, 2-11 selecting, 2-14 storing, 2-8 list facilities, 4-1 list processing, 4-2 commands, 4-3 lists authority, C-3 building from existing items, 4-8 building from named items, 4-9 changing the default, 4-12 concepts, 4-6 considerations, 4-6 controlling updating, 4-20 convert object, 4-25 creating, 4-8 database file and format, 4-9 documenting, 5-36 editing, 4-9 execute function, 4-19 filtering, 4-14 flag values, 4-23 flagging, 4-22 object and member, 4-10 output, 4-21
storing, 4-7 using, 4-18 working with entries, 4-10 working with objects, 4-11
M
member manipulation, authority, C-5 menu facilities, 2-3 menus as a design tool, 2-17 authority, C-1 command entry from, 2-32 comparing i OS and Toolkit, 2-16 concurrency, 2-37 debug functions, 2-33 direct calling, 2-30 displaying, 2-29 documenting, 2-28 editng, 2-23 features, 2-21 grouping by user, 2-32 help text, 2-23 help text for, 2-34 introducing, 2-15 manipulation commands, 2-28 naming, 2-20 numbering options, 2-23 option functions, 2-22 option types, 2-21 other uses for, 2-39 request functions, 2-34 security, 2-36 selecting, 2-28 signing off, 2-38 storing, 2-20 Toolkit description, 2-19 message files, A-3 messages cross reference documentation, 5-21 handling, 2-35
N
name masks, 4-16
Index3
lists, 4-16
R
report designs, 3-3 authority, C-2 components, 3-29 considerations, 3-27 defaults, 3-28 documenting, 5-35 generating DDS, 3-35 introduction, 3-27 manipulating, 3-34 naming, 3-29 presenting, 3-34 retrieving from DDS source, 3-40 selecting, 3-34 storing, 3-29 using default, 3-31 working with, 3-30 requirements backup, 7-2 storage, 7-2 system authorization, 7-1
O
object manipulation, authority, C-4 online help, 1-1
P
panel designs, 3-2, 3-6 authority, C-2 components, 3-10 documenting, 5-34 examples, 3-12 generating DDS, 3-19 manipulating, 3-18 printing, 3-15 retrieving from DDS source, 3-27 selecting, 3-18 using default, 3-11 working with utility, 3-12 passwords authority, C-3 changing, 2-84 checking new values, 2-83 editing control values, 2-82 expiry checking, 2-80 storing forbidden values, 2-83 validation, 2-79 validation program, 2-84 validation restrictions, 2-85 value checking, 2-82 print files, B-1 print key conversion, 5-28 print output, 7-5 programmer aids introduction, 4-1 programs, A-3 PUTOVR keyword, 3-25
S
screen design aid, 3-20 source directives, 5-10, D-1 source scan documentation, 5-27 system authorization requirements, 7-1 system documentation, 5-4 commands, 5-3
T
Toolkit concepts, 1-2 menu, 3-3 translation table, 4-65
U
ultilities,installing, 7-1
Index4
user access aids, 2-1 example, 2-5 linking components, 2-5 user profiles authority, C-6 changing, 2-73 considerations, 2-69 copying, 2-75 creating, 2-73 deleting, 2-74 documenting, 2-74, 5-36 extension attributes, 2-70, 2-75 facilities, 2-4 introduction, 2-68 renaming, 2-74 retrieving profiles, 2-74 security, 2-75 storing, 2-70 Toolkit initial program, 2-69 working with, 2-71 UPDLST parameter, 4-21
utilities,documenting, 5-35
V
vector table entries, 2-53
W
wild characters and name masks, 4-16 work with database file,example, 4-42 work with panel design image display, 3-13
Y
YCHGLIBL, 2-11 YWRKF toolkit command display connection map, 4-45
Index5