Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based.

Similar presentations


Presentation on theme: "1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based."— Presentation transcript:

1 1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based architecture: Library level Object level Member level PDM, which provides access to AS/400 functions through a standard list interface, lets you move easily from one level to the next.

2 2 Week # 4 Introduction to PDM (Continued) The PDM menu screen lists three levels of the AS/400 object hierarchy (libraries, objects, members) as menu choices, and you can move easily from one level to another. NOTE: Choice four, work with user-defined options, lets you define or change your own PDM options. Through PDM you can work with the three levels by selecting from predefined options, or you can define you own options (similar to macros).

3 3 Week # 4 Introduction to PDM (Continued) To start PDM, follow the menu path: From AS/400 Main menu, select option 5 to PROGRAM menu, then select option 2 to PDM menu OR Go directly to the PDM menu by typing STRPDM (Start PDM) command on any command line OR Use the appropriate “Work with” command

4 4 Week # 4 The STRPDM Command Work with Libraries Using PDM Screen: Choice 1, Work with libraries, results in an entry screen that asks for the name of the library/ libraries you want to work. Here you can request A list of user libraries, A list of libraries whose names all begin with, end with, or contain certain characters, or A list of all libraries in your library list by taking the first-time default *LIBL.

5 5 Week # 4 The STRPDM Command (Continued) Work with Libraries Using PDM Screen then displays library name, type, and text (if any) for each library. Each list item occupies an entire line of the display. Press F11 to reformat the list showing library names and types only (no text) in up to three columns. Press F23 for more options.

6 6 Week # 4 The STRPDM Command (Continued) Press F16 to see a display of IBM-supplied user- defined PDM options (which use letters). When you select an option, PDM invokes the appropriate CL command and supplies the required command parameters. NOTE: You can select the same option for multiple objects in the list, and PDM will repeat the necessary command automatically.

7 7 Week # 4 The STRPDM Command (Continued) To see the actual command that the specified option invokes, press F4 after typing the option number in the option field. The command prompt screen is displayed, and you can see that all parameters have been given values. All PDM options invoke commands, and when you type an option and request prompting, you see the prompt screen for the command that PDM is prepared to execute and you can see how list- item values have been inserted as command parameter values.

8 8 Week # 4 The STRPDM Command (Continued) From the PDM screen, press Enter and the system displays the Rename Libraries input screen. This is where you can supply new names for all the selected libraries at once. To change all prefixes, you can key over the prefix of the displayed library names, leaving the class designators as they are. You can select different options on different list items, and there the options are processed top to bottom and grouped where appropriate.

9 9 Week # 4 Work with Objects Using PDM To reach Work with Objects Using PDM screen from the PDM menu, select choice 2. (If you are already at a Work with Libraries Using PDM screen, select option 12, Work with, on one of the libraries in the list). This screen lists all objects in a single library and, in the three-column format, shows their type. Press F11 to change the screen format to get only a single column of objects displayed with attribute and text.

10 10 Week # 4 Work with Objects Using PDM (Continued) For *PGM type objects, the attribute indicates the language in which the program was written. A source physical file (attribute PF-SRC) holds source programs, file descriptions, etc. Names of IBM’s default source physical files begin with a Q and include the type of source the file is intended to store (users may also use a file name beginning with a Q). Most options displayed on the Work with Objects Using PDM screen are similar to those on Work with Libraries Using PDM screen.

11 11 Week # 4 Work with Objects Using PDM (Continued) Additional options available for working with objects include: 4 = Delete 11 = Move You can also use the Work with option (option 12) on a specified object from the Work with Objects Using PDM screen to get to a lower level “work-with” list. The nature of the list screen you see depends on the type and attribute of the object list item upon which you take the option.

12 12 Week # 4 Work with Members Using PDM A *FILE object (attribute PF, whether a source or database physical file) usually contains one or more data components called members. Taking the Work with option on such an object brings you to the lowest level of PDM, Work with Members Using PDM. Selecting option 12 on a source physical file results in a Work with Members Using PDM list of all its source members. This screen lets you create or change, print or delete a source member in the source physical file.

13 13 Week # 4 Work with Members Using PDM Screen In this screen’s upper left corner are the File and Library fields, reminding you which member list you are viewing. These fields are both input enabled, so you can change to the member list of another file and/or library by keying over the displayed value(s) and pressing Enter.

14 14 Week # 4 Work with Members Using PDM Screen (Continued) Options list for working with members is different from the options list for objects. No save/restore capability is available for individual members; however, option 9 saves the file of which the member is a part. For source physical files, an edit option (2) lets you change existing source-file members, and a print option (6) lets you create hard copy of the source code.

15 15 Week # 4 Creating Member via SEU To create a new member from the Work with Members Using PDM screen, use function key F6, which invokes the STRSEU (Start SEU) command and takes you to the command prompt screen for that command. The STRSEU screen shows that PDM supplied the first parameter’s values (source-file name and library name) based on the file and library information on the preceding Work with Members Using PDM screen.

