Introductory Reference to the IBM AS/400

Introduction to the AS/400

The IBM Application System/400 popularly known as AS/400 is a family of mid-range business computing systems, that supersedes IBM's highly successful System/3X family. The AS/400 is available in three different types the 9402, 9404, and the 9406. Currently, here at Minnesota State University, Mankato, the Computer Services is supporting a dual processor IBM AS/400 9406 model D80, that contains 192 Megabytes of primary memory and 7.1 Gigabytes of mirrored secondary storage. The AS/400 systems exclusively use the IBM Operating System/400 (OS/400). It is a multi user operating system that works with the Licensed Internal Code (LIC) instructions to implement the functions that are basic to the AS/400 architecture. OS/400 can perform tasks under direct control of both the user and an application program. The AS/400 system differs from the traditional systems in several ways. They offer more compatibility across the product line since only one operating system and architecture is used consistently across the entire family. The system offers very high performance compared to the earlier System/3X computers. This is achieved by a combination of faster processors, extended storage and improved fixed disk systems. The software architecture is different from that of more traditional systems. Implementing functions such as security, database and communications in microcode, and providing a one-piece operating system resulted in improved efficiency, consistency and simplicity.

Now, to take a look into the highlights of the system
AS/400's standard functions plus the many communications options and supporting software provide users with flexibility for various communications environments. The AS/400 application programming interface provides some new capabilities not found in earlier operating systems. The basic architecture of AS/400 systems makes for a very productive program development environment. The built-in database and single-level storage provide high-level structures and consistency. This along with the programming tools available for AS/400 can increase programmer productivity. The programmer has the flexibility to choose one of the following programming languages for their application programs:
y

BASIC

y y y y y y y y

C CL command language COBOL X3.23-1974 & X3.23-1985 FORTRAN Pascal PL/I REXX RPG II & III

The AS/400 marks a new beginning in the business computing world. This new generation of systems with advanced technology and advanced applications serve as a growth platform for the customer to expand in application, size and network complexity.

Signing On to the AS/400
PC Support/400
y y y y y y

Reboot the PC by pressing <Ctrl><Alt><Delete>at the same time. Press this key combination twice. Select the option that indicates PC Support and/or AS/400. Answer "Enter common user ID:" with your username Answer "Enter password for common user ID:" with your password. If there is a beep or a message press <Enter>to bypass the message. At this point you should have the following screen:
Sign On System . . . . . : MKTAS400 Subsystem . . . . : QINTER Display . . . . . : PCnnnnS1 User . . . . . . . Password . . . . . Program/procedure. Menu . . . . . . . Current library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . __________ __________ __________ __________

y y y y

Type your username in the "User" blank. Press the <Tab>key. Type your password. The password will not be displayed. Press the <Enter>key.

If for some reason you can not longer type, press the <Reset>key. On the Microterms or PCVT this would be the <Esc>key then R. On PC Support/400 this would be the left <Ctrl>key. If this is the first time you signed on continue with the Changing your password section of this manual.

Changing Your Password
The first time you log on the AS/400 you will be forced to change your password before continuing.
y y

y y

y y

y y y

Press <Enter>to change your password. At the "Current Password" field, type `xx' followed by the last six digits of your social security number (ie. xx999999) NOTE: nothing you type on this screen will be displayed to ensure that no one views your password as you type it. Press <Tab>or <Field Exit>. For the "New Password" field, type the password you would like to use when you sign on to the computer. It must not exceed 10 characters, it must begin with a alphabetic character and the remaining characters may be any combination of alphabetic, numeric characters. Note: Try not to make it too difficult, you will need to know it to sign on the AS/400 again. Press <Tab>or <Field Exit> At the "New Password (to verify)" field, type in your new password for a second time to make sure you have entered it correctly. If you have entered it incorrectly you will get an error message and your initial password will still be `xx' followed by the last four digits of your social security number. Press <Enter> Upon completion, the following message will be displayed: Password changed successfully Read the following screens, pressing <Enter>to exit each one, until you reach the AS/400 Main Menu screen.

Later on when you want to change your password, type CHGPWD on the command line and go through the same steps.

Signing Off of the AS/400
y y

Press <F3>until you see a command prompt, ===>. At the command prompt type SIGNOFF.

Getting Online Help
AS/400 provides extensive On-line help, and a simple method of accessing the help information. On-line help information is provided for all system displays. The type of help provided depends on the location of the cursor. For all displays, the following information is provided:
y y y y y

What the display is used for How to use the display How to use the command line if there is one How to use the entry fields and parameter line if any What function keys are active and what they do.

If the <Help>key is pressed when the cursor is in an area where specific on-line help information is available, the help text for that area of the display is shown. If the <Help>key is pressed when the cursor is in an area for which no specific information is available, information for the entire display is shown. Then you can page forward or backward through the information for the entire display and for each area. If the <Help>key is pressed while a help display is shown, a description of the types of help that are available on the displays, and how to get each type of help is shown. The <Help>key on the PC Support stations is labeled <Scroll Lock>. On the VT -100 or PCVT stations the key sequence for < Help>is <ESC>h. If <F11>=Search index is shown at the bottom of the display, you can press <F11>to see the Search Help Index display. On that display, you can request information about any topic you specify.

STRSCHIDX
The start search index command is used when you would like to get help on a specific or general topic. To use the index search facility type STRSCHIDX and hit <Return>. Type your subject topic, or topics on the bottom subject line. When you hit <Return>again your topic will be searched for and the topics found will be displayed on the screen above the topic line. To display the information you are looking for type 5 in the option field by the topic line press <Return>. To get out of the index search facility press <F3>until exited.

CD-ROM Manuals
If you are attached to the AS/400 using PC Support/400 you have the ability to look at a hypertext version of a subset of the complete AS/400 manual set. To start the hypertext book reader type the command MANUALS at any AS/400 prompt. This guide is laid out like a library. The library contains bookshelves. These bookshelves contain books. For example our library contains a bookshelf name Languages. We select the bookshelf by using the arrow keys to place the highlighted cursor over it and press <Enter>. On this bookshelf there are several books on languages. One of the books is titled "COBOL/400 Reference". Once again we use the arrows and cursor to select the item. Now that we have the book it opens up a "Table of Contents" for the book. By using this search and select procedure you can look through the book like a book you'd check out at the library.

More Help
There are three ways to get help on the READ/DOS book reader (AS/400 command MANUALS):
y y y

Start the book reader and select the bookshelf entitled BookManager READ/DOS. Press <F1>anywhere you're in question about your current options. Press <Alt>h (or <F10>h) and select the appropriate help selection for your current problem.

Using the Prompt Facility
AS/400 provides interactive command prompting for any command supplied with the system or created by the user. On the command entry screen notice the option F4 = Prompt at the bottom of the screen. You can type the command name only, and press <F4>to see the prompt display for the command. Usually, a command may require many parameters before it can be executed. The prompt displays provide a convenient method of supplying that parameter information. For example, type SNDMSG on any command line and press <F4>. The following prompt display is shown:
Send Message (SNDMSG) Type choices, press Enter. Message text . . . . . . . . . . ________________________________________ __________________________________________________________________________ __________________________________________________________________________ _______________________ ___________________________________________________ __________________________________ To user profile . . . . . . . . . __________ Name , *SYSOPR, *ALLACT...

F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=cancel F13=How to use this display F24=More keys

To execute the command, supply the required information for Message text and user profile and press <Enter>. Most of the parameters used on commands have default values that are used if no other value is specified. You may change the default values if you desire to do so. If <F4>= Prompt is shown on the prompt display, you can press < F4>to request a list of predefined values (such as *SYSOPR and *ALLACT in the above display) that are permitted in the field where the cursor is currently positioned. In relation to the SNDMSG command, you can use DSPMSG at any time to display messages in your message queue.

Organization of OS/400 Objects
Objects
On the AS/400, everything that can be stored or retrieved is stored in an object. Examples of objects are libraries, files, executable programs, queues, and more. Objects share some common attributes such as name, type, size, description, date created, and owner. The concept of an object allows the system to perform certain standard operations, such as authorization management, on all objects types. The object types that we will be primarily concerned with in this manual are:
y

*LIB Libraries

System supplied libraries NOTE:all IBM-supplied library names begin with the letter "Q" or "#" 3. for example an employee master file. logical files. The CRTSRCPF command creates a physical file with attributes appropriate for source physical files. A data physical file (*FILE PF-DTA) contains data that cannot be compiled. A source physical file is actually a special type of data physical file. QSYS . which "contains" all libraries on the system). A library is an object. A source physical file has the attribute "PFSRC". of type *FILE. 6 for the sequence number field. In this manual. There are basically three general categories of libraries: 1. device data. An interesting implication of the non-hierarchical nature of libraries is that two users cannot have libraries with the same name. A data physical file normally has a record format. the default record length is 92 (80 for the source data field. that contains data in the form of a database. unlike these systems. source physical files. This description is then compiled to produce a *FILE object with attribute PF-DTA. that contains a group of objects. and 6 for the date field. 2. There are two types of database files: 1. of type *LIB. However. A source physical file (*FILE PF-SRC) contains source statements. In conventional terms. This record format is defined using Data Description Specifications (DDS is a language that is used to describe database files to the system). for example the source statements of a Pascal or COBOL program. Refer to the section on the SEU editor for the meanings of these fields. data physical files 2. physical files 2. MS-DOS. the system master library. In this manual. It is usually created using the "Create Source Physical File" (CRTSRCPF) command (more information about this command will be given later). User-created libraries.the library that contains all other libraries.) . we are primarily concerned with database files. Files A file is an object. a data physical file is a data file. and VAX/VMS. A physical file contains actual data stored on the system. such as an input file to a program. a library cannot "contain" other libraries (with the exception of QSYS. we are primarily interested in two kinds of physical files: 1. For example. or a group of related records that are handled as a unit. It has a fixed-length record format.y y y *FILE Files *PGM Compiled programs *OUTQ Output queues Libraries Every object is contained in a library. It is similar to the "root" or top-level directory on Unix.

__________ Type options. the member's name is the . for example. and allows compilation to be totally automatic. determines how the various systems programs (such as the editor and compilers) on the AS/400 treat the member. it "knows" that it should invoke the COBOL compiler. "DDSSRC". SRCFILE___ YOURLIB___ Position to . Although. . In a PF-SRC file. each member contains source statements for a program or DDS source. press Enter. which in the case of PF-SRC members. However. in the above example. a PF-DTA file will only have one member (by default. the member(s) contains data for use by programs. . you will probably want to store source programs of the same type in a separate source physical file. .. A data physical file may contain one or more members. Normally. . . This attribute is specified when creating the member. In a data physical file (PF-DTA).The data records in a data physical file can be grouped into members. you may want to keep all your RPG source programs in a PF-SRC file called. a member has been specified as having an attribute of CBL (for COBOL program. . . for example. Library . . SEU. will format the program as a COBOL program. This implies that all members of an object share the same basic characteristics with the other members in the object such as ownership and security. you may choose to include source members of different types belonging to the same application in the same PF-SRC file. and when PDM (Program Development Manager) is given the instruction to compile the file.. You may also use the standard IBM-supplied names such as "QRPGSRC". Once. for example. as in the above example. and it is contained in the library YOURLIB. . Members have an attribute associated with them.) the AS/400 editor. . source members of different types are stored in the same source physical file. For example. These members are not objects themselves but subsets of an object. An example of a PF SRC file and its members is shown below (we will explain how to get to this screen in the section on PDM): Work with Members Using PDM File . . "RPGSRC" and DDS source in a PFSRC file called. and "QCLSRC" for the various PF-SRC files. 2=Edit 7=Rename Opt __ __ __ __ __ Member NAMEEMP CLPRO G RPGPROG EMPMAST SCRNMBR 3=Copy 4=Delete 8=Display description Type LF CLP RPG PF DSPF Text Sample Sample Sample Sample Sample 5=Display 9=Save 6=Print 13=Change text . "QDDSSRC". DDS Source for a Logical File Control Language Source Program RPG Source Program DDS Source for a Physical File DDS Source for a Display File Parameters or command ===> ___________________________________________________________ F3=Exit F9=Retrieve F4=Prompt F10=Command entry F5=Refresh F23=More options F6=Create F24=More keys The name of the source physical file is SRCFILE.

One way of defining and creating a display file is with the Screen Design Aid (SDA) utility. A display file describes what information is to be displayed and where it is to be displayed on the screen of a display station. In this way. a *FILE object with the attribute LF-DTA is produced. For instance.same as the file name). When this source member is compiled (using CRTPF or option 14 in the "Work with Members using PDM" screen). This compiled object is the actual file that is used to hold data records. the difference between "source" and "data" in regards to data physical files. The name of the output queue is normally the same as that of your user profile. When the DDS source is compiled. For example. In the "Work with Members using PDM" screen above. at this point. A device file contains a description how data is to be presented to a program from a device or vice versa. A spooled files. the "PF" member. Other Object Types A program object (*PGM) is a compiled program. Another *FILE object type that you may encounter in your programming courses is the device file. it will produce a *FILE object with attribute PF-DTA. The spooled file stays in the output queue until it is directed to a printer or removed. it produces an object with a type of *PGM with the attribute CBL. but provides a different method of viewing the data of an accompyning data physical file(s) which it internally references. each month's data can be processed separately by processing one member at a time. It is important to understand. A printer file can be created using the "Create Printer File" (CRTPRTF) command. it is possible to include multiple members in a single PFDTA file. contains DDS source that defines a physical file. is not an object itself but a subset of an object. like a member. "EMPMAST". An output queue has already been created for you with the creation of your user profile. It is similar to the concept of a "view" in SQL. when a COBOL source program is compiled. whenever something is printed. On the AS/400. you may want to group the records in a sales transactions file so that each member contains data for each month. The relationships between the various objects that have been discussed in this section are as follows: QSYS (*LIB) [special library] | | contains | Library (*LIB) | . A data logical file is described to the system using DDS. the output goes to an output queue and it stays there as a spooled file. The attribute for a *PGM object indicates the language the program was written in. Two common types of device files are printer files (*FILE PRTF) and display files (*FILE DSPF). such as the length and width of a printed page. Refer to the section "Printing Procedure" in this manual for more information on printing spooled files. A printer file describes the attributes that printed output will have. An important object type on the AS/400 is the output queue (*OUTQ). However. A data logical file (*FILE LF-DTA) is a data file that contains no actual data.

