Home > 2009 Fall BTO130 > BTO130 Lab 1 (due Thu Oct 8 / Fri Oct 9)

BTO130 Lab 1 (due Thu Oct 8 / Fri Oct 9)


BTO130 Lab 1
Section A: Due on Thursday October 8 at 11:40am
Section B: Due on Friday October 9 at 9:50am

 

BTO130 Lab 1 (IBM Power Systems and IBM i operating system)

Assigned on Tuesday October 6
Due on Thursday October 8 at 1140am for Section A students, and Friday October 9 at 9:50am for Section B students
Grade value is 2% of your final course grade

Write your answers in the spaces provided, and return this document to your professor.

 

Objectives

This lab has the following objectives:

  • To familiarize you with signing on to the IBM i operating system
  • Using the keyboard effectively
  • Finding and running commands
  • Look at database and "Query" programs

This document will be printed and distributed in class. You will need to write answers in the spaces provided below.

Do your own work. Follow the College’s Academic Honesty policy.

 

Getting started

Power on your computer, and start the normal Windows Vista image. This image has the "terminal emulation" software you need to connect to the IBM Power Systems server.

Your professor will give you credentials at the beginning of today’s class session.

On the lab PC’s desktop, locate the "System i" folder, open it, and run the "ZEUS.WS" icon.

A dialog titled "System i signon" appears. Enter the credentials you were given, and click OK. Re-size the resulting window so that its appearance is pleasing to you.

To see a FULL SIZE image for any of the thumbnail images below, click on the image, and it will open in a new browser tab or window.

 


 

Signon procedure

screen1clippedsmall BEFORE you log in, look at the Sign On screen. What are the three identification values in the top right corner?

System: ____________ 
Subsystem: _____________ 
Display: ______________

System is the name of the server which identifies it on the network. Subsystem is the operating system’s environment of resources dedicated to interactive processing. Display is the unique name assigned to your interactive session.

The basic IBM i user interface is known as a block mode terminal. No, it is not GUI. The TAB key should be used to move from one input field to the next. Press Enter when you are ready to return the screen to the system for processing. It’s conceptually similar to using web forms.

Input Error Correction

BEFORE you log in, let’s get the topic of input error correction out of the way. The screen will appear to be ‘stuck’ if you accidentally type someplace outside an input field.

Using an ARROW key, move the cursor outside a text input field which usually appears underlined. Type any letter. You will see the message, ‘Cursor in protected area of display’ at the bottom of your screen (it may be in really small text at the bottom of the window – in an area called the OIA, operator information area – or may appear on the last line of the terminal display). As well, you should see an ‘X’ in the bottom left hand corner of the screen. This means the keyboard is "input inhibited". The terminal does not know how to process your input so it stops you from continuing. To clear the problem, press the ESC (Escape) Key. Then, use the TAB key to move the cursor position to the nearest input field.

The system allows you to move the cursor to a non-input capable area of the screen to support cursor sensitive help. You can get help at any time on any IBM i screen by locating the cursor on what you are interested in (use the Arrow keys or click the mouse) and pressing the F1 key.

That annoying Scroll Lock key

The arrow and paging keys will not work if Scroll Lock is on. (Scroll Lock is a kludge for dumb character green screens.) Demonstrate the problem: press the Scroll Lock key (upper right) so that the scroll lock light is on (far upper right). Now press one of the arrow keys. What happens? Turn off Scroll Lock by pressing the key again. Now try the arrow key once more. It should work now! Similarly the page up and page down keys will not work if the scroll lock is on when using screens with paged content. For more information, see iSeries Terminal Keyboard Mapping.

OK, let’s sign on

ProgrammingInput your user id (BT130Ann), press TAB, type the password, then press Enter to sign-on.

Note the ‘X’ on bottom of screen which indicates that your request is being processed. If you get stuck for some reason, press the Esc key, and use the Tab key to move to the text input fields. Press Enter only when you want the system to process the whole screen.

The first time you sign on, you will see a series of screens advising you of acceptable use policies and requesting your name, etc. to associate with your UserID … please read the screens and enter the required information.

The next screen will be the Program Menu (the default starting point whsen you sign on next time). Look at the top left corner of the screen. What does it say?

_____________________________________ 
(it’s the name of the menu) 

 

Run a program

This exercise helps familiarize you with the keyboard. On the command line, enter the command following command and press Enter (upper or lower case doesn’t matter here):

CALL IBC233LIB/INTROLAB

Follow the instructions on the screen. Practice with this program until you are comfortable with the various keys.