16 16 Week # 4 Creating Member via SEU (Continued) From here, enter the name of the source program or file description you plan to create (usually the same name that you intend to use for the compiled program or file). The batch compile option on the Work with Members Using PDM screen will assign the member name to the newly created object by default. NOTE: For most parameters, it does not matter whether you use upper or lower case; except for quoted strings, SEU changes the values to upper case.

17 17 Week # 4 Creating Member via SEU (Continued) The value supplied for the Source type parameter is important: In addition to determining which source-language syntax checker and prompter is used, this value tells PDM which Create (CRTxxx) command to use when the source member is compiled. For file descriptions, the source type can be PF (physical file) LF (logical file) DSPF (display file)

18 18 Week # 4 Creating Member via SEU (Continued) The system stores the value you enter for the Text ‘description’ parameter as a quoted string; it is the only case-sensitive parameter value. Reminder: You do not need to enclose the text within the apostrophes (‘) -- the command prompter does that for you.

19 19 Week # 4 Creating Member via SEU (Continued) When you have the completed Start SEU screen, press Enter and the SEU Edit work screen appears. A message at the bottom of this screen tells you that the new member has been added to the source physical file (QDDSSRC, for example). The column of apostrophes at the left on the Edit work screen indicates that a screen full of lines has been inserted and that full-screen entry of DDS source code can begin.

20 20 Week # 4 Creating Member via SEU (Continued) NOTE: For fixed-format languages such as DDS, it is usually more productive to use prompting to insert one line at a time into the source member work space. When you use prompting, SEU provides a prompt area that identifies each entry field and indicates its length; when you fill out the prompt and press Enter, the values you entered are correctly formatted in the work area.

21 21 Week # 4 Creating Member via SEU (Continued) You can tell SEU which prompt format to use via a line command, or let SEU choose an appropriate format based on the Source type value entered on the Start SEU screen. You can also change the prompt format at any time during an edit session (which may be necessary when you are using a language such as RPG, which has several format types).

22 22 Week # 4 Creating Member via SEU (Continued) To use prompting to enter lines of source, first clear the work space by pressing the Enter key at the Edit work screen. The cleared screen’s first line identifies the range of columns currently displayed in the work area. F19 and F20 let you shift the work-area window left or right, respectively. The screen title identifies the SEU mode (e.g., Edit, Browse) and identifies the name of the library and source physical file.

23 23 Week # 4 Creating Member via SEU (Continued) On the second line is the SEU command line; the Source member is identified at the far right. On the third line is the current member format and format ruler indicating the field positions (the Beginning and End of data markers are on consecutive lines as nothing has been entered yet).

24 24 Week # 4 Creating Member via SEU (Continued) For help, press the Help key with the cursor on the SEU command line. The Help text tells you how to use the command line to perform tasks such as saving the source member and finding a certain value in an existing member. The find option can be useful, too. Pressing F2 while displaying context-sensitive Help calls extended Help. This screen contains several pages of general information about using SEU and about SEU line commands.

25 25 Week # 4 SEU Line Commands From the SEU Edit work screen, you can start insert mode by typing a line command in the sequence column of the Beginning of data line. The sequence column, a seven-position field for each line, is at the far left of the work screen. The sequence column has two purposes: to maintain line sequence numbers for all lines of a source member and to allow entry of SEU line commands. SEU line commands let you change the edit work area and manipulate source member lines; for example, you can move, copy, delete, add, or insert lines.

26 26 Week # 4 SEU Line Commands (Continued) When you enter the first SEU line command, ensure that the cursor is one line below and one position to the left of the F in FMT, in the sequence column of the Beginning of data line. (The cursor should already be in that position as a result of pressing Enter to clear the Edit work screen, as suggested earlier.) If the cursor is not in that position (the cursor will be on the first tab setting if tabs are turned on), you can press the Tab or back-tab key (Shift+Tab on PCs) repeatedly to move it to that position.

27 27 Week # 4 SEU Line Commands (Continued) If you are editing an existing source member, you can enter a line command over the sequence number of any existing record (line) of the member. In our example, to insert a line with prompting, you would enter the SEU line command IP (I for Insert and P for Prompting) on the Beginning of data line. The line command (before you press Enter) would look like that shown in Figure 5.19.

28 28 Week # 4 SEU Line Commands (Continued) In the example, the IP SEU Line Command to Insert with Prompting screen is shown. Press Enter and the screen (labeled “Prompt for DDS PF Type with Values Entered for a Record-Format Line”) splits to show a work area above and prompt lines below. This screen prompts for one line of DDS source code for a PF; eight entry fields are available. NOTE: All entry fields on the SEU prompt screen respond to the Help key.

29 29 Week # 4 SEU Line Commands (Continued) The minimal database-physical-file description contains a single record-format entry on the first line. Field-level entries, to describe each field, can follow. For a simple file description, each field-level entry also occupies one line in the editor work space and constitutes one record of the source member when saved.


Download ppt "1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based."

Similar presentations


Ads by Google