. the library that has the same name as that as your user profile. press Enter. . . . to store all your application objects. . . we will create another library and use this library as an example throughout the manual. . Type in the name of the library and enter a brief description for the library. .+----^----------------. . Member(s) | | [Reorginized data] Source Data Physical Physical File File (PF-SRC) (PF -DTA) | | contains | | contains | | Member(s) Member(s) [Program source] [Actual Data] Creating a Library A library has already been created for during user profile creation. Leave the library type as *PROD (a production library is one that is used for normal processing). i. Create Library (CRTLIB) Type choices. . | | | | Programs (*PGM) Outqueues (*OUTQ) Files (*FILE) Other [Executable] | | objects | contains | Spooled Files | [Output intended for Printer] | | .^--. Library . . | | Physical Data Logical file file (PF) (LF -DTA) | ^ contains . *TEST Sample_Library__________________ F10=Additional parameters F24=More keys F12=Cancel . . . . . Text 'descrip tion' . type the CRTLIB ("Create Library") on a command line and press <F4>to prompt on it. . .------^-----. To create a library. .e.-----------------. F3=Exit F4=Prompt F5=Refresh F13=How to use this display YOURLIB__ Name *PROD____ *PROD.. Note that you can use your default library.---------------. . The name of this library is normally the same as that of your user profile. .--------. In this section. . . .| contains | . . . . Library type .

. press Enter.. It specifies which libraries are to be searched and the order in which they are searched when the system looks for an object. .. already exists". Record length . that is the library that has the same name as that as your user profile. . Your default library. . If you get this message. is automatically included in your library list. Library . . *FILE Sample_Source_File___________________ F10=Additional parameters F24=More keys F12=Cancel F3=Exit F4=Prompt F5=Refresh F13=How to use this display Library Lists You may have noticed in the previous screen that the "Library" field defaults to the value *CURLIB. . . . . Creating a Source Physical File Now. . . meaning the current library. we first explain what a library list is. .. . we show the display for creating a source file called "SRCFILE" in the library "YOURLIB".. To create a source physical file. You can display your library list by typing DSPLIBL and press <Enter> on a command line. . Note: All libraries are on the same "level" with only QSYS above them. . type CRTSRCPF and press <F4> to prompt on it.Press <Enter>. You should see a message at the bottom of the screen saying "Library . created in library . .. Other commands that operate on libraries are: y y y DSPLIB (Display Library) DLTLIB (Delete Library) WRKLIB (Work with Library). Press < Enter> and you should see the message "File .. if desired Text 'description' . . Before we discuss what the current library is. . *NONE. If you see the message "Library ." at the bottom of your screen. try another name for the library. . . . . Member. . SRCFILE___ Name YOURLIB___ Name. The following is the library list for the user "JOHNDOE". . . . . .. . . . . . it means that some other user already has a library by the same name. Below. Supply the names for the source file and the library that will hold it. *CURLIB 92_______ Number *NONE_____ Name. . . . . The current library is tied closely to the concept of a library list. A default library list is automatically created by OS/400 for each job started by a user. created". . . File . A library list is identified by the value *LIBL. let's create a source physical file in the library that we have just created.. . . . . Display Library List System: MKTAS400 . Create Source Physical File (CRTSRCPF) Type choices. A library list is similar in concept to the "PATH" in Unix and MS-DOS. .

the current library. the libraries in the library list are searched for the object (starting with the system libraries. the program can now be located and executed since the library that contains the program is now in the library list. type the "Add Library List Entry" (ADDLIBLE) command. COLLECTION .. and QGDDM come with the system while others are locally supplied. If a user does not specify a library name when requesting an operation on an object. If. pre ss Enter. such as QTEMP. For example.created by SQL F3=Exit F12=Cancel F17=Top F18=Bottom Note that you may not have all the libraries in the above list. QGPL. You can edit your library list using the EDTLIBL command and remove a library list entry using . This is because "YOURLIB" is currently not in the library list. the user can create their own libraries and add them to their library list. A message will appear stating that the program is not found in the library list. and the user libraries).Type options. followed by the library name (or prompt on the command) ADDLIBLE YOURLIB . assume that the user "JOHNDOE" has an executable program (*PGM object) called "TESTPROG" in the library "YOURLIB". 5=Display objects in library Opt __ __ __ __ __ __ __ __ __ __ __ Library QSYS QHLPSYS QUSRSYS JOHNDOE QTEMP QGDDM QGPL QMSU QPAS MBNLQ ONLINE Type SYS SYS SYS CUR USR USR USR USR USR USR USR Text System Library *IN USE JOHN DOE's default library GENERAL PURPOSE LIBRARY MSU generated commands and programs Common Library for MBNLQ . a library list is divided into three parts: system portion which consists of the libraries that are required to run system functions current library which by default. User "JOHNDOE" wants to run the program (using the CALL command) and issues the command CALL TESTPROG . is the library that has the same name as your user profile (in this case. "TESTPROG" is qualified by "YOURLIB" as CALL YOURLIB/TESTPROG then the program can be found and executed. The current library is the first user library that is searched before the rest of the user libraries in the list. the library "JOHNDOE"). As you can see. In addition. If "JOHNDOE" now issues the the unqualified CALL command. however. user portion which consists of libraries that holds user objects. Some user libraries. To add a library to the library list.