Follow the instructions on the screen. If you need to, use the "Roll" (Page Up/Down) Keys to scroll the content.

 
For many people new to IBM i, all the screens look the same at first. This is because they employ common layout standards with similar navigation elements, e.g. F4 to prompt, F3 to exit, F12 to return to a previous screen. Please give careful attention to the title of every screen when it is first displayed.

Windows employs similar standards for title bars, menus, and the use of function keys and Ctrl / Alt / Shift key shortcuts. Windows does have the advantage of popping up a new window for a new function so you can still see what came before. Most IBM i screens are replaced when a new function is started so you have to rely on your memory of where you just came from and how you got here.

However, to a new Windows user, almost all icons are meaningless and tree-structured menus are a mystery. All operating systems need some getting used to. There are actually a few windowed interfaces to the IBM i. System i Navigator and Websphere Development Studio Client provide this. The interface you are using now is still used by a lot of IBM i / System i professionals.

 

Change your password

i5/OS Main MenuOn the command line at the bottom of the screen, key in GO MAIN to go to the MAIN menu and press Enter. This takes you to the top level menu used to navigate the operating system. Note the name of this menu in the top left corner.

On the command line, type the number of the menu option to select User Tasks and press Enter. On the next menu, select the option to change your password. (Once you get to know the command structure, you can run commands directly by name.)

The next part is a little tricky because you will be keying into non-displayed fields. Just watch where the cursor is.

Your Current Password is the one you were given on the sticky label. Key it and press TAB to move to the New Password field. Your Password should be at least eight characters long and not easily guessed. Your password must start with a letter. Type it in. Press TAB and key the new password again. Press Enter. Note the message displayed at the bottom of the screen. It will confirm your success or alert you to a problem.

 

Run an application

This exercise demonstrates a simple user application. On the command line, enter the following command and press Enter:

CALL IBC233LIB/EDITCODES

At the prompt enter ten twos 2222222222 and press the plus sign on the numeric keypad to right justify your numbers. Press Enter.

This screen informs us about edit codes. The information on this screen will be useful later if you do more work on IBM i. Don’t worry about understanding how edit codes are used.

For now we are learning about the field exit key, the field negative key and the F3 key which are all commonly used in "green screen" applications. You should be able to locate the following on your screen:

Enter value: 2222222222 No edit code used: 002222222222

N 22,222,222.22

What function key is available to exit this running program? ________________

Do not press this key. Press Enter instead to place you at the screen allowing you to enter a number.

Try Pressing F3. Since it is not enabled for this screen your screen should freeze with an “X” showing at the bottom and a message should show saying “Function key not allowed”.

Press either the Ctrl or Esc key to reset your session.

 

Finding commands

Every IBM i command can be found on a menu somewhere in the operating system. You don’t have to memorize commands and their syntax. You just need to know how to find commands. Let’s send messages to our friends.

First, ask your friend for their user ID (BT130Ann) ________________

Then, we will look for the Send Message command. Move your cursor to the command line, and press F4 (to prompt).

You’ll be presented with the MAJOR menu. Look at the top left hand corner of the screen to verify.

Option 2 allows you to find commands using a verb or an action. We know that we want to send a message, so the verb is SEND.

Option 3 allows you to find commands using a subject or noun. We want to send a message, so the subject is MESSAGE.

Type option 2 and press enter to display the VERB menu. This menu categorizes all commands by verbs. The More … at the bottom right-hand corner of the screen means that there are more options available if you press the page down key. Press the page up/page down keys until you find the option for SEND commands.

What is the option number? _______________________. Type in the option number and press Enter.

Menu CMDSND is the menu that lists all SEND commands. Find the option that will allow you to Send Message.

What is the option number? _____________________. Type in the option number and press Enter.

You now see the SNDMSG command entry screen. Fill in the blanks. Type the message that you want to send in the message text field. Type your friend’s user ID in the user profile field. Press Enter when you are done. Press F9 to retrieve the command that you just executed. What was the exact syntax?

______________________________________________________________

IBM i programmers usually memorize this command through repetition. They usually type SNDMSG and press F4, fill in the blanks and press Enter.

Is your Message Waiting notice/indicator on? Look at the bottom of your screen. The MW means that you have a message waiting.

Message Waiting

The command to display your message is DSPMSG. What do you think DSPMSG stands for? How would you find it if you didn’t remember the command?

______________________________________________________________

During the lab period, anytime that you see the message waiting light, feel free to use the DSPMSG command to view the message and the SNDMSG command to respond.

 

