As400 Notes
As400 Notes
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
BASIC
CL command language
FORTRAN
Pascal
PL/I
REXX
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.
Answer "Enter password for common user ID:" with your password.
Sign On
System . . . . . : MKTAS400
Subsystem . . . . : QINTER
Display . . . . . : PCnnnnS1
User . . . . . . . . . . . . . . __________
Password . . . . . . . . . . . .
Program/procedure. . . . . . . . __________
Menu . . . . . . . . . . . . . . __________
Current library. . . . . . . . . __________
If for some reason you can not longer type, press the <Reset>key. On the
Microterms or PC-VT 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.
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.
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.
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>
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.
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 <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):
Start the book reader and select the bookshelf entitled BookManager
READ/DOS.
Press <Alt>h (or <F10>h) and select the appropriate help selection for
your current problem.
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.
*LIB Libraries
*FILE Files
Libraries
Every object is contained in a library. A library is an object, of type *LIB, that
contains a group of objects. It is similar to the "root" or top-level directory on
Unix, MS-DOS, and VAX/VMS. However, unlike these systems, a library
cannot "contain" other libraries (with the exception of QSYS, the system
master library, which "contains" all libraries on the system). An interesting
implication of the non-hierarchical nature of libraries is that two users cannot
have libraries with the same name. There are basically three general
categories of libraries:
3. User-created libraries.
Files
A file is an object, of type *FILE, that contains data in the form of a database,
device data, or a group of related records that are handled as a unit. In this
manual, we are primarily concerned with database files. There are two types
of database files:
1. physical files
2. logical files.
A physical file contains actual data stored on the system. It has a fixed-length
record format. In this manual, we are primarily interested in two kinds of
physical files:
A data physical file (*FILE PF-DTA) contains data that cannot be compiled,
such as an input file to a program. In conventional terms, a data physical file is
a data file, for example an employee master file. A data physical file normally
has a record format. This record format is defined using Data Description
Specifications (DDS is a language that is used to describe database files to
the system). This description is then compiled to produce a *FILE object with
attribute PF-DTA.
The data records in a data physical file can be grouped into members. A data
physical file may contain one or more members. These members are not
objects themselves but subsets of an object. 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. In a PF-SRC file, each member
contains source statements for a program or DDS source. Members have an
attribute associated with them, which in the case of PF-SRC members,
determines how the various systems programs (such as the editor and
compilers) on the AS/400 treat the member. This attribute is specified when
creating the member, and allows compilation to be totally automatic. Once, for
example, a member has been specified as having an attribute of CBL (for
COBOL program,) the AS/400 editor, SEU, will format the program as a
COBOL program, and when PDM (Program Development Manager) is given
the instruction to compile the file, it "knows" that it should invoke the COBOL
compiler. 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):
File . . . . . . SRCFILE___
Library . . . . YOURLIB___ Position to . . . . __________
Parameters or command
===> ___________________________________________________________
The name of the source physical file is SRCFILE, and it is contained in the
library YOURLIB. Although, in the above example, source members of
different types are stored in the same source physical file, you will probably
want to store source programs of the same type in a separate source physical
file. For example, you may want to keep all your RPG source programs in a
PF-SRC file called, for example, "RPGSRC" and DDS source in a PF-SRC file
called, for example, "DDSSRC". You may also use the standard IBM-supplied
names such as "QRPGSRC", "QDDSSRC", and "QCLSRC" for the various
PF-SRC files. However, you may choose to include source members of
different types belonging to the same application in the same PF-SRC file, as
in the above example.
In a data physical file (PF-DTA), the member(s) contains data for use by
programs. Normally, a PF-DTA file will only have one member (by default, the
member's name is the same as the file name). However, it is possible to
include multiple members in a single PF-DTA file. For example, you may want
to group the records in a sales transactions file so that each member contains
data for each month. In this way, each month's data can be processed
separately by processing one member at a time. It is important to understand,
at this point, the difference between "source" and "data" in regards to data
physical files. In the "Work with Members using PDM" screen above, the "PF"
member, "EMPMAST", contains DDS source that defines a physical file.
When this source member is compiled (using CRTPF or option 14 in the
"Work with Members using PDM" screen), it will produce a *FILE object with
attribute PF-DTA. This compiled object is the actual file that is used to hold
data records.
A data logical file (*FILE LF-DTA) is a data file that contains no actual data,
but provides a different method of viewing the data of an accompyning data
physical file(s) which it internally references. It is similar to the concept of a
"view" in SQL. A data logical file is described to the system using DDS. When
the DDS source is compiled, a *FILE object with the attribute LF-DTA is
produced.
Another *FILE object type that you may encounter in your programming
courses is the device file. A device file contains a description how data is to be
presented to a program from a device or vice versa. Two common types of
device files are printer files (*FILE PRTF) and display files (*FILE DSPF). A
printer file describes the attributes that printed output will have, such as the
length and width of a printed page. A printer file can be created using the
"Create Printer File" (CRTPRTF) command. A display file describes what
information is to be displayed and where it is to be displayed on the screen of
a display station. One way of defining and creating a display file is with the
Screen Design Aid (SDA) utility.
An important object type on the AS/400 is the output queue (*OUTQ). On the
AS/400, whenever something is printed, the output goes to an output queue
and it stays there as a spooled file. A spooled files, like a member, is not an
object itself but a subset of an object. The spooled file stays in the output
queue until it is directed to a printer or removed. An output queue has already
been created for you with the creation of your user profile. The name of the
output queue is normally the same as that of your user profile. Refer to the
section "Printing Procedure" in this manual for more information on printing
spooled files.
The relationships between the various objects that have been discussed in
this section are as follows:
QSYS (*LIB)
[special library]
|
| contains
|
Library (*LIB)
|
| contains
|
.------------------+----^-----------------.--------.
| | | |
Programs (*PGM) Outqueues (*OUTQ) Files (*FILE) Other
[Executable] | | objects
| contains |
Spooled Files |
[Output intended for Printer] |
|
.----------------^--.
| |
Physical Data Logical
file file
(PF) (LF-DTA)
| ^ contains
.------^-----. 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. The name
of this library is normally the same as that of your user profile. In this section,
we will create another library and use this library as an example throughout
the manual. Note that you can use your default library, i.e. the library that has
the same name as that as your user profile, to store all your application
objects.
To create a library, type the CRTLIB ("Create Library") on a command line and
press <F4>to prompt on it. Type in the name of the library and enter a brief
description for the library. Leave the library type as *PROD (a production
library is one that is used for normal processing).
Press <Enter>. You should see a message at the bottom of the screen saying
"Library ... created". If you see the message "Library ... already exists", it
means that some other user already has a library by the same name. Note: All
libraries are on the same "level" with only QSYS above them. If you get this
message, try another name for the library. Other commands that operate on
libraries are:
Library Lists
You may have noticed in the previous screen that the "Library" field defaults to
the value *CURLIB, meaning the current library. The current library is tied
closely to the concept of a library list. Before we discuss what the current
library is, we first explain what a library list is. A library list is similar in concept
to the "PATH" in Unix and MS-DOS. It specifies which libraries are to be
searched and the order in which they are searched when the system looks for
an object. A library list is identified by the value *LIBL. A default library list is
automatically created by OS/400 for each job started by a user. Your default
library, that is the library that has the same name as that as your user profile,
is automatically included in your library list. You can display your library list by
typing DSPLIBL and press <Enter> on a command line. The following is the
library list for the user "JOHNDOE".
System: MKTAS400
Note that you may not have all the libraries in the above list. As you can see,
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, is the library that has the same name as your user
profile (in this case, the library "JOHNDOE"). The current library is the
first user library that is searched before the rest of the user libraries in
the list.
user portion
which consists of libraries that holds user objects. Some user libraries,
such as QTEMP, QGPL, and QGDDM come with the system while
others are locally supplied. In addition, the user can create their own
libraries and add them to their library list.
To add a library to the library list, type the "Add Library List Entry" (ADDLIBLE)
command, followed by the library name (or prompt on the command) ADDLIBLE
YOURLIB.
If "JOHNDOE" now issues the the unqualified CALL command, the program
can now be located and executed since the library that contains the program
is now in the library list. You can edit your library list using the EDTLIBL
command and remove a library list entry using the RMVLIBLE command.
"YOURLIB" can be made the current library by typing CHGCURLIB YOURLIB.
Starting PDM
PDM may either be started using the command STRPDM (for Start PDM,)
which will produce a menu of options for the level on which the user wishes to
work (libraries, objects, or members,) or using one of three commands which
indicate the level at which the user would like to work:
The *PRV value on the "Library" field indicates that the default is to work on
the library the user last worked with. These may be replaced with the name of
a specific library. The "Object" and "Object type" options allow the user to limit
which objects will be displayed. Type WRKOBJPDM and prompt with <F4>.
The screen resulting from command WRKOBJPDM, with the library specified
as YOURLIB, and *ALL on the other options, is shown below.
Parameters or command
===> ________________________________________________________________
Presently, there should be just one object in the library, the source physical file
"SRCFILE" that you have just created.
PDM Options
Options are displayed across the top of the screen (for a list of all the options
available in PDM, see Table 1 at the end of this section.) 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. This method of
specifying actions on a form listing the objects available is consistent
throughout PDM.
There are two important special features which this method of specifying
actions offers: First, the options support the prompting facility, and second,
multiple objects may be operated on in succession. To use the prompting
facility, simply press <F4> while an option number is on one of the "Opt" lines.
PDM will present the prompt screen for the command associated with that
option number. Multiple objects may be operated on sequentially by placing
numbers on more than one Opt line. For example, assume we have two
source files in "YOURLIB". You can type "5" (Display) against one and type "7"
(Rename) against the other. Pressing <Enter> causes PDM to process each
option in turn.
Moving down levels in PDM is accomplished using the "12" (Work With...)
option. At the WRKOBJPDM screen, the action of this option depends on the
file type. Placing a 12 on the line next to an item on this display will:
If the item is of type *FILE, go to the WRKMBRPDM display for that file
(there are different types of WRKMBRPDM displays for source and data
files.)
If the item is of type *OUTQ, go to the "Work With Output Queue"
display, allowing the user to work with spooled files.
If the item is of type *PGM, present a display allowing the user to call
the program, change its attributes, etc. (programs may also be called
from the WRKOBJPDM screen by using the 16 option.)
The WRKMBRPDM display is the bottom level of PDM. When working with a
source physical file at this level, 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 instance the *DEBUG option to
include debugging information in the program, remember that the prompting
facility may be invoked on any PDM option.) When working with a physical
data file, the "2=change" option is no longer valid. However, the "18" option
may be invoked to modify the file using DFU (Data File Utility).
Type "12" against "SRCFILE" to work with it. The following "Work with
Members using PDM" screen appears:
File . . . . . . SRCFILE___
Library . . . . YOURLIB___ Position to . . . . __________
Parameters or command
===> ________________________________________________________________
Bottom
You will now be inside the SEU editor. For now, press <F3> to quit and type
"Y" in the "Change/Create member" field to save the source member. Later
on, in the section on SEU we will use this source member. On return to the
WRKMBRPDM screen, you will notice that "SRCMBR" is now in "SRCFILE".
The "Work with Members using PDM" screen can be accessed directly using
the WRKMBRPDM command. Type this command and press <F4> to prompt
on it. To work with the member that we have just created, enter the names of
the library and file as shown below. If you have many members in your file,
you can use the "Member" and/or "Member Type" fields to narrow down the
number of members to work with.
Table 1: Options in PDM (Some options may not be valid at some levels.)
2: Change Modify an object or edit a source member
3: Copy Duplicate an object
4: Delete Remove an object from storage
5: Display Display the contents of an object
6: Print Copy a source member to an output queue
7: Rename Change an object's name
8: Display Descrip. Show summary information about an object
9: Save Save an object to offline storage
10: Restore Retrieve an object from offline storage
11: Move Move an object to another library
12: Work With Perform operations on the contents of an object
13: Change Text Change the text description line for an object
14: Compile Compile a source physical file member
15: Copy File Copy a *FILE object (has special options)
16: Run Run an object of type *PGM
17: Change Using SDA Change a screen design (in a PF-SRC) using SDA
18: Change Using DFU Use DFU to change a PF-DTA member
25: Find String Find a string of characters in an object
Command Structure
First, let's consider the command name. A command is made made up of two
components:
1. a VERB and
o CHG - Change
o CPY - Copy
o CRT - Create
o DLT - Delete
o GRT - Grant
o MOV - Move
o RST - Restore
o RTV - Retrieve
o RVK - Revoke
o SET - Set
o SND - Send
The subject component of the command specifies the item that the verb acts
on. Some examples of verb/subject combinations are:
Parameters
So far in this manual, we have been using the <F4> prompt facility for
specifying parameters. Another way of specifying parameters is the free
format or command line method. You may want to use this method if you
remember exactly what parameter information is needed for a command.
Using this method, parameters can be specified in:
1. keyword form,
2. positional form, or
3. a combination of both.
Positional parameters are often limited to the first three or four parameters. If
you do not want to specify a value for one of the parameters, the system-
defined value, *N, can be entered in the position of that parameter. For
example, the following command will display all objects of type *FILE in the
library YOURLIB. WRKOBJPDM YOURLIB *N *FILE *N will map to the default value
for that parameter, which in this case is *ALL. Note that when using the
WRKMBRPDM command, the file name and library name fields are actually
one parameter (a file name plus a library qualifier). If the reference is to a file
in a specific library, the file name must be qualified with a slash, "/", character
in both keyword and positional forms WRKMBRPDM YOURLIB/SRCFILE
SRCMBR WRKMBRPDM FILE(YOURLIB/SRCFILE) MBR(SRCMBR)
Another tool is the Source Entry Utility (SEU) that offers a full screen editor
providing syntax checking of source statements. PDM is one tool that may be
used to access the SEU.
In this SEU tutorial, we will use the source member we created in the previous
section.
Columns . . . .: 1 80 Edit
SEU==> _______________________________________________________ SRCMBR
Type I (for insert) on the first line as shown and press <Enter> .
Columns . . . .: 1 80 Edit
Now, you may start typing in the desired text. Below, we show a sample TEXT
document that will be used in the next section for illustrating the use of various
SEU line commands.
Columns . . . .: 1 80 Edit
Notice the sequence numbers of records at the extreme left. The sequence
number field of a record is used to specify the line commands. For more
information on line commands see 'Using SEU line commands'.
To save the current member and exit SEU follow the following procedure
'Exiting the Editor.'
Exit
If you wish to save the changes you have made, you may simply press <
Enter> .
The default values supplied for most of the options above are self-explanatory.
However, note the following:
If you have decided not to quit the editor, press <F12> to cancel the exit
display. This returns you back to the editing mode.
The default value for 'Change/create member' is Y, if the member is
modified, otherwise N. Type N in this field only if you do not want to
save changes made to your member.
The default value for 'Return to editing' option is N, if your member did
not have any syntax errors. However, 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 ).
Use the tab keys to position the cursor at the desired member, and type
option 2. The screen for editing that member will show up.
For example, to edit the member SRCMBR created before, type WRKMBRPDM
YOURLIB/SRCFILE on any command line, and press < Enter> . From the "Work
with members using PDM" display, type option 2 in front of member SRCMBR
and press <Enter> . The edit display for this member is shown:
Inserting a line
The screen adjusts as shown below. Type in the line to be inserted and press
<Enter> .
Copying a line
To copy the "Begin First Block" line to the end of the program, type C (copy) in
the sequence number field, and press Enter. Note the message on the top
that indicates a pending Copy line command.
Type A (after) on the last line as shown, and press Enter. This results in the
pending line to be copied after the line you have indicated.
The program looks as shown below, after the copy. To move a single line, use
the command M (move) and follow the procedure as explained above for copy.
Deleting a line
To delete a line, type D (delete) in front of it and press <Enter> . The line that
was just copied may be deleted as shown below:
To move a block, type MM at the beginning and the end of the block, and press
<Enter> . Now, the target for the move has to be specified. The Block Move is
illustrated below; the first block of text being moved after the second one.
Type A on the last line to move the block to the end of the program.
Block Copy
Enclose the block to be copied within CC commands, and specify the target.
The block copy resembles the block move explained above. Note below,
that B is specified as the target, to copy the block before the indicated line.
Block Delete
The source member looks as follows, after our experimentation with the above
line commands:
To get a complete list of commands for SEU place the cursor on the sequence
number list and press the help key.
SEU Commands
SEU commands are entered in the "SEU==>" field at the top of the screen.
FIND
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.
CHANGE
Find all occurrences of a character string and replace it with another string.
The syntax is CHANGE fstring cstring [N,P,A,F,L] [X,NX] [column parameter]
TOP
BOTTOM
SAVE
FILE
Save changes and exit from edit session. FILE [ [ [ library/ ] file ]
member ]
CANCEL
SET
When a member is being edited, the Edit display supports a diverse set of
function keys that allow you to perform specific tasks.
______________________________________________________________________________
Key Name Function
______________________________________________________________________________
F1 Help Press the help key for details about the display.
F3 Exit End the current task, returns to previous entry point.
F4 Prompt Provides assistance for the options selected
in the list or a command on a command line.
PDM will fill in the default values.
F5 Refresh Refresh the current display. Rebuilds display and
shows it again.
F10 Cursor Moves the cursor from the data area to the SEU
command line, and from the SEU command line to
the data area.
F11 Previous Record Places the previous record in the prompt.
F13 Change Session Go to the Change Session Defaults Defaults
display.
F14 Find/Change Options Go the Find/Change Options display.
F15 Browse/Copy Options Go the Browse/Copy Options display.
F16 Repeat Find Perform find or repeat current find.
F17 Repeat Change Perform change or repeat current change
function.
F18 DBCS Conversion Perform DBCS conversion.
F19 Left View the info. to the left of the current display.
F20 Right View the info. to the right of the current display.
F23 Select Prompt Go to the Select Prompt display. SEU returns
to the EDIT Session and displays the prompt
after you make a selection.
F24 More keys View the other function keys available for the
current display.
The Sequence_number field displays the sequence number of the record and
is used for entering SEU line commands. To use a line command, type the
command over the digits that make up the sequence number.
An=After with repeat n times Move or copy records after this record and
repeat these records n times.
Bn=Before with repeat n times Move or copy records before this record
and repeat these records n times.
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.
Dn=Delete n lines Delete the current line and the next n-1 lines.
IP=Insert line and prompt Insert a blank line and display the line in a
prompt.
L=Shift data 1 char left Shift data in this record one character position to
the left without losing data.
Ln=Shift data n chars left Shift data in this record n character positions
to the left without losing data.
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.
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.
Mn=Move n lines Move the current line and the following n-1 lines to a
specified target.
O=Overlay Overlay the current line with the first line defined by the
move, copy, or copy repeated line command.
On=Overlay n lines Overlay this line and the following n-1 lines with the
first n lines defined by the move, copy, or copy repeated line command.
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, copy, or copy repeated line command.
R=Shift data 1 char right Shift data in the current record one character
position to the right without losing data.
Rn=Shift data n chars right Shift data in the current record n character
positions to the right without losing data.
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.
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, without losing data.
RP=Repeat line Repeat the current line once before the following line.
RPn=Repeat line n times Repeat the current line n times before the
following line.
RPP=Block repeat Repeat all lines defined by the boundary between
the two RPP line commands.
SF=Show first record Show the first record of the exclude group.
SFn=Show first n records Show the first n records of the exclude group.
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.
Xn=Exclude plus Exclude the the current record and the next n-1
records.
+ (plus sign)=Roll member forward 1 line Roll the member forward one
line.
The CL program is very simple; all it does is make the library that you have
created (in my case, YOURLIB) the current library while retaining the existing
current library on the library list. First, let's create a source physical (PF-SRC)
file called QCLSRC (the IBM-supplied name for a CL source physical file). 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). The following creates a PF-SRC file in the library
ALIBRARY. ALIBRARY represents the library that has the same name as your
user profile or your other library, that is the one you created in an earlier
section.
CRTSRCPF FILE(ALIBRARY/QCLSRC)
Once the PF-SRC file has been created, work with the file by typing:
WRKMBRPDM FILE(ALIBRARY/QCLSRC)
The RTVJOBA command, on the third statement, is used to retrieve the name
of the job's existing current library, saving it in the variable &OLDCURLIB. The
reason for this step will be explained shortly.
A name with "&" as its prefix denotes that it is a CL variable. This is an error
because if we intended &YOURLIB to be a variable, it must be declared in a
DCL statement. Note that SEU cannot detect this kind of error. This error will
be detected during compilation.
The ADDLIBLE command, on the fifth statement, adds the name of the former
current library (which we saved in the variable &OLDCURLIB in the RTVJOBA
statement) to the library list. This step is needed if we want this library to stay
on the library list. This is because when the CHGCURLIB command is
executed, the "old" current library will not be retained on the library list. Hence,
the need to use RTVJOBA to save the name of that library, and to add it back
on the library list using ADDLIBLE. The last statement, ENDPGM, indicates
the end of the CL program. Now, exit and save the program as it is (i.e. with
the error).
Compiling a Program
In the "Work with Members using PDM" screen, enter option 14 to compile the
member that contain the CL source program. Option 14, in this case, will
invoke the CRTCLPGM (Create CL Program) command. Option 14 will invoke
a different "create program" command for a different source type (e.g. if the
source type is CBL, it will invoke the CRTCBLPGM command). If you prompt
on the option (ie. press <F4> when you use option 14), you will see the
following screen:
Additional Parameters
The "Program" field specifies the name of the *PGM object that will be created
if the compilation is successful. This name defaults to name of the source
member. The "Library" field specifies the library that will contain the *PGM
object. The default is the library that contains the source member. You can
change these default values. Unless you want to rename the *PGM object or
put it in another library, accept the defaults.
On pressing <Enter> , you will see a message at the bottom of the screen
saying that the compilation job has been submitted to QBATCH, which is the
job queue for batch jobs. If there are no compilation errors, you will receive a
message saying that the job completed normally. Since there is an error in the
above program, a message will return saying that the job has ended
abnormally, meaning there are compilation errors. Press <Enter>to continue.
To find out the cause of the compilation error, type WRKSPLF to see what's in
your output queue. There should be a spooled file with the same name as
your source member (the compiler listing) and a job log (QPJOBLOG). Type 5
against QPJOBLOG to display it. There should be a message stating that the
program was not created because of compilation error. The message will refer
you to the compiler listing of the program. Press <Enter> to exit this display.
Type 5 to display the contents of the compiler listing of the program. A
segment of that listing is presented here:
200- PGM
300- DCL VAR(&OLDCURLIB) TYPE(*CHAR) LEN(10)
400- RTVJOBA CURLIB(&OLDCURLIB)
500- CHGCURLIB CURLIB(&YOURLIB)
* CPD0727 40 Variable '&YOURLIB ' is referred to but not declared.
600- ADDLIBLE LIB(&OLDCURLIB)
700- ENDPGM
* * * * * E N D O F S O U R C E * * * * *
Cross Reference
Declared Variables
Name Defined Type Length References
&OLDCURLIB 300 *CHAR 10 400 600
* * * * * E N D O F C R O S S R E F E R E N C E *
5738SS1 V2R1M1 920306 Control Language YOURLIB/TEST
Message Summary
Severity
Total 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89 90-99
2 1 0 0 0 1 0 0 0 0 0
Program TEST not created in library YOURLIB. Maximum error severity 40.
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. The second error
is only an information message; it is not the cause of the compilation failure.
The meaning of first error is evident; it is the cause of the failure. You can use
the DSPMSGD (Display Message Description) command to get more
information about a compilation error. For example, 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. Let's go back to
the source member and fix the problem.
You may want to use SEU to view your compiler listing instead of the way
discussed above, especially if the compiler listing is too lengthy to scan by
eye. SEU provides special support for locating compilation errors. To view a
spooled file while you are in SEU, press <F15> (Browse/Copy). Enter 2 in the
selection field. Place the cursor on the "Browse/copy spool file" field and press
<F4>. Select the appropriate spool file. On return to the editing session, you
should see a split screen with the member you are editing on top and the
spooled file on the bottom. To find compilation errors, in the bottom screen
type FIND *ERR on the SEU command line (or simply, F *ERR). 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, and make the corrections to the
source member on the spot.
Using SEU, edit the source member to remove the ampersand, "&", from
YOURLIB. The program should compile normally after this change. To make
the situation more interesting, let's introduce another type of error. In the
ADDLIBLE statement, specify some library name that you do not own or one
that you are not authorized to use. In our example, we specify a nonexistent
library called DOGNAP, that is ADDLIBLE DOGNAP. The rest of the source remain
the same as before (except for removing the ampersand character). Compile
the source member (you will probably be asked if you want to delete the
existing *PGM object. Respond with a "Y"). The program should compile
normally. The *PGM object will be created in the library that contains your
source file unless you specified otherwise.
Running a Program
Use the WRKOBJPDM command to work with the library that contain the
*PGM object that was created. Type 16 against the *PGM object to
run/execute it. Alternatively, you can run the program by using the CALL
command (in fact, option 16 invokes the CALL command). If the library that
contains the *PGM object is in your library list, type CALL TEST on a command
line. If the library is not in your library list, 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. But if you created a program
that requires an input parameter(s), you can pass the parameter value(s) by
prompting on either the option 16 or the CALL command. If your program
takes more than one input parameter, type '+' on the "Parameters" field and
press <Enter> . This will bring another screen that allows you to enter multiple
parameters. You can also us pass parameters using the command line
method. For example, CALL MYPROG PARM(parameter1 parameter2 ...)
In any case, when you run the program, you will get a runtime or object error
message similar to the one below:
Reply . . . ________________________________________________________
F3=Exit F12=Cancel
To find out the cause of the error, place the cursor on the message id (in this
case CPF2110) and press <F1>. You see a screen similar to the one below.
The message text, in this case, indicated clearly what the problem is, i.e. the
library DOGNAP was not found. Sometimes you can obtain additional
messages by pressing <F10> to display messages in the job log.
program. Monitor for the error (MONMSG command) and perform error
recovery within the program. To continue, choose a reply value.
More...
Press <Enter> to cancel the program. Go back to the source member, fix the
error, and recompile. The next time you run the program, 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.
*OBJMGT
*OBJEXIST
*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.
Data Authorities
*ADD
*UPD
*DLT
*ALL
allows the user to perform all authorized operations (object and data) on
the object.
*CHANGE
*USE
*EXCLUDE
authority prevents the user from accessing the object even if *PUBLIC is
authorized.
To see the detail screen as shown below, press <F11>. Note that the owner of
"YOURLIB" has *ALL authority on the object.
Next, we need to allow the user access to the file "SRCFILE". Use
EDTOBJAUT to edit the authority on the file "SRCFILE". Type EDTOBJAUT
OBJ(YOURLIB/SRCFILE) OBJTYPE(*FILE) or use the prompt to fill in the parameters.
Press <F6> to add the user to the authorization list with *USE authority. This
will allow them to do perform various operations on "SRCFILE" including
copying members from the file. To allow them to copy the entire file (i.e.
"SRCFILE"), *OBJMGT must be granted. To do that, type "X" under "Mgt" in
the detail screen for that user. Note that the object authority changes from
*USE to USER DEF (meaning a customized authority).
To use GRTOBJAUT and RVKOBJAUT type the command and prompt <F4>.
Fill in the library name, object name, object type along with the user you are
granting authorities and the respective authority being granted. At any time
press <F1> for more help.
Additional Parameters
To file type . . . . . . . . . . *FROMFILE_ *FROMFILE, *DATA
VM/MVS class . . . . . . . . . . A A, B, C, D, E, F, G, H, I
Send priority . . . . . . . . . *NORMAL__ *NORMAL, *HIGH
The receiver will have to run the "Work with Network Files" (WRKNETF)
command to inspect their network files.
User . . . . . . . . . . . . : RCV_______
User ID/Address . . . . . . : RCV_______ MKTAS400
Type 1 in the "Opt" blank in front of the network file to receive and press
<F4>to prompt. The following screen will show up.
Fill in the "To data base file", "Library", and "To member" blanks with the
appropriate receiving file, library and member names and press <Enter>. Note
that the receiving file must already exist before trying to receive members.
Printing Procedure
When programs on the AS/400 produce output intended to be printed the
material does not go directly to the printer. Instead the output is bundled
together with other output in an object called an "output queue" (*OUTQ).
These sub objects are called "spooled files." To send these spooled files to a
printer, first you must work with your output queue; then, change the attributes
of the desired spooled file, specifying the correct print device name.
There are several ways by which spooled files are generated. Here are some:
To get a physical copy of a spooled file on your output queue, two facts must
be true. First, the spooled file must be placed on a started writer and second,
the spooled file must have a status of released. To work with your spooled
files on your output queue type WRKSPLF and press <Enter>. This screen allows
you to do many things with your spooled files.
Note: If this is the first time that you are using the WRKSPLF command, you
should change the "assistance level" for this screen. To do this press
<F21>and change the assistance level from "basic" to intermediate". This will
gives you more features on the screen. Try pressing the <F10>or <F11>keys
to obtain different views of your spooled files.
Typing 2 in the option field of spooled file in the WRKSPLF screen will change
the spooled file's attributes. The attributes that you will be interested in are the
"Print device" and "Save file".
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. The printer
writer names at MSU are:
Printer Name Width/Paper Printer Type Location
PRT01 132 Col. 11" Line Printer Morris Hall
VAXPRTS2 132 Col. 11" Line Printer MSU ACC
PS/2 printers 132/80 8.5" Dot Matrix 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.
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.
Typing 4 in the option field of spooled file in the WRKSPLF screen will delete
the spooled file from your output queue. Spooled files should be deleted as
soon as they are not needed to reduce clutter in your output queue.
Typing 5 in the option field of spooled file in the WRKSPLF screen will allow
you to view your spooled file.
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.
Use the <Field EXIT>key or <Tab>to move to the desired spool file.
Press <Enter> .
Press <Enter>.
This will bring you back to the work with spool file screen.
Press 2 <Enter>.
If the STS (status) is RDY or WTR the printer will print your spooled file. If the
status is HLD then release it by typing a 6 in the option field of the spooled file
and press <Enter>.
Common Problems
Note that the command keys used in this section are those of the PS/2
running PC Support.
If you have issued a command and it is taking too long finish it may be an
infinite, endless, loop. To stop your infinite loop:
If for some reason you have been disconnect from the system while executing
an infinite loop request the job may continue to execute. This will cause the
system to run very slowly. To end the disconnected job:
On a command line, type the "Work with Active Jobs" command:
WRKACTJOB and press <Enter> . The locally-defined alias for
WRKACTJOB, AJ, can also be used.
On the "Work with Active Jobs" display, type option 4 (End) against the
job that is causing the loop and press <F4>to prompt on the option. In
the "How to end" field, type in *IMMED i.e. to end the job immediately.
Press <Enter>.
Depending on the specific class that requires use of the AS/400 there is a
maximum storage quota allocated to your user profile. You can see this
information by typing: DSPUSRPRFusername. Because OS/400 retains every
version of a *PGM object that results from a compilation, your storage can be
used up very quickly. When you have exceeded (or nearly exceeded) your
storage quota and you try to start, for example, SEU, you may get an error
message "Error found on SEU command". To deal with this problem, you must
clear the *PGM objects from library QRPLOBJ. 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. The command will clear your objects out
regaurdless of the error.
The following discussion assumes that you already have a source physical file
in your current library. We will continue to use SRCFILE in library YOURLIB
for explanation. The reader must substitute the appropriate names for source
physical file and library, where applicable.
The first step is to to reach the 'Work with members using PDM' display. This
can be done by typing WRKMBRPDM YOURLIB/SRCFILE on any command line.
To create a data file member, you have to start the Source Entry Utility. Press
<F6> from the 'Work with members using PDM' display or type STRSEU on
any command line and press <F4>. The following screen shows up:
Start Source Entry Utility (STRSEU)
The Source type for a data file must be specified as PF, this type denotes
aPhysical File. For example, to create a data file called TESTDATA in the
source file SRCFILE in library YOURLIB, fill in the fields as shown:
The Edit display shows up. It is convenient to use the prompt facility for
defining the DDS source. The prompter helps you to supply the source
information in the correct format. Press <F4> to invoke the prompter and
<F12>to cancel it.
FMT PF .....A..........T.Name++++++RLen++TDpB......Functions+++++++++++++++++
+
*************** Beginning of data
*************************************
0001.00
****************** End of data
****************************************
Functions ___________________________
An explanation of the different fields shown above follows: The fields marked
with * are not commonly used, so for normal applications you may
conveniently ignore them.
Name_Type
Blank
Name
Type a record format, field, or key field name in this position. The
maximum length allowed is 10 characters, beginning in column 19.
Reference (*)
Length
Decimal_Positions
Use (*)
Type B or leave the field blank to indicate a field used for both input and
output.
Functions (*)
FMT PF .....A..........T.Name++++++RLen++TDpB......Functions+++++++++++++++++
+
*************** Beginning of data
*************************************
0000.01
0001.00 R RECFMT1
0002.00 FIELD1 10A
0003.00 FIELD2 5P 2
0004.00 K FIELD1
0005.00
****************** End of data
****************************************
Press <F3>and hit <Enter>to save the member TESTDATA. For more details
about exiting SEU refer to the section 'How to exit SEU'.
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. This can
be done by compiling the member we have just created. From the 'Work with
members using PDM' display, position the cursor at member TESTDATA, and
choose option 14 (compile). If the compilation is successful, the file
TESTDATA will be created in YOURLIB. Otherwise, look into your spooled file
(WRKSPLF) and identify the problem.
To load a data file, use the command UPDDTA (Update Data Area).
Type UPDDTA on any command line and press <F4>. The following screen
shows up:
Bottom
Supply the values for the data base file to be loaded and the library it is
contained in, and press <Enter>. For example, to populate our file TESTDATA
we would fill in the values as shown:
Bottom
Enter the values for different fields and press Enter>. To stop the process of
loading the data file, press <F3>and press < Enter>.
This section will only cover those aspects of screen design not related to
interfacing with applications. For information on this area, see the manual for
the language of the application source.
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 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.
To create the screen design member, issue the command STRSDA (for STaRt
SDA) from a command line. A menu of options will appear which allow you to
create a screen, create a menu, or test a design. Choosing the first option
brings the following screen:
Design Screens
Since no screen design exists yet, it is necessary to first create one using the
"5" option on the "Design option line". Also, a source file must be provided,
and a member specified. If the member does not yet exist, it will be created.
Finally, a record name must be given. Since each member can have several
records, a single screen design member could contain any number of
screens, with each one given a distinct record name. Once the information is
entered, the screen should look like this:
Design Screens
The "SOURCE TYPE" field may be left blank. It will default to the proper type
for SDA.
These options will start SDA on a screen named SCREEN1 in the member
SCRNMBR of file SRCFILE in library YOURLIB. Pressing <Enter> will bring
up the main SDA display. This is simply a blank "pasteboard" on which you
may place text and fields.
Use the Work Screen to design the display you are creating. On the Work
Screen you can add fields and constants, place fields you have selected from
a database, move, copy, shift, and remove fields, and add or remove
attributes and colors. You can also perform additional operations, such as
requesting extended field definition.
You can use the following function keys on the Work Screen:
F1=Help
Press <F1> to show the same information as the help key. <F1> is
active on all displays but does not appear in the function key area.
F3=Exit
F4=Prompt
F10=Database
Press <F10> to have the Select Data Base Files display appear.
F11=Switch
F12=Cancel
Press <F12>to save your work and continue to the Design Screens
display.
F14=Ruler
Press <F14>to place a vertical and horizontal ruler on the Work Screen
where you position the cursor. The ruler does not interfere with your
data. Press <F14>to remove the ruler. Defining fields on the ruler may
cause unpredictable results.
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.
F17=Print
Adding Fields
+BBB or +b(3)
+66.66 or +6(4,2)
+3.33E or +3(3,2)e
+99.999d or +9(5,3)D
Adding Constants
Use a double quotation mark to end one constant and start a new
constant while taking up only one position.
To add a MSGCON (MeSsaGe CONstant) field, type + followed by M.
To work with a MSGCON field, type ? in front of the field. When you
press Enter, the Define Message Constant display appears. Press <
F12>to return to the Work Screen.
Use the at sign (@) in pairs to delimit a DBCS (Double Byte Character
Set) constant. SDA will replace each pair with a shift in and a shift out
pair when you press <Enter>. You can then type DBCS data between
the delimiters. You cannot use a DBCS insert key on the Work Screen.
'xxx"YYY'
+MMM or +(M3)
The fields you select from a database file, appear on the bottom row of the
Work Screen. You move fields from the bottom line to your display by typing &
followed by the field number, if you are in multiple mode, and the column
heading position and pressing Enter. The fields begin in the position where
you type &. The following examples illustrate moving fields to your display:
Symbol
Single Field Multiple Field Field
Mode Mode Meaning
To add or remove display attributes or colors on the Work Screen, type one of
following commands (in uppercase or lowercase) in the position preceding the
field (the attribute byte of the field):
Command Command
Add Remove Attribute Add Remove Color
You can carry out the above operations by typing * in the position preceding
the field (the attribute byte of the field), pressing < Enter>, and working with
the field keyword displays that appear.
Reposition fields on the Work Screen by typing one of the following and
pressing <Enter>:
-, =
Type - in the position preceding the field (the attribute byte of the field)
and type = where you want the field to appear.
-, ==
Type - in the position preceding the field (the attribute byte of the field)
and type == where you want a copy of the field to appear.
-, -, ==
Type - in any position preceding the field, type - in any position after the
last field, and type == where you want a copy of the group of fields to
appear.
<<<, >>>
Type <<< in the position preceding the field (the attribute byte of the
field), or type >>> after the field (over the first attribute byte), to shift the
field left or right as far as the signs extend.
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), and over the entire field.
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.
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. You can
rename the field by changing the name on the last row.
Display MSGCON field definition
Type ? in the position preceding the field to show the Define Message
Constant display. You can change the message number, file, and library.
Type *DATE or *TIME to define special constants on the display where the
system date and time will be automatically substituted.
You can define fields for a subfile similar to nonsubfile fields with the following
considerations:
You can modify fields on the first record of the subfile. Anything you type
is assumed to be a definition of the first record.
Any field that you define for the subfile will appear the number of times
specified by the SFLPAG keyword.
Once the screen design is complete and <F3>is pressed, PDM returns to the
"Design Screens" menu shown above. 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. IF THIS OPTION IS NOT CHOSEN
AFTER THE SCREEN DESIGN IS COMPLETE, THE MODIFICATIONS WILL
NOT BE SAVED. Note that it isn't necessary to save a file after every
RECORD created; Several screens from a single member can be created
before compilation. However, the file must be compiled before exiting SDA.
Using the "6" option for a screen produces the following display:
F3=Exit F12=Cancel
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.
That file may then be used by user programs.
Before using the debugger, the source program must be compiled with the
*DEBUG and *SOURCE options. These will, respectively, 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 source output should be printed before starting the debugger,
as the compiler adds its own line numbers to the source which will be
necessary in referencing specific lines while using the debugger. The source
output is also useful as a hardcopy reference while the program is executing,
since the debugger does not list source lines as the program executes.
To specify these options at compilation time, 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. This will show the initial options screen for the compiler. To enter the
compiler options, it is necessary to prompt for more options by pressing
<F10>, which reveals the following screen:
Additional Parameters
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. Pressing
<Enter>once all options are entered will submit the compilation. After the
member has been compiled (assuming there are no errors in compilation,) the
source listing should be printed and used with the next steps.
2. Add breakpoints
where TEST is the program in library YOURLIB, that you intend to debug.
===> addbkp stmt(n1 n2 ... n10) where n1, n2 ... n10 are the statement
numbers where the breakpoint is to occur. You may specify 1 to 10 statement
numbers where the breakpoint should occur. For example, ' addbkp stmt(10
20 30) ' will set the breakpoints at statements 10, 20 and 30. The program
breaks before processing a statement specified as a breakpoint.
Once the breakpoints are set, the next step is to run the program using the
CALL command.
===> call YOURLIB/TEST
You will notice that the program stops execution when the breakpoint is
reached. From the 'Display Break Point' screen, you can check the values of
the program variables as explained below:
Press <F10>(command entry) on the 'Display Breakpoint' screen.
This will take you to the command entry screen. Display the program
variables with DSPPGMVAR command:
===> dsppgmvar VARNAME
Using the above command, you can check for as many variables as you
want to from the command entry screen. To exit the command entry
press <F3>. Control is transferred back to the breakpoint.
Once you are done with debugging, it is very important that you end the
Debugger, before you issue any other command. The command to do it is:
===> enddbg
The following should assist you in setting up PC-VT V9.0 for use with the IBM
AS/400 via a port selector connection.
Confirm that your copy of PC-VT is V9.0. This may be confirmed by starting
PC-VT and noting the version number on the initial screen or by entering the
setup A screen. Versions prior to V9.0 will not support the cursor keys during
an AS/400 session.
3. You should now change the feature switches, the blocks of 4 characters
at the bottom of the screen, so that they match those given below. 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.
4. Feature switch settings:
5. 1 2101 2 0X11 3 0000 4 1110 5 0001 6 0110 7 1X10 8 000X 9 XXXX 0
XXXX
6. You should next set the modem speed to 9600. This may be done with
menu option 7, Select Modem Speed.
7. Next set the data bits to 8 and the stop bits to 2. This may be done with
menu option P, Select Data/Parity Bits.
8. Finally, 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. This may be
done by pressing the S key.
9. 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.
Getting Started
3. There are several courses in online education but the most useful ones
in terms of using the AS/400 are:
4. Select 4 to select an audience path for the course <Enter>. You can
select all modules or one of the listed categories. The COMS 175---
Command Language audience path is customized for the CS175 class.
Type 1 to select one of them <Enter>.
5. Next, 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.
This can consist of questions from the module or examples that you walk
through, or a combination of both. For the CS175 class, when you are finished
with the quiz, obtain a screen print of the screen that tells you how many you
answered correctly on the first try. If you forget to get a screen print, you need
to go through the quiz again to get to that screen.
Press the <Reset>(at the bottom left hand corner of the keyboard), to clear
this message and continue your session.
Exit online education by pressing a series of <F3>keys until you have reached
a command line.
To check your screen print type WRKSPLF (work with your spool files). Your most
recent screen print will be located at the bottom of the list and it will be titled
QSYSPRT.
To assign it to a printer, type a 2, change, and press <Enter>. This will change
the status from not assigned to a printer, to assigned to a printer.
At the Printer to use prompt, type the name of the printer you would like to
send your printout to and press <Enter>. To see a list of all started printers,
press <F4>on this line. This will give you a list of all started printers and from
here you can select one by typing a 1 on the line before the desired printer.
Press <Enter> to select this printer. You will return to the screen where you
pressed <F4>. Press <Enter>again to accept this printer.
For more information on printing, see the section "Printing Procedure" in this
manual.
1. Log in.
STRPDM
WRKLIBPDM
WRKOBJPDM
WRKMBRPDM
3. In PDM: <F6> - create a member.
4. Compile the source member to attain object and compiled. spool file.
1. WRKSPLF
1. CALL library/programname
4. Correct error.
5. Go to step III.
2. Log off.
Reader's Comments
Use this form to tell us what you think about this manual. If you have found
errors in it, or if you want to express your opinion about it (such as
organization, subject matter, appearance) or make suggestions for
improvement, this is the form to use.
Be sure to print your name and address below if you would like a reply. 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.:
Your Address:
Your Comments:
Version 2.06