attribute..) or using one of three commands which indicate the level at which the user would like to work: y y y WRKLIBPDM -. In the section "Steps in Developing a Program". . . . These may be replaced with the name of a specific library. *CURLIB name. . Work with Objects Using PDM (WRKOBJPDM) Type choices. *PRV. . . It automates file and member creation. no longer the current library. The . . editing. . Library . when "JOHNDOE" signs on. or members. . Using the Program Development Manager (PDM) The Program Development Manager (PDM) is a set of utilities under OS/400 designed to simplify the creation and development of software.Work with objects using PDM WRKMBRPDM -. .. .. . F3=Exit F4=Prompt F24=More keys F5=Refresh F12=Cancel F13=How to use this display The *PRV value on the "Library" field indicates that the default is to work on the library the user last worked with. and allows the programmer to manage their environment from a set of standard menus. ..the RMVLIBLE command. Object type . *ALRTBL. that both commands (ADDLIBLE and CHGCURLIB) are only effective for a particular session. . . . Type WRKOBJPDM and press <F4> to prompt on it. This allows the user to work with objects inside a library. *PRV. . . . . . objects. . . . Object attribute . *generic. Object .. Some commands automatically default to the current library (*CURLIB). *PRV. such as the CRTSRCPF command. . Starting PDM PDM may either be started using the command STRPDM (for Start PDM. *ALL. . . . . . *AUTL. name. however.Work with file members using PDM Work with Objects One of the most commonly used commands to start PDM is WRKOBJPDM. . press Enter. *PRV______ *ALL______ *ALL______ *ALL______ *PRV.Work with libraries using PDM WRKOBJPDM -. *generic. . . . . .) which will produce a menu of options for the level on which the user wishes to work (libraries. we will create an "initial program" that will automatically run these commands when a user signs on the system. . . "YOURLIB" will no longer be in their library list and hence. . compilation and program execution. Next time. Note. "YOURLIB" can be made the current library by typing CHGCURLIB YOURLIB .

This method of specifying actions on a form listing the objects available is consistent throughout PDM. YOURLIB___ *ALL______ *ALL______ *ALL______ *PRV. . Work with Objects Using PDM (WRKOBJPDM) Type choices. . . . . . Object type . . YOURLIB___ Position to . . . . *generic. . . . there should be just one object in the library. *PRV.. . .. attribute. .. . . . . with the library specified as YOURLIB. . .) Each option is an action which may be performed on an object by placing its number on the "Opt" line next to the object and pressing the < Enter> key. . . press Enter. *PRV. ."Object" and "Object type" options allow the user to limit which objects will be displayed. . . . *ALL. . . *ALRTBL. . . *AUTL. . Type options. press Enter. PDM Options Options are displayed across the top of the screen (for a list of all the options available in PDM. . and *ALL on the other options.. F3=Exit F4=Prompt F24=More ke ys F5=Refresh F12=Cancel F13=How to use this display The screen resulting from command WRKOBJPDM. is shown below. name. . . *CURLIB na me. . . *PRV. . 2=Change 3=Copy 8=Display description Opt __ Object SRCFILE Type *FILE Text Sample Source File Bottom Parameters or command ===> ________________________________________________________________ F3=Exit F9=Retrieve F4=Prompt F10=Command entry F5=Refresh F23=More options F6=Create F24=More keys Presently. Type WRKOBJPDM and prompt with <F4>. Work with Objects Using PDM Library . .. Object attribute .. Library . . . . . . Object . .. the source physical file "SRCFILE" that you have just created. . . . see Table 1 at the end of this section. __________ Position to type . __________ 4=Delete 9=Save Attribute PF -SRC 5=Display 10=Restore 7=Rename 11=Move . . . *generic*. .

Multiple objects may be operated on sequentially by placing numbers on more than one Opt line.There are two important special features which this method of specifying actions offers: First. the options support the prompting facility. and second.) option. remember that the prompting facility may be invoked on any PDM option. the action of this option depends on the file type. change its attributes. 2=Edit 7=Rename Opt Member 3=Copy 4=Delete 8=Display description Type Text 5=Display 6=Print 9=Save 13=C hange text . File Position to . . SRCFILE___ Library . The following "Work with Members using PDM" screen appears: Work with Members Using PDM . pressing <Enter> or <F12> (cancel) with no options on the screen returns to the previous level. . . . . assume we have two source files in "YOURLIB". Work with Members The WRKMBRPDM display is the bottom level of PDM. allowing the user to work with spooled files. the "18" option may be invoked to modify the file using DFU (Data File Utility). go to the "Work With Output Queue" display. . Pressing <Enter> causes PDM to process each option in turn. the "2=change" option is no longer valid. To use the prompting facility. . However. multiple objects may be operated on in succession. PDM will present the prompt screen for the command associated with that option number. YOURLIB___ __________ Type options. Type "12" against "SRCFILE" to work with it. . . When working with a source physical file at this level.. for instance the *DEBUG option to include debugging information in the program.) If the item is of type *OUTQ.) When this method of changing levels is used. present a display allowing the user to call the program. option 2 runs the STRSEU command to begin editing a member and 14 calls the compiler for a program of that type (if specific compiler options are needed.. . For example. go to the WRKMBRPDM display for that file (there are different types of WRKMBRPDM displays for source and data files. Placing a 12 on the line next to an item on this display will: y y y If the item is of type *FILE. More on PDM levels Moving down levels in PDM is accomplished using the "12" (Work With. At the WRKOBJPDM screen.) When working with a physical data file. (programs may also be called from the WRKOBJPDM screen by using the 16 option. press Enter.. simply press <F4> while an option number is on one of the "Opt" lines. .. . If the item is of type *PGM. etc. You can type "5" (Display) against one and type "7" (Rename) against the other.

> SRCFILE___ Library .. . . . TXT_______ C. . . press Enter. name *PRV. *PRV *PRV. . . . File . BAS. . name. . . . type. On return to the WRKMBRPDM screen. enter the names of the library and file as shown below.. *CURLIB *PRV. . . The "Work with Members using PDM" screen can be accessed directly using the WRKMBRPDM command. This will automatically invoke the SEU editor. . you will notice that "SRCMBR" is now in "SRCFILE". . . . . . Let's create a member. .. . . .. Name. Source file . . . . . . *CURLIB. . > YOURLIB___ Source member . . . *PRV *LIBL. . If you have many members in your file. . . . enter "TXT" (i. . . . . in the section on SEU we will use this source member. Start Source Entry Utility (STRSEU) Type choices. *LIBL.(No members in file) Parameters or command ===> ________________________________________________________________ F3=Exit F9=Retrieve F4=Prompt F10=Command entry F5=Refresh F23=More options F6=Create F24=More keys Presently. Name. . . . .. . Member . the source member will contain only plain text). . . . For now. Later on. . Library . press Enter. . Text 'description' . . *PRV. . . . . . Enter the name of the new source member and for its source type. . . . name. . *SELECT *SAME. Work with Members Using PDM (WRKMBRPDM) Type choices. press <F3> to quit and type "Y" in the "Change/Create member" field to save the source member. Sample_Source_Member____________________ Name. Bottom F3=Exit F4=Prompt F24=More keys F5=Refresh F12=Cancel F13=How to use this display You will now be inside the SEU editor. . . To do that. . Member type . .e. BASP. . . To work with the member that we have just created. . . . . . . there are no members in "SRCFILE". Type this command and press <F4> to prompt on it. . you can use the "Member" and/or "Member Type" fields to narrow down the number of members to work with. . Press <Enter> . . SRCMBR____ Source type . . . SRCFILE___ YOURLIB___ *ALL______ *ALL______ *PRV. *generic. . . . . . . . . *generic. Name. . . press <F6> (Create)..

Save Restore Move Work With Change Text Compile Copy File Run Change Using SDA Change Using DFU Find String Modify an obj ect or edit a source member Duplicate an object Remove an object from storage Display the contents of an object Copy a source member to an output queue Change an object's name Show summary information about an object Save an object to offline storage Retrieve an object from offline storage Move an object to another library Perform operations on the contents of an object Change the text description line for an object Compile a source physical file member Copy a *FILE object (has special options) Run an object of type *PGM Change a screen design (in a PF -SRC) using SDA Use DFU to change a PF -DTA member Find a s tring of characters in an object Table 2: Function Keys in PDM F1: F3: F4: F5: F6: F9: F10: F11: F12: F13: F14: F15: F16: F17: F18: F21: F23: F24: Help Exit Prompt Refresh Create Retrieve Command Entry Display Toggle Cancel Repeat Source Type Toggle Sort User Options Subset Change Defaults Print List More Options More Keys Obtain help on an area of PDM Exit PDM or current operation Display prompt screen for options on screen Redraw the screen with updated information Create a library. file. if available Display more function keys. Table 1: Options in PDM (Some options may not be valid at some levels. the WRKLIBPDM command lets you work with a library or libraries. You can work with the contents of a library by typing 12 against it.F3=Exit F4=Prompt F24=More keys F5=Refresh F12=Cancel F13=How to use this display Work with Libraries Briefly. This will bring up the "Work with Objects using PDM" screen for that library.) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 25: Change Copy Delete Display Print Rename Display Descrip. if available Control Language Command Syntax . or member Recall a previous command to the command line Display an OS/400 command entry screen Switch to/from brief display mode Cancel an operation Copy an option number to all lines Switch between date and type display in PF -SRC Cha nge member list sort criteria Specify user -defined commands to PDM Limit the list on the screen to certain types Change PDM user settings Print the object list on the screen Display more PDM option numbers. You will probably use this command least among the three PDM commands.

Send o STR .Display item o END . one.Grant o MOV .Add Library List Entry CL commands can be found in several ways. Another way of finding commands is to press <F4> on any command line.Change o CPY . This will bring up the "Command Grouping Menu" where each option represents a group of related commands.g. SLTCMD CR* will list all commands starting with CR). or more parameters. a CL command is a way of of invoking functions and calling system services. The first option SLTCMD ("Select Command by Name") can be used to obtain a list of commands using a wildcard character (e.Add Item o CHG . A command is made made up of two components: 1. Parameters A CL command can have zero.Start PDM ADDLIBLE . A command may have some parameters that are required and some that are optional.Work with Objects Using PDM STRPDM .Create o DLT .Start (a program or utility) o WRK . Command Structure First. The command GO CMDxxx can be used to get a menu of commands related to xxx (where xxx can be a verb or subject).Move o RMV .Delete o DSP .Work with The subject component of the command specifies the item that the verb acts on.Retrieve o RVK . The verb consists of three characters and is the "action" component of the command.Set o SND . a SUBJECT.Restore o RTV .Create Source Physical File WRKOBJPDM .The purpose of this section is to provide a more formal presentation of CL commands. a VERB and 2. Some examples of verb/subject combinations are: y y y y CRTSRCPF .Remove item o RST . Some common verbs and their meanings are shown below: o ADD .Revoke o SET . As you would probably know by now. A system-defined default value . A CL command is made up of two parts: (1) a command name and (2) parameters.Copy o CRT .Stop a program which was started with a STR o GRT . let's consider the command name.

we have been using the <F4> prompt facility for specifying parameters. Note that the "Member" parameter. parameters are specified without keywords. is omitted. the file name and library name fields are actually one parameter (a file name plus a library qualifier). Using this method. A CL command can use a combination of both positional and keyword parameters. For example. the file name must be qualified with a slash. the following command will display all objects of type *FILE in the library YOURLIB. Positional parameters are often limited to the first three or four parameters.(prefixed by "*") is usually assigned to an optional parameter if the user does not specify a value for it. The above example can be specified in positional form as follows WRKOBJPDM YOURLIB SRCFILE . "/". can be entered in the position of that parameter. The parameter values must be positionally matched with the keywords in the parameter set for that command. a combination of both. Using the SEU Editor Introduction The IBM AS/400 provides an integrated set of Application Development Tools (ADT) to design. as in the following statement WRKMBRPDM SRCFILE the library qualifier will default to the library list (*LIBL). the system-defined value. In the positional form. WRKOBJPDM LIB(YOURLIB) OBJ(SRCFILE) There must not be any blanks between the keyword and the left parenthesis. You may want to use this method if you remember exactly what parameter information is needed for a command. the following is invalid WRKOBJPDM LIB(YOURLIB) SRCFILE . So far in this manual. 2. Another way of specifying parameters is the free format or command line method. WRKOBJPDM YOURLIB *N *FILE *N will map to the default value for that parameter. *N. One such tool is the Programming Development Manager (PDM) that offers the following: . If the reference is to a file in a specific library. parameters can be specified in: 1. keyword form. Note that when using the WRKMBRPDM command. which is in between the second and third parameters in the parameter set. which in this case is *ALL. develop and maintain applications. For example. For example. character in both keyword and positional forms WRKMBRPDM YOURLIB/SRCFILE SRCMBRWRKMBRPDM FILE(YOURLIB/SRCFILE) MBR(SRCMBR) If only the file name is specified. for example WRKMBRPDM YOURLIB/SRCFI LE MBRTYPE(TXT) . or 3. A parameter that is specified in keyword form will have a keyword followed immediately by a value (or list of values). Parameters in keyword form can be specified in any order. positional form. If you do not want to specify a value for one of the parameters. One restriction of this mixed form of specifying parameters is that positional parameters cannot follow keyword parameters.

1 ..... In this SEU tutorial.....+. ..+... In either case....+. 4 .. List-oriented selection of items for development or maintenance... 5. 6 .. The "Work with members" screen shows up.+.+.... Type 2 on the "Opt" line to edit the source member "SRCMBR". 3 .+. .+.+. . Choose option 3 to Work with members. Another tool is the Source Entry Utility (SEU) that offers a full screen editor providing syntax checking of source statements..+......+.. Columns ..+.: 1 80 SEU==> _______________________________________________________ FMT ** Edit SRCMBR . . supply the necessary source file (SRCFILE) and library (YOURLIB) information and press Enter... . You are now in the full-screen EDIT mode. 3 . *************** Beginning of data ********************************* ****************** End of data ************************************ F3=Exit F10=Top F4=Prompt F11=Bottom F5=Refresh F24=More keys ... Extendable interface to tools through user-defined options.: 1 80 SEU==>_______________________________________________________ FMT ** ''''''' ''''''' ''''''' ''''''' ''''''' ''''''' ''''''' ****************** End of data *********** ************************ F3=Exit F10=Top F4=Prompt F11=Bottom F5=Refresh F24=More keys Edit SRCMBR .y y y Integrated application development environment.. Press <Enter> .... 2 . and press <Enter> . the screen readjusts as shown: Columns .+.... Starting the Editor Type STRPDM (Start Program Development Manager) on any command line.+. . *************** Beginning of data ******************************** If you press <Enter> without typing anything.. The PDM menu is displayed.+... 4 . we will use the source member we created in the previous section.. 2 ... 6 .. PDM is one tool that may be used to access the SEU.. 5.. 1 ... You can also reach this screen by typing WRKMBRPDM (Work with members using PDM) on any command line and pressing <F4> ..

00 Text for second block .+.. 5... .00 End First Block.. Below.. 2 .: 1 80 Edit SRCMBR SEU==> ____________ _____________________________________________ FMT ** .00 ****************** End of data ************************************ Notice the sequence numbers of records at the extreme left..+.. 0010. 0009.. N=No .+.. 6 . Y Y=Yes.. 3 ...00 Begin First Block..+. 4 ..+.+.. For more information on line commands see 'Using SEU line commands'. 0008. .+.... 1 . .....Type I (for insert) on the first line as shown and press <Enter> . 0005. ... ...... .. To save the current member and exit SEU follow the following procedure 'Exiting the Editor.. 2 .+. 6 . you may start typing in the desired text... 1 .00 End Second Blo ck.. . .. 4 . . 3 .. *************** Beginning of data ********************************* 0001.....+.. The exit display shows up: Exit Type choices..00 Begin Second Block. Columns .00 Text for the first block .: 1 80 Edit SRCMBR SEU==> _______________________________________________________ FMT ** .. 0004..+.. press Enter.. Columns . 0006.+.00 0007.00 THIS IS A TEXT DOCUMENT. 0002.+...... . 5.. we show a sample TEXT document that will be used in the next section for illustrating the use of various SEU line commands..+. .. Change/create member ..+.. The sequence number field of a record is used to specify the line commands.' Exiting the Editor To exit SEU press <F3>. .00 0003. I *************** Beginning of data ********************************* ****************** End of data ************************************ Now.

N=No N Y=Yes. . This returns you back to the editing mode. . . use <F5> to refresh the screen.99. type WRKMBRPDM YOURLIB/SRCFILE on any command line. .9999. . . press <F12> to cancel the exit display. if the member is modified. The edit display for this member is shown: . . . N=No 0001. . F3=Exit . . File . .01 . . For example. if syntax errors do persist. . . . the system supplies Y in this field and returns back to the editing mode ( unless you explicitly type N and force it to exit ). In the following discussion. . . . . N=No F5=Refresh F12=Cancel If you wish to save the changes you have made. . . . . . type option 2 in front of member SRCMBR and press <Enter> . . a sample TEXT document is used to illustrate the use of the various commands. . . . . . and then you decide to cancel it. . . . However.99 01. Resequence member Start . . . . reach the 'Work with members using PDM' display. SRCMBR____ Name SRCFILE___ Name YO URLIB___ Name Description_for_the_member. . . . . . .Member . . . Note: If you type a line command. . Return to editing . . . . . Type N in this field only if you do not want to save changes made to your member. . Increment . and press < Enter> . . . . and type option 2. . ._____ Y Y=Yes. The SEU line commands are entered over the digits that make up the sequence number of a record. . . To edit a member that has already been created. . otherwise N.00____ 00. . Library . . Using Line Commands SEU supports various line commands that guide us in editing an existing member. if your member did not have any syntax errors. However. . . . to edit the member SRCMBR created before. note the following: y y y If you have decided not to quit the editor. From the "Work with members using PDM" display. . For example. . . . command M for moving lines and so on. .01 . Use the tab keys to position the cursor at the desired member. . command C is used to copy lines. Print member . . . . . . . Text . y y Use the command WRKMBRPDM as explained in the previous section. N=No N Y=Yes. The default value for 'Return to editing' option is N. . .99 N Y=Yes. . . . The screen for editing that member will show up. . . . . Go to member list . . . you may simply press < Enter> .00___ 0000. . . . . . . . . . The default value for 'Change/create member' is Y. . . . . . . The default values supplied for most of the options above are self-explanatory. . . .

00 0002. ''''''' PROGRAM -ID...-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++ + *************** Beginning of data **** **************************** 0001. ..: 1 71 Edit YOURLIB/SRCFILE SEU==> _________________________________________________________ SRCMBR FMT CB .00 Begin First Block.00 Begin First Block. . .. Text for second Second Block.00 THIS IS A TEXT DOCUMENT.00 End First Block. Begin End Second Block.00 End Second Block. 0010. block .00 THIS IS A TEXT DOCUMENT..Columns ..00 0007. . Columns .00 0003. SAMPLE. and press <Enter> . 0002. 0005.00 Text for the first block . .00 0007.. . 0004.00 0006. Type in the line to be inserted and press <Enter> . ..00 0010.00 0003..-A+++B++++++++++++++++++++++++++++++++++++++++++++++++++++++ *************** Beginning of data ******************************** 0001.. 0009.00 0008. 0002.00 0004...00 ****************** End of data ************************** ********* F3=Exit F10=Top F4=Prompt F11=Bottom F5=Refresh F24=More keys Inserting a line To insert a line after a particular record.00 F3=Exit F10=Top THIS IS A TEXT DOCUMENT.. type I (insert) on the sequence number field of that record.00 0005.00 0003..: 1 71 Edit YOURLIB/SRCFILE SEU==> ________________________________________________________ SRCMBR FMT CB . ****************** End of data *********************************** F4=Prompt F11=Bottom F5=Refresh F24=More keys The screen adjusts as shown below. 0008..00 Text for second block . Begin First Block. End First Block.. Text for the first block ... *************** Beginning of data ******************************** I001.00 Begin Second Block. 0006.00 0009.

00 Begin Second Block... type C (copy) in the sequence number field.00 0005. 0001.-A+++B++++++++++++++++++++++++++++++++++++++++++++++++++++++ *************** Beginni ng of data******************************** 0001. This results in the pending line to be copied after the line you have indicated.00 ****************** End of data *********************************** Type A (after) on the last line as shown.. Columns . Second Block. 0009.01 It illustrates the use of SEU line commands. 0001.. 0002.. 0008. .: 1 71 Edit YOURLIB/SRCFILE SEU==> __________________________________________________________ SRCMBR FMT CB . Note the message on the top that indicates a pending Copy line command.00 THIS IS A TEXT DOCUMENT..00 0007. and press Enter.00 End Second Block. Text for second Second Block.00 End Second Block. 0008. and press Enter.. 0005.0004.00 End First Block. . 0005.00 0006.00 Text for second block . .00 C Begin First Block.00 F3=Exit F10=Top End Text for the first block .: 1 71 Edit YOURLIB/SRCFILE SEU==> _________________________________________________________ SRCMBR FMT CB ..00 THIS IS A TEXT DOCUMENT.00 0009.00 Begin Second Block..00 C Begin First Block....00 Text for the first block .. .00 0007. First Block..-A+++B++++++++++++++++++++++++++++++++++++++++++++++++++++++ *************** Beginning of data ******************************** 0001....00 0010.00 Text for second block . Begin End ****************** End of data *********************************** F4=Prompt F11=Bottom F5=Refresh F24=More keys Copying a line To copy the "Begin First Block" line to the end of the program.. Columns . 0006. 0010. block ... . .00 Text for the first block .00 0007.00 0008. . 0004. 0004.00 End First Block.. 0002. 0009.. 0006.01 It illustrates the use of SEU line commands.

00 ****************** End of data ************************************ The program looks as shown below.01 0002. type D (delete) in front of it and press <Enter> .. after the copy. Begin End Second Block.00 0003.01 0002. *************** Beginning of data ******************************** THIS IS A TE XT DOCUMENT. It illustrates the use of SEU line commands. Now. End First Block.00 0006.00 0010. the target for the move has to be specified.A010..00 0005. block .00 Begin First Block. To move a single line. End First Block.00 Begin First Block..01 ..00 0008. Begin First Block. Text for second Second Block. Begin End Second Block.00 0004. 0001. and press <Enter> . It illustrates the use of SEU line commands.00 0003. Text for the first block . ****************** End of data *********************************** Block Move To move a block.00 0007.00 0008.. The line that was just copied may be deleted as shown below: *************** Beginning of data***************************** THIS IS A TEXT DOCUMENT.00 0006.00 0009. Begin First Block.00 D011. Text for the first block .00 0011. type MM at the beginning and the end of the block.00 0007.00 0001. 0001.00 0009. The Block Move is illustrated below. ****************** End of data *********************************** Deleting a line To delete a line.. block . Text for second Second Block... 0001.00 0010. the first block of text being moved after the second one.00 0004.00 0001. *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT.00 0001.00 0005. It illustrates the use of SEU line commands. use the command M (move) and follow the procedure as explained above for copy.

****************** End of data *********************************** Block Copy Enclose the block to be copied within CC commands.00 MM 0004. block . Begin End Second Blo ck.00 0011.00 A010.00 0001.00 0005. End First Block.00 0007. Text for the first block . It illustrates the use of SEU line commands. block .00 0001. End First Block..00 .00 MM 0007.. Text for second Second Block. that B is specified as the target.00 0012.00 0010...00 0010. *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT. *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT. End First Block. block .00 0005.01 0002.00 0014. Note below. The block copy resembles the block move explained above. and specify the target.... Text for second Second Block. Begin End Second Block.00 Begin First Block. Text for second Second Block. 0001.00 0013.00 0008. 0001.00 0008. 0001..00 MM 0007. Text for the fi rst block .00 0009. to copy the block before the indicated line.00 ****************** End of data *********************************** Here is the member after the move: *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT. It illustrates the use of SEU line commands. Begin First Block.01 0002.00 0008. ****************** End of data *********************************** Type A on the last line to move the block to the end of the program.00 0009.. Begin End Second Block.0002.00 MM 0004.... Text for the first block .00 0009.00 Begin First Block.

block ..00 B It illustrates the use of SEU line commands. block .00 DD 0013. End First Block.00 CC 0011. End Second Block. Begin First Block.. Text for the first block .00 Begin First Block. Text for the first block .00 0013.00 0001.00 0013.00 0013. Text for second Second Block. Begin Second Block. Begin End Second Block.01 0002...00 0001.03 DD 0014. Text for the first block ....00 0014.00 0009. Text for second Second Block.00 0007..00 0009. The block that was just copied may be deleted as shown: *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT.02 0013.00 0011. ****************** End of data *********************************** . Begin End Second Block.00 0009... Text for second blo ck ..00 CC 0008.00 0012..00 0008.00 0010. End First Block. It illustrates the use of SEU line commands..00 0008. 0001. Begin End Second Block. ****************** End of data *********************************** Block Delete To delete a block. block . It illustrates the use of SEU line commands.00 0012.00 Begin First Block.01 0002.00 0010. after our experimentation with the above line commands: *************** Beginning of data ******************************** THIS IS A TEXT DOCUMENT.00 0007. ****************** End of data *********************************** The source member looks as follows.. 0001.0001. enclose it within DD commands and press <Enter> . Text for second Second Block.00 0012. End First Block.01 0002.00 0011.

SAVE Save changes and continue editing. The syntax of FIND is FIND string [N. F (First). CHANGE Find all occurrences of a character string and replace it with another string.NX] [column parameter] TOP Go to the first page of the work screen.A. SEU Commands SEU commands are entered in the "SEU==>" field at the top of the screen.L] [X.A. FILE [ [ [ library/ ] file ] member ] CANCEL Cancel session and exit session. BOTTOM Go to the last page of the work screen. Examples: y y y y F XYZ F 'hello there' F *ERR A find all syntax errors F "'XYZ'" Use the F16 "Repeat Find" key to find the next occurrence of a string. SET . The scope of the search can be specified using search parameters: X (excluded records) and NX (nonexcluded records).F. P (Previous). If the string contains embedded blanks. and A (All). SAVE [ [ [ library/ ] file ] member ] FILE Save changes and exit from edit session. or quotation marks.To get a complete list of commands for SEU place the cursor on the sequence number list and press the help key.NX] [column parameter] .F. apostrophes. The syntax is CHANGE fstring cstring [N. Several direction parameters are available: N (Next). FIND Search for an occurrence of a character string.L] [X.P.P. it should be enclosed in quotation marks. L (Last).

See the IBM SEU manual for more information. returns to previous entry point. . F5 Refresh Refresh the current display. the Edit display supports a diverse set of function keys that allow you to perform specific tasks. type the command over the digits that make up the sequence number. The following is a list of all the valid commands: y y y y y A=After Move or copy records after this record. PDM will fill in the default values. F19 Left View the info. To use a line command. F10 Cursor Moves the cursor from the data area to the SEU command line. ___________________________________________________________________________ ___ Key Name Function ___________________________________________________________________________ ___ F1 Help Press the help key for details about the display. and from the SEU command line to the data area. B=Before Move or copy records before this record. to the left of the current display. C=Copy Line Copy this line to a specified target. Function Keys in SEU When a member is being edited. F20 Right View the info. F18 DBCS Conversion Perform DBCS conversion. F24 More keys View the other function keys available for the current display. F14 Find/Change Options Go the Find/Change Options display. F23 Select Prompt Go to the Select Prompt display. F3 Exit End the current task. Bn=Before with repeat n times Move or copy records before this record and repeat these records n times. F15 Browse/Copy Options Go the Browse/Copy Options dis play. F11 Previous Record Places the previous record in the prompt. F4 Prompt Provides assistance for the options selected in the list or a command on a command line. SEU returns to the EDIT Session and displays the prompt after you make a selection. An=After with repeat n times Move or copy records after this record and repeat these records n times. Summary of Line Commands The Sequence_number field displays the sequence number of the record and is used for entering SEU line commands. F16 Repeat Find Perform find or repeat current find. F13 Change Session Go to the Change Session Defaults Defaults display. to the right of the current display. F17 Repeat Change Perform change or repeat current change function. Rebuilds display and shows it again.

D=Delete Delete the current line. RRn=Block shift n chars to the right Shift data defined by the boundary between and including the RRn and RR line commands n character positions to the right. copy. without losing data. CC=Block Copy Copy all lines between the boundaries formed by the two CC commands CR=Copy records and retain command Copy this record to the specified targets and keep this command on the display. R=Shift data 1 char right Shift data in the current record one character position to the right without losing data. In=Insert n lines Insert n blank lines after this record. CRn=Copy n records and retain command. On=Overlay n lines Overlay this line and the following n-1 lines with the first n lines defined by the move.y y y y y y y y y y y y y y y y y y y y y y y y y y y y Cn=Copy n lines Copy this line plus the next n-1 lines to the specified target. Mn=Move n lines Move the current line and the following n-1 lines to a specified target. . MM=Block Move Move all records between and including the boundaries defined by the MM line commands to a specified target. M=Move a line Move a line to a specified target. OO=Block overlay Overlay all the records between and including the boundaries defined by two OO line commands with the lines defined by the move. LL=Shift block 1 char to the left Shift data defined by the boundary between and including the two LL line commands one character position to the left without losing data. Rn=Shift data n chars right Shift data in the current record n character positions to the right without losing data. IP=Insert line and prompt Insert a blank line and display the line in a prompt. Ln=Shift data n chars left Shift data in this record n character positions to the left without losing data. L=Shift data 1 char left Shift data in this record one character position to the left without losing data. P=Display prompt Type P to display this line in a prompt. copy. RR=Block shift 1 char to the right Shift data defined by the boundary between and including the two RR line commands one character position to the right without losing data. or copy repeated line command. copy. LLn=Shift block n chars to the left Shift data defined by the boundary between and including the LLn and LL line commands n character positions to the left. O=Overlay Overlay the current line with the first line defined by the move. or copy repeated line command. Dn=Delete n lines Delete the current line and the next n-1 lines. Copy n records to the specified targets and keep this command on the display. CCR=Copy block records and retain command Copy the block of records defined by a pair of CCR commands to the specified targets and keep this command on the display. or copy repeated line command. I=Insert a line Insert a blank line after the current record. DD=Block Delete Delete all lines between the two DD boundaries. F=Display format line Display a format line.

all it does is make the library that you have created (in my case. +n=Roll member forward n lines Roll the member forward n lines. Once you have entered all the necessary . CRTSRCPF FILE(ALIBRARY/QCLSRC) Once the PF-SRC file has been created. compiling. and running a program on the AS/400. The following creates a PF-SRC file in the library ALIBRARY.y y y y y y y y y y y y y y y y y y RP=Repeat line Repeat the current line once before the following line. X=Exclude Exclude the current record from the display. RPn=Repeat line n times Repeat the current line n times before the following line. Steps in Developing a Program In this section. We will also demonstrate how to find compilation errors when they occur. n=Absolute Positioning Position the line identified by the sequence number(n) as the first record on the display. and a brief description of the source member.(minus sign)=Roll member backward 1 line Roll the member backward one line. The intention here is not to teach CL programming. YOURLIB) the current library while retaining the existing current library on the library list. -n=Roll member backward n lines Roll the member backward n lines. . SL=Show last record Show the last record of the exclude group SLn=Show last n records Show the last n records of the exclude group. W=Display member from column 1 Display the member beginning in column 1. that is the one you created in an earlier section. RPPn=Block repeat Repeat all lines defined by the boundary between the two RPP line commands n times. Xn=Exclude plus Exclude the the current record and the next n-1 records. First. put the cursor on the "Source type" field and press <F4> ). XX=Block Exclude Exclude all lines between the boundaries formed by the two XX line commands. Wn=Display member from column n Display the member beginning in column n. ALIBRARY represents the library that has the same name as your user profile or your other library. + (plus sign)=Roll member forward 1 line Roll the member forward one line. work with the file by typing: WRKMBRPDM FILE(ALIBRARY/QCLSRC) Then create a source member called TEST in QCLSRC by pressing <F6> . RPP=Block repeat Repeat all lines defined by the boundary between the two RPP line commands. SFn=Show first n records Show the first n records of the exclude group. The CL program is very simple. and how to obtain information about certain compilation and runtime errors. This will start the SEU editor. we are going to use a simple Control Language (CL) program to illustrate the steps in developing. Enter TEST for the name of the source member. The command line form of issuing CL commands will be used in this section (you may want to use the <F4>prompt facility to assist you if you are not familiar with the commands). SF=Show first record Show the first record of the exclude group. let's create a source physical (PF-SRC) file called QCLSRC (the IBM-supplied name for a CL source physical file). CLP for the source type (to see what source types are available.

indicating that there is a syntax error. A CL program begins with the PGM command. The reason for this step will be explained shortly. "&". is used to make YOURLIB the new current library (where "YOURLIB" is any existing library that you have access to).00 *************** Beginning of data ******************************** PGM DCL VAR(&OLDCURLIB) TYPE(*CHAR) LEN(10) RTVJOBA CURLIB(&OLDCURLIB) CHGCURLIB CURLIB(&YOURLIB) /* intentional error */ ADDLIBLE LIB(&OLDCURLIB) ENDPGM ****************** End of data ****************************** ***** You can use the SEU line command.00 0005. (Aside: If a CL program has a parameter named &MYVAR. saving it in the variable &OLDCURLIB.00 0006. on the fourth statement. the reader is referred to the IBM "CL Programmer's Guide" or the online education modules: "AS/400 Control Language Programming" in the "Tutorial Support System" course. SEU will not let you exit an editing session that has syntax errors unless you explicitly specify that you want to exit in the exit screen. the variable &MYVAR has to be declared using the DCL command. The ampersand symbol. The RTVJOBA command. We have mistakenly prefixed YOURLIB with "&". to help you in selecting a CL command. Moreover. Remove the parameters of DCL so that the statement contains only "DCL". is used to retrieve the name of the job's existing current library. SEU will highlight that statement. &MYVAR will be used to hold the parameter's value. and press <Enter> . and the modules "Creating a Control Language Program" and "How to Use Error Handling Facilities" in the "Facilities and Implementation" course.00 0004. Also.) For more information. In this case. the IP line command can help enormously in coding such programs). Put the parameters back on the DCL statement. IP (insert line and prompt). Notice that we have intentionally introduced an error in this statement. which is optional if the CL program does not receive any parameters. such as RPG. The CHGCURLIB command. the PGM statement is coded as: PGM PARM(&MYVAR). are "fixed-format". press <Enter> . You will enter a SEU editing session. Note that SEU provides syntax checking for CL programs. note that CL programs are "free format" in that components of CL statements do not have to be placed in particular columns on the screen (some source types. This variable will be used to save the name of the existing current library. Type in the following program: 0002.information. The variable will be used to hold a character string with a maximum length of 10.00 0007. The second statement declares a CL variable called &OLDCURLIB.00 0003. denotes that &MYVAR is a variable. . on the third statement. that is we really want CHGCURLIB CURLIB(YOURLIB) instead of CHGCURLIB CURLIB(&YOURLIB) .

. . The default is the library that contains the source member. exit and save the program as it is (i. . > QCLSRC Name Library . the "old" current library will not be retained on the library list. You can change these default values. Compiling a Program In the "Work with Members using PDM" screen. enter option 14 to compile the member that contain the CL source program. accept the defaults. . > *YES *NO. . . . on the fifth statement. . . . *PGMID Library . Option 14. . . This is an error because if we intended &YOURLIB to be a variable. This error will be detected during compilation. *PGM Generation severity level . Now. you will receive a message saying that the job completed normally. 29 0 -29 Text 'description' . it must be declared in a DCL statement. . On pressing <Enter> . > ALIBRARY Name. you will see the following screen: Create CL Program (CRTCLPGM) Type choices. . If there are no compilation errors. . *SRCMBRTXT Additional Parameters Replace program . . . . . adds the name of the former current library (which we saved in the variable &OLDCURLIB in the RTVJOBA statement) to the library list. a message will return saying that the job has ended abnormally. . Hence. . The "Library" field specifies the library that will contain the *PGM object. . . . . . .e. meaning there are compilation errors. The last statement. . . . and to add it back on the library list using ADDLIBLE. . press Enter. . . *LIBL. . . . . it will invoke the CRTCBLPGM command). This is because when the CHGCURLIB command is executed. which is the job queue for batch jobs. Note that SEU cannot detect this kind of error. Since there is an error in the above program. . Press <Enter>to continue. . . indicates the end of the CL program. with the error). This step is needed if we want this library to stay on the library list. . press <F4> when you use option 14). . . . . . This name defaults to name of the source member. > ALIBRARY Name. if the source type is CBL. *YES Bottom F3=Exit F4=Prompt F5=Refresh F13=How to use this display F10=Additional parameters F24=More keys F12=Cancel The "Program" field specifies the name of the *PGM object that will be created if the compilation is successful. in this case. *CURLIB Source file . the need to use RTVJOBA to save the name of that library. . . . The ADDLIBLE command. . . If you prompt on the option (ie. > TEST Name. .g. ENDPGM. will invoke the CRTCLPGM (Create CL Program) command. . . . Program . . . > TEST Name. . *CURLIB Source member . Unless you want to rename the *PGM object or put it in another library. . you will see a message at the bottom of the screen saying that the compilation job has been submitted to QBATCH. . . Option 14 will invoke a different "create program" command for a different source type (e.A name with "&" as its prefix denotes that it is a CL variable. . . .

Finding Compilation Errors To find out the cause of the compilation error. it is not the cause of the compilation failure. * * * * * E N D O F C R O S S R E F E R E N C E Program TEST not created in library YOURLIB. Maximum error severity 40. You can use the DSPMSGD (Display Message Description) command to get more information about a compilation error. Type 5 to display the contents of the compiler listing of the program. There should be a message stating that the program was not created because of compilation error. it is the cause of the failure. Type 5 against QPJOBLOG to display it. For example. A segment of that listing is presented here: 200300400500* CPD0727 40 600700* * 5738SS1 V2R1M1 YOURLIB/TEST 920306 Control Language Cross Reference Declared Variables Name De fined &OLDCURLIB 300 * CPD0791 00 * 5738SS1 V2R1M1 920306 Control Language Message Summary Total 90-99 2 Severity 0 -9 10-19 1 0 20-29 0 30-39 0 40-49 1 50-59 0 60-69 70-79 0 0 80-89 0 0 YOURLIB/TEST Type *CHAR Length 10 References 400 600 PGM DCL RTVJOBA CHGCURLIB Variable '&YOURLIB ADDLIBLE ENDPGM * * VAR(&OLDCURLIB) TYPE(*CHAR) LEN(10) CURLIB(&OLDCURLIB) CURLIB(&YOURLIB) ' is referred to but not declared. The second error is only an information message. Let's go back to the source member and fix the problem. Using SEU to Find Compilation Errors . type WRKSPLF to see what's in your output queue. Press <Enter> to exit this display. to get more details about the error CPD0727 DSPMSGD RANGE(CPD0727) MSGF(QCPFMSG) where QCPFMSG is the system message file and CPD0727 is the message ID. The meaning of first error is evident. There are two errors in the listing (errors are marked with "*" in column 1): the first with a severity of 40 and the second with severity of 0. There should be a spooled file with the same name as your source member (the compiler listing) and a job log (QPJOBLOG). The message will refer you to the compiler listing of the program. LIB(&OLDCURLIB) * * * E N D O F S O U R C E * * * No labels used in program.

let's introduce another type of error. you can pass the parameter value(s) by prompting on either the option 16 or the CALL command. you will get a runtime or object error message similar to the one below: Display Program Messages Job 287471/T03/DSP02 started on 07/20/92 at 13:48:44 in subsystem QINTER CPF2110 received by TEST at 600. An advantage of using SEU for this purpose is that you can see both the source member and the compiler listing on the same screen. SEU provides special support for locating compilation errors. press <F15> (Browse/Copy). press Enter. Reply . type '+' on the "Parameters" field and press <Enter> . You can also us pass parameters using the command line method. specify some library name that you do not own or one that you are not authorized to use. Running a Program Use the WRKOBJPDM command to work with the library that contain the *PGM object that was created. The program should compile normally after this change. On return to the editing session. The program should compile normally. If the library is not in your library list. If the library that contains the *PGM object is in your library list. Alternatively. The *PGM object will be created in the library that contains your source file unless you specified otherwise. In the ADDLIBLE statement. To make the situation more interesting. The rest of the source remain the same as before (except for removing the ampersand character). To view a spooled file while you are in SEU. type CALL TEST on a command line. But if you created a program that requires an input parameter(s).You may want to use SEU to view your compiler listing instead of the way discussed above. and make the corrections to the source member on the spot. we specify a nonexistent library called DOGNAP. option 16 invokes the CALL command). Enter 2 in the selection field. F *ERR). For example. edit the source member to remove the ampersand. In our example. CALL MYPROG PARM(parameter1 parameter2 . Respond with a "Y"). that is ADDLIBLE DOGNAP . in the bottom screen type FIND *ERR on the SEU command line (or simply. If your program takes more than one input parameter. Type 16 against the *PGM object to run/execute it. ________________________________________________________ . you should see a split screen with the member you are editing on top and the spooled file on the bottom. Compile the source member (you will probably be asked if you want to delete the existing *PGM object. . especially if the compiler listing is too lengthy to scan by eye. Using SEU. To find compilation errors. Select the appropriate spool file. This will bring another screen that allows you to enter multiple parameters.. "&". ..) Diagnosing Runtime Errors In any case. Place the cursor on the "Browse/copy spool file" field and press <F4>. you can still run the program by qualifying it with the library name CALL ALIBRARY/TEST The example program used here does not take any input parameters. from YOURLIB. you can run the program by using the CALL command (in fact. when you run the program. (C D I R) Type reply.

. : C -.Dump the CL p rogram variables and cancel the CL program. You see a screen similar to the one below. .Cancel the CL program. The next time you run the program. . Possible choices for replying to message . . To continue. . place the cursor on the message id (in this case CPF2110) and press <F1>. the library DOGNAP was not found. . . . . For instance. it should run without any problems. . . . Type DSPLIBL to check whether the library has been added and whether it has been made the current library. . i. the DSPMSGD ("Display Message Description") command can be used to obtain more information about the error.e.BAT file in MS-DOS. Message text for CPF2110 is: Library DOGNAP not found. . : : : : CPA0701 INQUIRY 07/20/92 QCLXERR Severity . . . . .: 0000 To program . . . .e. in this case. . fix the error. The message text..: 0000 Message . . . .F3=Exit F12=Cancel To find out the cause of the error. . . Go back to the source member. (C D I R) Cause . . . . . The initial program has to reside in your default library (i. Press <Enter> to cancel the program.. Monitor for the error (MONMSG command) and perform error recovery within the program.Ignore the failing command. . . . . : This inquiry message can be avoided bychanging the program. . . . Creating an Initial Program An initial program is similar to the AUTOEXEC. For example. . It is executed when the user logs on. : CPF2110 received by TEST at 600. . Message type Date sent . From program . . . you . . More. . . DSPMSGD RANGE(CPF2110) MSGF(QCPFMSG) where QCPFMSG is the system message file and CPF2110 is the message ID. . indicated clearly what the problem is. . Recovery . : *EXT Instruction . . Additional Message Information Message ID . I -. choose a reply value. . the library with the same name as your user profile) and it has to be named INITIALPGM. D -. . . . Sometimes you can obtain additional messages by pressing <F10> to display messages in the job log. .: 14: 00:05 Instruction . . . . F3=Exit F10=Display messages in job log F12=Cancel Again. . Press Enter to continue. . .: 99 Time sent . . : Control language (CL) program TEST inlibrary YOURLIB detected an error at statement number 600. . . . and recompile.

or delete records. control read and write access to an object. when you recompile it using the option 14. Likewise. The user with this authority can delete. These authorities must be set to secure object to the level of security required. *OBJMGT provides the authority to specify the security (grant/revoke object authority). Understanding Object Authorities Introduction To maintain security of data and/or program objects the AS/400 offers a variety of options available to limit access to object. Rename the source member to INITIALPGM and recompile it. update. *OBJOPR provides the authority to look at the description of an object and use the object as determined by the data authority that the user has to the object. add. *DLT provides the authority to remove entries from an object. and add members to database file. if objects are to be shared or used between users.can make the above CL program your initial program. Authorities and their meanings Object Authorities Object authority is used to control access to an object including the ability to see an object description. Combinations of Object and Data Authorities . *ADD provides the authority to add entries to an object. *READ provides the authority to get the contents or an entry in an object or to run a program. *OBJEXIST provides the authority to control the object existence and ownership. save. for example records in a database file. If you created the source member in a another library. *UPD provides the authority to change the entries in an object. and transfer ownership of the object. move or rename the object. the object authorities must be relaxed correctly to maintain object integrity. or control an object's existence. This includes the ability to view. Data Authorities Data authority is the authority to access data contained in an object. This section is designed to help users maintain correct authorities and to understand the authorities on the objects that they own. Specify your default library as the library where the *PGM object is to be stored. press < F4>to prompt on it.

Edit Object Authority (EDTOBJAUT) Type choices. .: *NONE ---------. . . . Note that the owner of "YOURLIB" has *ALL authority on the object. press <F11>. . . *EXCLUDE authority prevents the user from accessing the object even if *PUBLIC is authorized. . . . . . *ALL allows the user to perform all authorized operations (object and data) on the object. . To see the detail screen as shown below. *USE provides *OBJOPR authority and data read authority. In addition to these. > *LIB Name Name. . They reduce the time required to assign specific authorities to users. *LIBL Object type . . To do that. Object secured by authorization list Object User JOHNDOE Authority *ALL ----Object----Opr X Mgt X Exist X . : Type changes to curr ent authorities. the library that has the same name as your user profile. . . . Edit Object Authority Object . . . . (Note that your default library. . . press Enter. each representing predefined combination of object and data authorities. : *LIB JOHNDOE . . is normally owned by your security officer so you cannot change its authorities). . *LIBL. . . *CFGL. .Data----------Read X Add X Update Delete X X . . . and object type (*LIB) and press <Enter> . we use the "Edit Object Authority". Object . . EDTOBJAUT. . . . *CHANGE provides *OBJOPR authority and all data authority. . . . . . . . . we need to allow the user to have access to the library "YOURLIB". . . *AUTL. command to edit the authority on "YOURLIB". . . .These are keywords. i. *CURLIB *ALRTBL. . . . . : Library . users can create customized combinations of object and data authorities.. Changing authorities with EDTOBJAUT We use an example here to illustrate the use of some of the types of authorities discussed above. . . . . . Type EDTOBJAUT on a command line and press <F4>. . . library. . In this example. . we want to allow a certain user to copy a member from the file "SRCFILE" which is stored in the library "YOURLIB". .e. Fill in the blanks for object.. press Enter. . First of all. : YOURLIB QSYS Object type Owner . > YOURLIB Library .

. . "MKTAS400" is the address of the AS/400 at Minnesota State University. *FROMFILE_ *FROMFILE. object type along with the user you are granting authorities and the respective authority being granted. To allow them to copy the entire file (i. we need to allow the user access to the file "SRCFILE". Type in the name of the user and *USE for the object authority. *DA TA . > MKTAS400__ + for more values _ Member . . . . . Press <F6> to add the user to the authorization list with *USE authority. . . . . . Note that the object authority changes from *USE to USER DEF (meaning a customized authority). . > SNDLIB____ User ID: _ User ID . . . . . > SNDFILE___ Library . . . *LIBL. > SNDMBR____ Name Name. . This will allow them to do perform various operations on "SRCFILE" including copying members from the file. . . . . At any time press <F1> for more help. Send Network File (SNDNETF) Type choices. Press <Enter> to return to the previous screen. . .e. . . Mankato. . . . To do that. . object name.*PUBLIC *EXCLUDE _ _ _ _ _ _ _ F3=Exit F5=Refresh F11=Nondisplay detail F6=Add new users F12=Cancel F10=Grant with reference object F17=To p F18=Bottom Press <F6> to add a user to the list of users authorized to this object. .) Next. The "Send Network File" (SNDNETF) command can be used to send a member of a physical database file (PF-DTA or PF-SRC) to another user. . (Note: If you want to edit a specific authority. . . When the network file arrives at its destination. . . "SRCFILE"). . the member "SNDMBR" of the physical database file "SNDFILE" (which is contained in the library "SNDLIB") is to be sent to the user "RCV". . . Sending and Receiving Network Files Users can send and receive network files to and from each other. *FIRST Additional Parameters To file type . . Type EDTOBJAUT OBJ(YOURLIB/SRCFILE) OBJTYPE(*FILE) or use the prompt to fill in the parameters. press Enter. . Notice that *USE gives the user *OBJOPR and *READ authorities on "YOURLIB". . . *OBJMGT must be granted. . . . . . > RCV_______ Address . . . In the example shown below. Use EDTOBJAUT to edit the authority on the file "SRCFILE". . *CURLIB Character value Character value Name. . . File . . type "X" under "Mgt" in the detail screen for that user. Fill in the library name. a message is sent to both the sender and receiver. type "X" in the position relating to that authority to grant authority or a space to delete that authority. . . . . . . . Changing Authorities with GRTOBJAUT and RVKOBJAUT To use GRTOBJAUT and RVKOBJAUT type the command and prompt <F4>. . .

*FROMFILE . . . . . *LIBL____ Name. "Library". and "To member" blanks with the appropriate receiving file. . . . library and member names and press <Enter>. . . *FROMMBR. H. . . B. . . D. . . . . *FIRST F10=Additional parameters F24=More keys F12=Cancel F3=Exit F4=Prompt F5=Refresh F13=How to use this display Fill in the "To data base file". Send priority . . . . . . . . The following screen will show up. . : Type options. *FROMFILE__ Name. . From file . . . *LIBL. . . *HIGH F12=Cancel F13=How to use this display The receiver will have to run the "Work with Network Files" (WRKNETF) command to inspect their network files. . . . To data base file . . *CURLIB . . . . press Enter. . *ONLY . . > 'SNDMBR'__ Character value. G. . . . . . . Receive Network File (RCVNETF) Type choices. To member . > 'SNDFILE'__ Character value . . . . press Enter. F. . . E. . . . . F3=Exit F4=Prompt F24=More keys F5=Refresh A *NORMAL__ A. . Printing Procedure When programs on the AS/400 produce output intended to be printed the material does not go directly to the printer. . . Work with Network Files (WRKNETF) User . . . . I *NORMAL. . . C. . Instead the output is bundled together with other output in an object . .VM/MVS class . . . . Library . : User ID/Address . . Member to be received . . *FROMMB R____ Name. 1=Receive network file 3=Submit job 4=Delete network file 5=Display physical file member File -------From----------Arrival---Opt File Member Number User ID Addre ss Date __ SNDFILE SNDMBR 1 SENDER MKTAS400 08/26/92 RCV_______ RCV_______ MKTAS400 Time 16:37 F3=Exit F4=Prompt F12=Cancel F5=Refresh F9=Retrieve F11=Display type/records Type 1 in the "Opt" blank in front of the network file to receive and press <F4>to prompt. Note that the receiving file must already exist before trying to receive members.

Here are some: y y y From the WRKMBRPDM display. change the attributes of the desired spooled file. Typing 2 in the option field of spooled file in the WRKSPLF screen will change the spooled file's attributes. Typing 4 in the option field of spooled file in the WRKSPLF screen will delete the spooled file from your output queue. you will have to press the <Reset>key to clear the message at the bottom of the screen in order to continue your session. information on processed records for a database file and abnormal job end conditions. . By changing the attribute "Print device" from "*OUTQ" to a valid printer (use the WRKWTR command to find out which printers are available). you will move your spooled file from your output queue to a printer writer. first you must work with your output queue. option 6 in front of the desired member will generate a spooled file that is your program member. Try pressing the <F10>or <F11>keys to obtain different views of your spooled files. 11" 132/80 8. Spooled files should be deleted as soon as they are not needed to reduce clutter in your output queue. Note: If this is the first time that you are using the WRKSPLF command. First. This screen allows you to do many things with your spooled files. you should change the "assistance level" for this screen. There are several ways by which spooled files are generated. This will gives you more features on the screen. Typing 3 in the option field of spooled file in the WRKSPLF screen will keep the spooled file from printing if placed on a printer writer and change the status to *HLD. Pressing the Print Screen key (<Shift><Print Screen>on the PS/2 running PC-Support or <Ctrl>p on the ASCII connections) will generate a spooled file of the current display." To send these spooled files to a printer. Note that if you do a print screen. The attributes that you will be interested in are the "Print device" and "Save file". 11" 132 Col. specifying the correct print device name.5" Printer Type Line Printer Line Printer Dot Matrix Location Morris Hall MSU ACC MSU ACC Lab Rooms If "Save file" is changed from "*NO" to "*YES" the spooled file will not be deleted after the file has been printed. then. The system automatically generates spooled files in some cases like presenting job log. The printer writer names at MSU are: Printer Name PRT01 VAXPRTS2 PS/2 printers Width/Paper 132 Col. Moving a Spooled File to a Writer To get a physical copy of a spooled file on your output queue. To do this press <F21>and change the assistance level from "basic" to intermediate". These sub objects are called "spooled files.called an "output queue" (*OUTQ). two facts must be true. the spooled file must be placed on a started writer and second. To work with your spooled files on your output queue type WRKSPLF and press <Enter>. the spooled file must have a status of released.

PC0614S2). Press the <F5>key. Typing 6 in the option field of spooled file in the WRKSPLF screen will will release a file that is held to become available to print and will change its status to *RDY. This will bring you back to the work with spool file screen. This will refresh the screen to show you the current status of your spooled files. Also. The printer will never say it is started although it actually is. type WRKWTR ("Work with Writers"). select the "stop" option and then select "start". make sure it says "Ready". If not. Step by Step Printing Example Type WRKSPLF { or OQ } Press <Enter>. Printing to a PS/2 Printer To see which PS/2 printers are available for printing from the AS/400.e. Press <Enter> . This will move us to the correct spool file option field. make sure that the printer is ready for printing. The name of the printer is: "PC0" (i. Press <Enter>. This will allow you to work with your spooled files. If the status is HLD then release it by typing a 6 in the option field of the spooled file and press <Enter>. If the STS (status) is RDY or WTR the printer will print your spooled file.Typing 5 in the option field of spooled file in the WRKSPLF screen will allow you to view your spooled file. Press 2 <Enter>. "P" + "C" + zero) + the number of the PS/2 to which the printer is connected + "S2" (e. Use the <Field EXIT>key or <Tab>to move to the desired spool file. your printouts can be picked up in the ACC printer area at any time. VAXPRTS2 is a printer that is connected to VAX1. This printer is the system printer. Also make sure the printer's status is "ONLINE". This will mark the spool file for displaying. For the printer to be started. If you printed to VAXPRTS2. Make sure that the printer you want to print to has been started. the PS/2 workstation that is connected to the printer must be signed on to the AS/400. This will permit you to change the spool file attributes. Press <Alt><Esc>on the computer that is attached to the printer to display the status of the printer. Common Problems . This will display the spool file. This will move the file to the printer writer. Type in the name of the printer <Enter>. More Printing Help For more help on printing type STRSCHIDX <Enter>then type SPOOLED QUEUES <Enter>. Normally you will not be authorized to print to writer PRT01.g. Type 5 in the option field.

Because OS/400 retains every version of a *PGM object that results from a compilation. to end the job immediately. (This is the option on System Request to end a previous request. where applicable. On the "Work with Active Jobs" display. Press <Enter>. To deal with this problem. your storage can be used up very quickly. This can be done by typing WRKMBRPDM YOURLIB/SRCFILE on any command line. We will continue to use SRCFILE in library YOURLIB for explanation. The locally-defined alias for WRKACTJOB. type option 4 (End) against the job that is causing the loop and press <F4>to prompt on the option. SEU. AJ. type the "Work with Active Jobs" command: WRKACTJOB and press <Enter> . You can see this information by typing: DSPUSRPRF username. .) Press <Enter> . Stopping Infinite Loops/Ending a Previous Request If you have issued a command and it is taking too long finish it may be an infinite.e. can also be used. The command will clear your objects out regaurdless of the error. To end the disconnected job: y y y On a command line. Ending Disconnected Jobs with Infinite Loops If for some reason you have been disconnect from the system while executing an infinite loop request the job may continue to execute. you may get an error message "Error found on SEU command". The reader must substitute the appropriate names for source physical file and library. you must clear the *PGM objects from library QRPLOBJ. loop. for example. In the "How to end" field. type in *IMMED i. DDS and Data Files on the AS/400 Creating a data file The following discussion assumes that you already have a source physical file in your current library. This will cause the system to run very slowly.Note that the command keys used in this section are those of the PS/2 running PC Support. endless. To do this type WRKOBJPDM QRPLOBJ . You may get an authority problem do to the fact that you do not own all of the object in that library. When you have exceeded (or nearly exceeded) your storage quota and you try to start. To stop your infinite loop: y y y y Press <Left Ctrl> (this will reset any keyboard errors) Press <Alt><Print Screen>(this sequence is call "System Request") Type 2. Note: You can also press <Alt><Print Screen>and press <Enter>to display a menu of system requests. Out of Storage Quota Errors Depending on the specific class that requires use of the AS/400 there is a maximum storage quota allocated to your user profile. and then select the appropriate command. The first step is to to reach the 'Work with members using PDM' display.

.Name++++++RLen++TDpB. Your_description_for_the_member_. C. . *PRV Name. Text 'description' . .. *PRV. 5. . fill in the fields as shown: Start Source Entry Utility (STRSEU) Type choices.. . 6 *BLANK_________________________________ The Source type for a data file must be specified as PF. . . . . . . . . . . . . Name. . . . . BAS. *PRV Source member . Source file . .. . . . . Option . . . . . .. . .. . the screen looks as shown: Find . _________ ____________________________________________ TESTDATA FMT PF . Library . 2. . ' '.. PF________ C. . *PRV. *SAME.. *SELECT Name.T. . 2..______ Name. Source file . . .. . . Option . this type denotes aPhysical File. . . . . .... . *SAME. . *LIBL. *LIBL.. . . . BAS. .. . Press <F4> to invoke the prompter and <F12>to cancel it. . *PRV Name. . Name. . . The following screen shows up: Start Source Entry Utility (STRSEU) Type choices. . . SRCFILE___ Library . .. . . . . . .. . . to create a data file called TESTDATA in the source file SRCFILE in library YOURLIB. . .. .. . 5. . .A. BASP. . . The prompter helps you to supply the source information in the correct format. . . When the prompter is invoked. . . . ' '. . It is convenient to use the prompt facility for defining the DDS source. . . . . *CURLIB. . 6 The Edit display shows up.. *PRV______ __________ *PRV______ *SAME_____ Name. .. . . . . *SELECT Name. YOURLIB___ *PRV Source member . *CURLIB. *BLANK____ *BLANK. . p ress Enter. . .To create a data file member... . *BLANK. . you have to start the Source Entry Utility.00 ****************** End of data **************************************** . *BLANK____ Text 'description' .. . For example. .Functions++++++++++++++++++ *************** Beginning of data ************************************* 0001. . . . Source type . . .. Press <F6> from the 'Work with members using PDM' display or type STRSEU on any command line and press <F4>. . . TESTDATA__ Source type . . press Enter. BASP. . . .

Length ______ Data Type _ 0001.Prompt type . field. . a floating point. For example. B for zoned binary data. R Type R in column 17 to indicate a record format name. Decimal_Positions Type a value from 0 through 31 to indicate the number of decimal positions to the right of the decimal point within a packed decimal. beginning in column 19. . for Character type the range is 1-32766. for Packed decimal the range is 1-31 digits and so on. Name_Type Choose one of the following: Blank Leave the field blank to indicate a field name. or key field name in this position. Name Type _ Name ____ _ PF Ref _ Sequence number . Name Type a record format. or a binary field. . . Data_Type Choose one of the following: A for character data.00 Decimal Positions ___ Use _ Functions ___________________________ F3=Exit F11=Bottom F4=Prompt F12=Cancel F5=Refresh F24=More keys F10=Top An explanation of the different fields shown above follows: The fields marked with * are not commonly used. . S for zoned decimal data. Reference (*) Type R in this field to use the reference function to copy attributes of a previously defined named field to the field you are now defining. The maximum length allowed is 10 characters. Length Type a value to indicate the number of characters in a character field or the number of digits in a numeric field. a zoned decimal. H for hexadecimal data. so for normal applications you may conveniently ignore them. K Type K in column 17 to indicate a key field name. P for packed decimal data. F for floating point data.

.. . .. ..A. .00 ****************** End of data **************************************** F3=Exit F10=Top F4=Prompt F11=Bottom F5=Refresh F24=More keys Press <F3>and hit <Enter>to save the member TESTDATA. . the file TESTDATA will be created in YOURLIB.. FIELD1 is of character data type with length 10. . Loading a data file To load a data file. . The DDS source for TESTDATA is shown below... . . There are two fields in the data file. The last line of the member declares FIELD1 to be the key field. press Enter.00 FIELD2 5P 2 0004. and choose option 14 (compile). Find TST1 .. .00 FIELD1 10A 0003.. If the compilation is successful. Data base file . __________ *LIBL_____ Name Name. .. use the command UPDDTA (Update Data Area). RECFMT1 is the record format name.. Type UPDDTA on any command line and press <F4>.. Library . .00 R RECFMT1 0002. . The member TESTDATA that was just created contains only the definition of the data file and hence our the next step is to actually create the file.. ..Functions++++++++++++++++++ *************** Beginning of data ************************* ************ 0000. .. This can be done by compiling the member we have just created. and FIELD2 is a packed decimal of length 5 with 2 decimal positions. From the 'Work with members using PDM' display. . *LIBL. The following screen shows up: Update Data with Temp Program (UPDDTA) Type choices. For more details about exiting SEU refer to the section 'How to exit SEU'. . .. FIELD1 and FIELD2. .00 K FIELD1 0005.01 0001.. look into your spooled file (WRKSPLF) and identify the problem. Otherwise. Functions (*) Type in keyword entries valid for defining physical files in positions 45 through 80 of this field. . *CURLIB .Name++++++RLen++TDpB. __________________________________________________________ FMT PF . position the cursor at member TESTDATA..Use (*) Type B or leave the field blank to indicate a field used for both input and output.T.

. . *FIRST______ Name. A source physical file must be created (or one already in existence may be used) and a member must be created in the PF-SRC to hold the screens. *LIBL. Member . .Member . see the manual for the language of the application source. . . . . *CURLIB Name. For example. . . issue the command STRSDA (for STaRt SDA) from a command line. . create a menu. . . . defining input and output fields and special text attributes. . . the operating system includes a utility called SDA (Screen Design Aid). . . . . TESTDATA__ YOURLIB__ *FIRST____ Name Name. This system allows a programmer to "paint" screens and menus used by a program from within a simple editor. Starting SDA The first steps in creating a set of screens for a program are the same as those for creating a program source member. A menu of options will appear which allow you to create a screen. to populate our file TESTDATA we would fill in the values as shown: Update Data with Temp Program (UPDDTA) Type choices. . . Screen Design Using SDA To aid in the creation of user interfaces on the AS/400. . To stop the process of loading the data file. . *FIRST Bottom F3=Exit display F4=Prompt F5=Refresh F12=Cancel F13=How to use this Enter the values for different fields and press Enter>. . or test a design. . . This section will only cover those aspects of screen design not related to interfacing with applications. . . press Enter. and press <Enter>. . . To create the screen design member. . . . allowing the program to have all the features of the AS/400 user interface without direct programming of the appearance of the interface. . Choosing the first option brings the following screen: . . Library . These screens may then be called from an application program. press <F3>and press < Enter>. . . . Data base file . For information on this area. . *FIRST Bottom F3=Exit F4=Prompt display F24=More keys F5=Refresh F12=Cancel F13=How to use this Supply the values for the data base file to be loaded and the library it is contained in. . . .

. Since each member can have several records. . Finally. . the screen should look like this: Design Screens Type choices. . Library . __________ . . If the member does not yet exist. Source type . . . . . *CURLIB Name. . . It will default to the proper type for SDA. create object Record . Design option . Blank for default Since no screen design exists yet. . . a single screen design member could contain any number of screens. *CURLIB Name. press Enter. . ____ ______ F12=Cancel Name. Once the information is entered. . . . and a member specified. . . . . SCREEN1___ __________ SRCFILE___ YOURLIB___ SCRNMBR___ __________ Name. . . with each one given a distinct record name. (to be displayed on Source file . a source file must be provided. 5 1=Select file keywords 2=Select record keywords 3=Select subfile keywords 4=Select subfile control 5=Define screen image (fields) 6=Save DDS source. . *LIBL. . *LIBL_____ .Design Screens Type choices. __________ Work Screen) . . . . . Additional records . . . . . . . . it is necessary to first create one using the "5" option on the "Design option line". . QDDSSRC___ . __________ . . F4 for Record list Name Name Name. _ 1=Select 2=Select 3=Select 4=Select file keywords record keywords subfile keywords subfile control keywords 5=Define screen image (fields) 6=Save DDS source. . . it will be created. a record name must be given. . . Member . . . . . . . . . . . Design option . . . F4 for Member list DSPF. Blank for default keywords F12=Cancel The "SOURCE TYPE" field may be left blank. . . . . . Member . . . create object Record . . press Enter. . . . F3=Exit F4=Prompt . . . . . Source type . . . F4 for Member list DSPF. F3=Exit F4=Prompt . . Library . . . . Also. . . . Additional records (to be displayed on Work Screen) Source file . F4 for Record list Name Name Name. . *LIBL.

6 (output). Pressing <Enter> will bring up the main SDA display. This is simply a blank "pasteboard" on which you may place text and fields. or B (both) for alphabetic fields. Press <F11>to switch back and forth between the list of selected data base fields and the list of not selected database fields. type + followed by I (input). O (output). copy. The ruler does not interfere with your data. such as requesting extended field definition. and remove fields. place fields you have selected from a database. You can use the following function keys on the Work Screen: F1=Help Press <F1> to show the same information as the help key. F3=Exit Press <F3> to have the Design Screens display appear. You indicate the length of a field by the number of characters following +. shift. F15=Subfile Prompt Press <F15>to Display a prompt on the bottom row of the Work Screen that allows you to change the subfile line (SFLLIN) and subfile page (SFLPAG) sizes that were in effect for the current record being defined. or followed by 3 (input). To add a floating point field. F11=Switch Press <F11>to display a list of selected database fields on the bottom row of the Work Screen. F14=Ruler Press <F14>to place a vertical and horizontal ruler on the Work Screen where you position the cursor. add a numeric field followed by E (single-precision) or D (double-precision) and press Enter. F10=Database Press <F10> to have the Select Data Base Files display appear. Adding Fields To add a user-defined field. On the Work Screen you can add fields and constants. and add or remove attributes and colors. You can also perform additional operations.These options will start SDA on a screen named SCREEN1 in the member SCRNMBR of file SRCFILE in library YOURLIB. You can use uppercase or lowercase letters. or 9 (both) for numeric fields and press Enter. F4=Prompt Press <F4> to have the Work with Fields display appear. Defining fields on the ruler may cause unpredictable results. Using The Work Screen Use the Work Screen to design the display you are creating. move. F17=Print Press <F17> to Print the current contents of the Work Screen. Press <F14>to remove the ruler. F12=Cancel Press <F12>to save your work and continue to the Design Screens display. . or by the length specified in brackets after the first character. <F1> is active on all displays but does not appear in the function key area. F6=Condition Press <F6> to have the Condition Work Screen display appear.

input. The fields begin in the position where you type &. +MMM or +(M3) The Define Message Constant display appears. 'xxx YYY zzz' Combines three constant fields into one field. alphabetic. Use the at sign (@) in pairs to delimit a DBCS (Double Byte Character Set) constant. if you are in multiple mode. +3. both (input and output). Surround several constants with single quotation marks to redefine them as one constant. You move fields from the bottom line to your display by typing & followed by the field number. To work with a MSGCON field. The following examples illustrate moving fields to your display: . and the column heading position and pressing Enter. When you press Enter. numeric. type + followed by M.2)e Single-precision. To add system date or time fields.2) Four-character. Adding Fields from a Data Base File The fields you select from a database file.3)D Double-precision. Adding Constants To add a new constant or change an existing constant: y y y y y y y y Type a constant. appear on the bottom row of the Work Screen. To add a MSGCON (MeSsaGe CONstant) field.The following examples illustrate user-defined fields: +BBB or +b(3) Three-character.66 or +6(4. You can then type DBCS data between the delimiters. the Define Message Constant display appears. Press < F12>to return to the Work Screen. A blank character ends the constant. type *DATE or *TIME. +99. The following examples illustrate constant fields: 'xxx"YYY' Defines two constant fields. type ? in front of the field. +66. Use a double quotation mark to end one constant and start a new constant while taking up only one position. floating-point field with five significant digits and three decimal positions. You cannot use a DBCS insert key on the Work Screen. Type constants with single quotation marks to define separate constants for each character string (word) that is followed by a blank. input field with two decimal positions (set by an edit word).33E or +3(3. SDA will replace each pair with a shift in and a shift out pair when you press <Enter>. floating-point field with three significant digits and two decimal positions. Surround a character string with single quotation marks to define a single constant. both (input and output) field.999d or +9(5.

Adds a column above the field. Moving. &P Adding or Removing Attributes and Colors To add or remove display attributes or colors on the Work Screen. &nL Places field.Single Field Mode Mode &&n &L &R &C Symbol Multiple Field Meaning Field Places field. &nR Places field. &nP Places the column heading only. -. &nC Places field.in the position preceding the field (the attribute byte of the field) and type = where you want the field to appear. pressing < Enter>. Copying. = Type . Adds a column heading to the left of the field. Left-aligns column heading f or an alphabetic field and right -aligns column heading for a numeric fields. and working with the field keyword displays that appear. Does not add column heading. Adds a column heading to the right of the field. == . and Shifting Fields Reposition fields on the Work Screen by typing one of the following and pressing <Enter>: -. type one of following commands (in uppercase or lowercase) in the position preceding the field (the attribute byte of the field): Command Add Remove H R S B N U -H -R -S -B -N -U -A Attribute High intensity Reverse image Column separators Blink Nondisplay Underscore Remove all attributes Command Add Remov e CB CG CP CR CT CW -CB -CG -CP -CR -CT -CW -CA Color Blue Green Pink Red Turquoise White Remove all colors You can carry out the above operations by typing * in the position preceding the field (the attribute byte of the field).

in any position after the last field. == Type . type .Type . Subfile Field Definition You can define fields for a subfile similar to nonsubfile fields with the following considerations: . You can rename the field by changing the name on the last row. Date and time keywords Type *DATE or *TIME to define special constants on the display where the system date and time will be automatically substituted. file. Display field length and description Type ? in the position preceding the field to display field length and text or column heading description on the last row of the Work Screen. <<<. -. Display MSGCON field definition Type ? in the position preceding the field to show the Define Message Constant display. and library. You can change the message number. D Type D in the position preceding the field (the attribute byte of the field). Additional Features Extended field definition Type * in the position preceding the field (the attribute byte of the field) to add field-level attributes and keywords.in the position preceding the field (the attribute byte of the field) and type == where you want a copy of the field to appear. and type == where you want a copy of the group of fields to appear. Removing Fields Remove fields from the Work Screen by typing one of the following and pressing <Enter>DO NOT use the <Delete>key to delete items on the work screen: Blanks Type a blank in the position preceding the field (the attribute byte of the field). to shift the field left or right as far as the signs extend.in any position preceding the field. and over the entire field. or type >>> after the field (over the first attribute byte). >>> Type <<< in the position preceding the field (the attribute byte of the field). -.

Y SRCFILE___ YOURLIB___ SCRNMBR___ Y Y SCRNFIL___ YOURLIB_ __ Y 20 Y QBATCH____ QGPL______ Y=Yes Name Name. . . . . . .. Replace existing member . . . . If create fails. . . . . . . . 30 Y=Yes Name Name. The screen test program will request the name of a screen and display file (created using the compilation procedure above. . . . Create file if DDS message severity (GENLVL) is less than . . Using the "6" option for a screen produces the following display: Save DDS .y y y You can modify fields on the first record of the subfile. This can be accomplished using the "Test Display Files" option from the initial SDA menu. . . . Compiling And Testing Screens Once the screen design is complete and <F3>is pressed. . . . Library . . . . . . . (CRTDSPF) Display file . F3=Exit F12=Cancel . . That file may then be used by user programs. . . . . . . . *LIBL . . . IF THIS OPTION IS NOT CHOSEN AFTER THE SCREEN DESIGN IS COMPLETE. . . . . . . press Enter. . . 20. . . . . . Replace existing file . Any field that you define for the subfile will appear the number of times specified by the SFLPAG keyword. . . . . . *LIBL . . . F4 for list Y=Yes Y=Yes F4 for prompt Name Name. . . . . . . Choosing the "6" option on the Design Option line saves the source file for the screen and compiles it into a screen file which may be used by a program. . . . . Anything you type is assumed to be a definition of the first record. THE MODIFICATIONS WILL NOT BE SAVED. . . . . . .. . Several screens from a single member can be created before compilation. the file must be compiled before exiting SDA. . Member . . . Create display file . . Source file . . . . . *LIBL . . . . Library . . . . Y=Yes Y=Yes 0. . . . . . . To modify the values of the SFLPAG (number of records on the display) and SFLLIN (number of spaces between fields). Submit create job in batch . . press < F15>to display the subfile prompt line. . . . .. . However. Save generated DDS source . . . . SDA displays the screen with the values supplied. . Library . . display listing . . 10 . <F15>is allowed only for subfile records. .Create Display File Type choices. .. . . . . . Note that it isn't necessary to save a file after every RECORD created. .. . . PDM returns to the "Design Screens" menu shown above. . . .. . It may be advantageous to test screen designs before using them with programs. Job description . .) followed by a prompt screen for values for the output fields. . . . . These options will compile all the screen records in member SCRNMBR of file SRCFILE in library YOURLIB to a *FILE object called SCRNFIL in YOURLIB.

. This source output should be printed before starting the debugger. *CURLIB . . . first prompt on the compile option on the Work with Members Using PDM display (or on the CRT___PGM command for the language of the source file) by pressing < F4>(PROMPT) with the "14" (COMPILE) option on the options line of the file you wish to compile. Program . it is necessary to prompt for more options by pressing <F10>. . . . . . . . . . . *CURLIB . . . . Source file . . . . the AS/400 provides a facility to aid in the debugging of programs as they are running. . other languages will have similar prompt displays. . . To enter the compiler options. *LIBL. . . *ANSI83. . since the debugger does not list source lines as the program executes. . . . . . . . Starting the debugger Before using the debugger. Text 'description' . > YOURLIB___ Name.. . F3=Exit F4=Prompt display F24=More keys F5=Refresh *DEBUG____ *SOURCE___ *EXTENDED__ 2046____ F12=Cancel *LIST. *NOLIST. . . . . *PGM . . Library . . . . . . which reveals the following screen: Create Pascal Program (CRTPASPGM) Type choices. . Library . include debugging information in the executable program (so the debugger has access to variable and routine names) and produce a source output listing from the compiler. this tool allows the user to view and change the values of variables and step through the program by using breakpoints which interrupt program execution and return control to the debugger. + for more values Language level . These will. . The source output is also useful as a hardcopy reference while the program is executing. . . *SRCMBRTXT_____________________________ Additional Parameters Compiler options . Source member . > SRCFILE___ Name . press Enter. . the source program must be compiled with the *DEBUG and *SOURCE options. . Called the EPM (Extended Program Model) debugger. . *EXTENDED. . However. . . *SYSTEM String temporary threshold . . To specify these options at compilation time.Debugging Programs on the AS/400 In addition to the utilities provided for creating. . > YOURLIB___ Name. as the compiler adds its own line numbers to the source which will be necessary in referencing specific lines while using the debugger. . . 256 -32767 F13=How to use this The above example is from a Pascal source member. . . This will show the initial options screen for the compiler. > TEST______ Name. . respectively. *CHECK. > TEST______ Name . . and compiling programs. . . editing. .. . . .

the next step is to run the program using the CALL command. Phase 2 (Add Breakpoints) A Breakpoint is a place in a program where the system stops the processing of that program and gives control to the display station user or to a specified program. ' addbkp stmt(10 20 30) ' will set the breakpoints at statements 10. After the member has been compiled (assuming there are no errors in compilation. From the 'Display Break Point' screen. For example. Start the Debugger Add breakpoints Call the program to be debugged and End the Debugger These phases are discussed in detail below: Phase 1 (Start the Debugger) The command to start the debugger is: ===> strdbg YOURLIB/TEST where TEST is the program in library YOURLIB. The program breaks before processing a statement specified as a breakpoint.. You may specify 1 to 10 statement numbers where the breakpoint should occur. n2 . that you intend to debug. 3. Using the debugger The process of Debugging essentially consists of four phases: 1.. 2. ===> call YOURLIB/TEST You will notice that the program stops execution when the breakpoint is reached. 4.. This will take you to the command entry screen. n10 are the statement numbers where the breakpoint is to occur. The command ADDBKP is used to set breakpoints.) the source listing should be printed and used with the next steps. 20 and 30. The simplest form of ADDBKP takes the following form: where n1. Pressing <Enter>once all options are entered will submit the compilation. Display the program variables with DSPPGMVAR command: . ===> addbkp stmt(n1 n2 . n10) Phase 3 (Calling the Program) Once the breakpoints are set.Placing the *DEBUG and *SOURCE options on the "Compiler options" lines will cause the compiler to produce a source listing and place it in the output queue and will include debugging information in the output program.. you can check the values of the program variables as explained below: y y Press <F10>(command entry) on the 'Display Breakpoint' screen.

Ending the Debugger Once you are done with debugging. 'Go to SETUP B'. APPENDIX B . before you issue any other command.===> dsppgmvar VARNAME where VARNAME is the variable name you intend to display.VT-100 to PS/2 (PC Support) Keyboard Mapping . You should next set the modem speed to 9600. This may be done with menu option 7.0 Terminal Setup Instruction The following should assist you in setting up PC-VT V9. Select Modem Speed. This may be done by placing the cursor above each feature switch you wish to change and pressing the 6 key to toggle the switch to the correct value. Start PC-VT and immediately go into the setup by pressing CTRL-F1. 7. Finally. You should now change the feature switches. Confirm that your copy of PC-VT is V9. Press <Enter>to resume execution of the program. To exit the command entry press <F3>. This may be done by pressing the S key. 2. Select Data/Parity Bits. 3.Terminal Setup PC-VT 9. 5. you can check for as many variables as you want to from the command entry screen. 1. Select option 5. it is very important that you end the Debugger. You may use the <ESC>key to exit the setup mode and return to the emulator mode from which you may access the port selector. 8. or will terminate. 9. Feature switch settings: 1 2101 2 0X11 3 0000 4 1110 5 0001 6 0110 7 1X10 8 000X 9 XXXX 0 XXXX 6. The program will stop at the next breakpoint if any. 4. y y Using the above command. This may be done with menu option P. the blocks of 4 characters at the bottom of the screen.0 will not support the cursor keys during an AS/400 session. This may be confirmed by starting PC-VT and noting the version number on the initial screen or by entering the setup A screen.0 for use with the IBM AS/400 via a port selector connection. Next set the data bits to 8 and the stop bits to 2.0. Control is transferred back to the breakpoint. save the changes you have made to the SETUP so that you will not have to repeat this setup the next time you use PC-VT. so that they match those given below. Versions prior to V9. The command to do it is: ===> enddbg APPENDIX A .

the system will automatically return the user to the place where they left off. Getting Started . <Alt><Pt Scn><ESC>s System Request APPENDIX C . so the next time he/she is using education. Special Char <ESC><CTRL>w Indicator Toggle <ESC><CTRL>a Refresh screen <Left Ctrl><ESC>r or <CTRL>r Reset term.PS/2 Key Nam Micro -Term Key Sequence Typical use <F1><ESC>1 Help <F2><ESC>2 Switch View <F3><ESC>3 Exit <F4><ESC>4 Prompt <F5><ESC>5 Refresh Screen <F6><ESC>6 <F7><ESC>7 Roll Down <F8><ESC>8 Roll Up <F9><ESC>9 Get Previous Cmd <F10><ESC>0 Move to top <F11><ESC> List Toggle <F12><ESC>+ Cancel <F13><ESC>! or <ESC><SHIFT>1 User support <F14><ESC>@ or <ESC><SHIFT>2 <F15><ESC># or <ESC><SHIFT>3 <F16><ESC>$ or <ESC><SHIFT>4 Main menu <F17><ESC>% or <ESC><SHIFT>5 <F18><ESC>+ or <ESC><SHIFT>6 <F19><ESC>& or < ESC><SHIFT>7 Scroll left <F20><ESC>* or <ESC><SHIFT>8 Scroll right <F21><ESC>( or <ESC><SHIFT>9 <F22><ESC>) or <ESC><SHIFT>0 <F23><ESC>_ or <ESC><SHIFT> Scrl Option <F24><ESC>= or <ESC><SHIFT>= Scrl Menu <DEL><DEL> Delete chara cter <Shift><Insert><CTRL>d Duplicate <Enter><RETURN> Send screen <Backspace><ESC>i <Right Ctrl><LINEFEED> or <CTRL>j Field exit <Home><ESC>H <Insert><ESC><DEL> Insert mode <Page up><ESC>u <Page down><E SC>d <Shift><Pt Scn><CTRL>p Print Screen <Tab><TAB> Next field <Shift><Tab><ESC><TAB> Previous field <ESC><ESC>a or <CTRL>a Attention <Alt><F7><ESC>(grave accent) Ins. This facility is self-paced so the user can work the modules when it is convenient. err. There is a quiz at the end of most modules. which gives feedback on how much information the user retained from that module.Using On-line Education (EDU) Introduction Online education is a facility provided by IBM to assist the user in learning about the AS/400. using the bookmark utility to keep track of where the user has left off. This facility is set up for the user to work through any topic he/she is interested in.

to clear this message and continue your session. If you forget to get a screen print. 5. type a 2. 4. there is a quiz. To see a list of all started printers. To display a description about a course select 8 in front of that particular course. 2. To exit in the middle of a module press <F3> where this option is available. You can select all modules or one of the listed categories. Follow the directions and read each screen carefully. and press <Enter>. Select 5.1. to assigned to a printer. Your most recent screen print will be located at the bottom of the list and it will be titled QSYSPRT. 6. Next. When the screen has been captured you will see a message at the bottom of your screen. obtain a screen print of the screen that tells you how many you answered correctly on the first try. At the end of most modules. Type 1 to select one of them <Enter>. To assign it to a printer. This will give you a list of all started printers and from here you can select one by typing a 1 on . This will give you a choice of exiting the module. To check your screen print type WRKSPLF (work with your spool files). The COMS 175---Command Language audience path is customized for the CS175 class. This will change the status from not assigned to a printer. Exit online education by pressing a series of <F3>keys until you have reached a command line. Press the <Reset>(at the bottom left hand corner of the keyboard). exiting and marking it complete or go to a topic/subtropic menu for the module. exiting and setting a bookmark. For the CS175 class. change. you can either select 1 to start the first module in the selected audience path of the course or 3 to select any module < Enter>within the selected course. type the name of the printer you would like to send your printout to and press <Enter>. At the Printer to use prompt. press <F4>on this line. This can consist of questions from the module or examples that you walk through. Select course <Enter> 3. 7. you need to go through the quiz again to get to that screen. There are several courses in online education but the most useful ones in terms of using the AS/400 are: o Tutorial Support System o Facilities and Implementation o Application Design and Development Tools Type 1 to select the desired course <Enter>. or a combination of both. when you are finished with the quiz. which tells you that it has been sent to the default printer device. Select 4 to select an audience path for the course <Enter>. To Obtain a Screen Print Press the <SHIFT>and PRINT SCREEN key (towards the upper right hand corner of your keyboard) at the same time. From any command line type ==>STREDU <Enter> STREDU is an abbreviation for Start Education.

BAS. APPENDIX D . Check for dependencies. Create a library (optional) .CRTSRCPF 3. Go to step III. Move cursor to error description .the line before the desired printer. Create a source physical file (optional) . Type source into physical file member. etc. Display message to see if completed successfully . o Does program need other programs .. Press <Enter>again to accept this printer. o CRT___PGM . Look for error and statement number.DISPLAY.hit <F1> (help) 1. 0. 2.if so create or attain them. 1. If there are errors or fatal errors go to to step III and correct. WRKSPLF 1. Wait for compilation to complete. Execute the program. 2. Press <Enter> to select this printer. 3. Start source entry utility . 1. see the section "Printing Procedure" in this manual. If program gives a run-time error. PAS. 0. In PDM: <F6> . PAS. spool file.if so create or attain. Note if there are any warnings or errors or fatal errors. Correct error. o Does program need data files . o CALL library/programname o Option 16 from a WRKOBJPDM screen. Page to bottom of file.How to program on an AS/400 The following outline details the basic steps of program development on the AS/400.create a member. For more information on printing. 4. Cross reference statement number with source line number with spool file WRKSPLF 3. C.STRSEU 2. some more appropriate than others depending on the situation. Setup area for source 1. Since there may be multiple ways to complete a task.. If there are any warnings determine if they are important and if deemed so go to step III and correct.where ___ can be CBL. Work in program development manager  STRPDM  WRKLIBPDM  WRKOBJPDM  WRKMBRPDM 3. 5. Compile the source member to attain object and compiled. various ways of doing essentially the same thing are shown under each outline heading. You will return to the screen where you pressed <F4>.CRTLIB 2. Choose option 5 . 4. . Log in.DSPMSG Check spool file to see if any Fatal errors or warnings.. 2. o Option 14 from the PDM lines. 4.

appearance) or make suggestions for improvement. If you have found errors in it.: Your Address: Your Comments: Version 2.06 Copyright Minnesota State University. Reader's Comments Use this form to tell us what you think about this manual. Mankato © 1992. subject matter. this is the form to use. or if you want to express your opinion about it (such as organization. After you have completed this form send it in the campus mail to: AS/400 Staff Computer Services Box 45 Today's Date: Your Name: Your Phone No. Be sure to print your name and address below if you would like a reply.1995 Last modified: Thu Sep 18 00:28:14 CDT 2003 Jeffrey Hundstad .Log off.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.