Library lists

images[1] A library list is the IBM i’s version of a search path. There are approximately 5,000 libraries on ZEUS. Searching through all of these libraries every time would be very time consuming even for as powerful a server as ZEUS. Display your library list using the DSPLIBL command. You should see a screen with a list similar to the one shown on the right.

At Seneca College, our library lists are all similar. The first five libraries are required for the operating system. SYS means system.

The library BT130A03 (in the case of the screen shot) is the CURrent library, of this person’s default library.

What is your current library? _____________________________________

QGPL (Q General Purpose Library) is a library that everyone shares. It’s where we put objects that we want to share.

Everyone has their own QTEMP. It’s similar to the TEMP directory on your PC. It disappears when you log off.

The most important library to the operating system is QSYS. This is where the allocation table of all of the other libraries on the system is stored. This library is similar to the root directory on your PC. IBM chose the letter ‘Q’ to start all of its defined names because the letter ‘Q’ is the least-used letter of the alphabet!

Please add the library IBC233LIB to your library list, by following these steps:

  1. Press enter or F3 to return to the command line.
  2. At the command line, type the command ADDLIBLE and press F4.
  3. Type IBC233LIB in the library parameter of this command, and press enter.

Try the DSPLIBL command again. What part of your library list did this command change? ______________________________________________

Other useful library list commands are:

RMVLIBLE – try this command at the command line and press F4. Move your cursor to the screen title and press F1 for help.

What part of the library list does this command alter? ______________________________________________

Repeat the same process with the following commands and write down what part of the library list is changed by the command.

This command… …changes this part of the library list
EDTLIBL  
CHGCURLIB  
CHGLIBL  

Make sure that IBC233LIB is still on your library list using the DSPLIBL command. If you accidentally removed it from your list, use the ADDLIBLE command again to put it back on. Don’t worry about messing up your library list. It’s deleted when you signoff.

Given that an object is anything that takes up space, has a description, and is persistent (i.e. not of a temporary nature), is a Library List an object?

______________________________________________________________

 

The IBM i database and SQL

You will be studying SQL (Structured Query Language) in other courses.  SQL is available on the IBM i, and is integrated with the built-in database called DB2/UDB ( for Universal Database).

To start the SQL environment, at the command line, enter STRSQL.

Now let’s explore the data in a database file.  Type SELECT and press F4 to prompt for parameters. Fill in the fields as follows:

FROM files:              QGPL/STUDENTSL1
SELECT fields:          With the cursor in this input field, press F4.
Type numbers (10,20,30 …) to select and sequence all the fields

Press Enter twice, to return to the STRSQL home screen, and to execute the query.

Each row is a record in the file and each column is a field. How many records are displayed in the STUDENTSL1 file?_________________

Press Enter after viewing the file’s contents.  Press F3 to exit the SQL environment and accept the default option "1" on the "Exit Interactive SQL" screen.

 

Work with objects

Work with Objects Using PDMThe WRKOBJPDM command is similar to the dir command in Windows and the ls command in UNIX.

At the command line, type WRKOBJPDM and press Enter. Your screen should be similar to the one at the right. You should only see one object. The object name should be your USERID and the type should be *OUTQ.

Press F23 – (SHIFT + F11). What happened to the screen?

______________________________________________________________

The options are what you can type in the OPT column beside an object. Press F24 – (SHIFT + F12). What happened to the screen?

______________________________________________________________

Type 12 beside your *OUTQ object. The *OUTQ object stores all of your spooled files (reports ready to be printed). Display the report(s). How do you think the report(s) were created?

______________________________________________________________

 

System Values

System Values is a table stored in the library, QSYS that help us configure the IBM i for a company. Look at ZEUS’s system values using the WRKSYSVAL command.

Find the system value: QSYSLIBL and display its contents. Where have you seen this list before?

______________________________________________________________

Now look for the system value QUSRLIBL and display it’s contents? Where have you seen this list before?

______________________________________________________________

What part of the library list is missing?

______________________________________________________________

At Seneca, we build our library lists using a combination of system values and our user profile. Display the contents of your user profile using the DSPUSRPRF (DiSPlay USeR PRoFile) command. What’s your current library set to?

______________________________________________________________

 

Conclusion and "Sign Off"

Hope you enjoyed your tour of the IBM i. To end your session, type SIGNOFF on any command line.

Your account will be active on the system for the remainder of this semester. Feel free to explore!

Advertisements
Categories: 2009 Fall BTO130
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: