Front Cover: What's New in IBM I 7.3 and IBM POWER8 Systems
Front Cover: What's New in IBM I 7.3 and IBM POWER8 Systems
Front Cover: What's New in IBM I 7.3 and IBM POWER8 Systems
cover
Front cover
Course Exercises Guide
What’s New in IBM i 7.3 and IBM POWER8
Systems
Course code OS020G ERC 1.0
September 2016 edition
Notices
This information was developed for products and services offered in the US.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative
for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not
intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate
and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this
document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein;
these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s)
and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an
endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those
websites is at your own risk.
IBM may use or distribute any of the information you provide in any way it believes appropriate without incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other
claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those
products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible,
the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to
actual people or business enterprises is entirely coincidental.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
© Copyright International Business Machines Corporation 2016.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
V11.0
Contents
TOC
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Exercise 1. IBM i Access Client Solutions: Explore the latest features . . . . . . . . . . . . . . . . . . . . 1-1
Part 1: Launching IBM i Access Client Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Part 2: Check for updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Part 3: Integration with Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Part 4: Launch Run SQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Part 5: Insert from examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Part 6: Other features of Run SQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Part 7: Other Features of Access Client Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this training
document, are official trademarks of IBM or other companies:
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
AIX® DB™ DB2®
developerWorks® DRDA® DS8000®
EnergyScale™ Express® FlashCopy®
FlashSystem™ HyperSwap® IBM Connections™
IBM Watson™ Insight™ Lotus®
Notes® Power Systems™ Power®
PowerHA® PowerVM® PowerVP™
POWER6® POWER7+™ POWER7®
POWER8® PurePower System™ Rational®
Redbooks® Redpaper™ System i®
System Storage® SystemMirror® WebSphere®
400®
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or both.
Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
VMware and the VMware "boxes" logo and design, Virtual SMP and VMotion are registered
trademarks or trademarks (the "Marks") of VMware, Inc. in the United States and/or other
jurisdictions.
Social® is a trademark or registered trademark of TWC Product and Technology, LLC, an IBM
Company.
Other product and service names might be trademarks of IBM or other companies.
pref
Exercises description
This course includes the following exercises:
• Exercise 1: IBM i Access Client Solutions: Explore the latest features
• Exercise 2: DB2 for i temporal tables and auto-generated values
• Exercise 3: Authority Collection
In the exercise instructions, you can check off the line before each step as you complete it to track
your progress.
Most exercises include required sections, which should always be completed. It might be
necessary to complete these sections before you can start later exercises. If you have sufficient
time and want an extra challenge, some exercises might also include optional sections that you can
complete.
EXempty
Overview
IBM i Access Client Solutions (ACS) has been enhanced with many new features. This lab exercise
reviews the latest enhancements.
Throughout this lab exercise, the instructions will refer to the IBM i Lab partition that you will be
interacting with.
Objectives
At the end of the exercise, you should be able to:
• Launch Access Client Solutions
• Launch Run SQL Scripts
• Use Run SQL Scripts to explore IBM i Services
• Explore the integrated file system tasks
• Explore printed output
EXempty
Exercise instructions
You will note there is already a system configuration set up for the lab server. You can see the
IP address in the System drop-down list.
EXempty
Part 2: Check for updates
IBM i Access Client Solutions is updated frequently. To make it easier to determine if there is a
more recent version, a Check for Updates feature has been added.
__ 3. Click on the Help menu item. the drop down now has a Check for Updates option.
__ 4. Click Check for Updates. This will quickly tell you whether updates are available.
__ 7. Accept the security warnings; you will need to allow the browser to proceed to the web site.
__ 8. The Navigator main window will display and you will see the dashboard. Note that you did
not have to log into Navigator.
__ 9. Minimize the Navigator window.
__ 10. Minimize the Navigator requests window.
EXempty
Part 4: Launch Run SQL Scripts
Run SQL scripts provides an interface to run SQL statements that was previously only in the
System i Navigator client.
__ 11. From the main IBM i Access Client Solutions window, take Run SQL Scripts.
__ 12. You should not have to sign in again since you did that when you started the 5250 emulator.
__ 13. You will now see the Run SQL Scripts panel appear. You should see that it automatically
connected to the lab IBM i partition.
You should see a message appear in the lower half of the Run SQL Scripts window that you are
connected to the relational database on the lab system and you will also see the fully qualified
job name of the database server job (QZDASOINIT) your requests will run in.
__ 14. You can compose your SQL statement in the top portion of the window. This lab will use
various IBM i Services as examples for SQL requests.
EXempty
__ 15. Type in the following SQL statement:
select * from QSYS2.LIBRARY_LIST_INFO
__ 16. From the Run menu, select to run the selected statement.
__ 17. Review the results. It should look something like the following:
__ 18. Try a few additional simple examples and review the results:
select * from QSYS2.SYSTEM_STATUS_INFO
select * from QSYS2.SYSTMPSTG
select * from QSYS2.JVM_INFO
EXempty
__ 19. From the Edit menu item, take the Insert from Examples… option.
__ 20. A new window, Examples will open. From the Examples drop down, you will find IBM i
Services at the very top of the list.
EXempty
__ 21. There are many IBM i services to choose from.
__ 22. Select Storage – Temporary storage consumption, by active jobs, then click Insert.
__ 23. Click on the SQL statement that was inserted to have the cursor be in the statement and
then take Run à Selected to run the service. Review the results.
__ 24. Explore other example IBM i services.
EXempty
Feel free to take any of these menu items and explore results.
__ 26. If you view the job log, note that you can double click on a message and see the full
second-level message text.
__ 27. If you select “Job Details” you will automatically be connected to a Navigator browser
window where you will find the “Work with a Job” task for your QZDASOINIT job.
__ 28. Review the Options menu. You will see there are various options to select; for example,
you can use a double-click of your mouse to run an SQL statement.
EXempty
__ 29. Review the Connection menu.
__ 30. Take the option JDBC Settings… and review all the settings that are available.
__ 31. Visual Explain has been added to Access Client Solutions. Select the last SQL Statement
you ran and then select VisualExplain > Explain.
__ 32. You will see Visual Explain is launched in its own window. Close all the windows related to
Visual Explain and Run SQL scripts.
EXempty
__ 34. Under the Actions menu item, you will find the new features to work with files in the IFS.
EXempty
__ 37. Select to display output from all users and then click OK. You should see at least one
spooled file.
__ 38. Right click on that spooled file and review the options that are available. You will observe
that ACS has the ability to manipulate spooled files. Not only can you view them, but you
can hold, release, move, and delete them.
End of exercise
EXempty
Overview
IBM i 7.3 included many DB2 for i enhancements including support for temporal tables. This lab
contains two modules. The first highlights how to turn an existing table into a temporal table. The
second illustrates how to write time based queries to access a temporal table. This lab uses the
ACS Run SQL Scripts support which was already covered in the course lectures and labs.
Note that this lab does not show a full implementation of temporal tables. It is important to seek
guidance from IBM before implementing this new functionality in a production environment.
Throughout this lab exercise, the instructions will refer to the IBM i Lab partition that you will be
using.
Objectives
At the end of the exercise, you should be able to:
• Convert an existing table to a temporal table
• Write time based queries against a temporal table
EXempty
Exercise instructions
Temporal Tables
The following will guide you through the process of creating and using temporal tables. Some SQL
statements will contain the value ??? which indicates that you need to complete the syntax of the
SQL statement using the information in the course lecture charts. Note that your replacement for
??? may consist of a single keyword or an entire clause in SQL.
The answers to the questions in the lab exercise are found in Part 3. Answers to lab questions.
EXempty
EXempty
__ 2. Once you have connected, use the Run SQL Scripts File -> Open to open the file named
DB2 Lab 1 in the directory OS020G and subdirectory DB2.
__ 3. Execute the following SQL statements after replacing <xx> with your two digit team
number. The first statement drops the schema for your team. If this statement fails, move
to the next statement. CREATE SCHEMA will create an SQL schema corresponding to
your team name. Remember a schema is implemented as an IBM i library containing some
additional objects. SET SCHEMA establishes a default schema for your session. Note that
this statement must be repeated anytime you reconnect to the server.
DROP SCHEMA OS20T<xx> ;
CREATE SCHEMA OS20T<xx> ;
SET SCHEMA OS20T<xx> ;
__ 4. Now run the following statement to create the address table. It will replace any existing
instance of the table and delete any rows in the previous instance. The table being created
will be a copy of a table provided for the course.
CREATE OR REPLACE TABLE address
AS (SELECT * FROM OS020GDB2.address) WITH DATA
ON REPLACE DELETE ROWS ;
__ 5. Run this SQL statement to look at the definition and contents of the address table you just
created.
SELECT * FROM address ;
EXempty
In the following steps, we’ll convert this table to a temporal table. Remember that you need to
replace ??? with the correct syntax from the lecture materials.
__ 6. Remember that temporal tables need columns defined to indicate the “birth” and “death” of
row images plus a column needed to manage transaction boundaries under commitment
control. Complete and run the following SQL statement to add the necessary columns to
the employee table.
ALTER TABLE address
ADD COLUMN starting_date ???
GENERATED ALWAYS AS ???
ADD COLUMN ending_date ???
GENERATED ALWAYS AS ???
ADD COLUMN transaction_id ???
GENERATED ALWAYS AS TRANSACTION START ID
ADD PERIOD SYSTEM_TIME (???, ???) ;
__ 7. Complete and run the following SQL statements to create the address_history table and to
configure the temporal table.
CREATE OR REPLACE TABLE address_history ??? address
ON REPLACE DELETE ROWS ;
ALTER TABLE address
ADD ??? TABLE address_history ;
__ 8. Run the following INSERT, UPDATE, and DELETE statements.
INSERT INTO address
VALUES (703, 'Creative Entertainment', '1100 Leisure Way', 'Miramar',
'FL', '33027');
UPDATE address
SET address='Havenwood Drive' city = 'Milwaukee' state='WI'
postal_code='xxxxx'
WHERE address_id = 644 ;
DELETE FROM address WHERE address_id = 907 ;
__ 9. Run the two following SELECT statements to look at the contents of the address and
address_history tables. Answer the questions that follow.
SELECT * FROM address ;
SELECT * FROM address_history ;
Questions
• Do either of the tables show an entry corresponding to address_id 644, Richter Printing?
EXempty
• What values do you see for starting_date and ending_date?
EXempty
Part 3: Answers to lab questions
Answers to questions in Part 1: Creating a temporal table
Completed SQL statements are also in the folder OS020GDB2/Reference.
Question in Part 1 step 7:
Remember that temporal tables need columns defined to indicate the “birth” and “death” of row
images plus a column needed to manage transaction boundaries under commitment control.
Complete and run the following SQL statement to add the necessary columns to the employee
table.
ALTER TABLE address
ADD COLUMN starting_date TIMESTAMP(12) NOT NULL
GENERATED ALWAYS AS ROW BEGIN
ADD COLUMN ending_date TIMESTAMP(12) NOT NULL
GENERATED ALWAYS AS ROW END
ADD COLUMN transaction_id TIMESTAMP(12)
GENERATED ALWAYS AS TRANSACTION START ID
ADD PERIOD SYSTEM_TIME (starting_date, ending_date) ;
EXempty
Answers to questions in Part 2: Writing time based queries
Completed SQL statements are in the folder OS020GDB2/Reference.
Question in Part 2 step 4:
Modify and run the following SQL statement to determine employee 30’s salary on February 28,
2015.
SELECT emp_id, emp_name, salary
FROM salary FOR SYSTEM_TIME AS OF '2015-02-28 00:00:00.000000000000'
WHERE emp_id = '000030' ;
What was the employee’s salary at that point in time? 39780.00
Question in Part 2 step 5:
Modify and run the following SQL statement to determine employee 30’s salary history between
February 28, 2015 and the present time
SELECT emp_id, emp_name, effective_start, effective_end, salary
FROM salary FOR SYSTEM_TIME FROM '2015-02-28 00:00:00.000000000000'
TO CURRENT_TIMESTAMP
WHERE emp_id = '000030'
ORDER BY effective_start ;
How many different salary values did you observe in the data? Three values.
They were 39780.00, 42564.60, and 43841.53.
End of exercise
EXempty
Overview
This exercise gives the student an opportunity to work with Authority Collection.
Objectives
At the end of the exercise, you should be able to:
• Work with Authority Collection to collect data
EXempty
Exercise instructions
Part 1: Authority Collection data: Example
__ 1. On your workstation, open IBM i Access Client Solutions (ACS). Under the General tab,
select 5250 Emulator (twice) to bring up two (2) 5250 sessions.
__ 2. On the first 5250 session, signon as test user ACUSERxx where xx is your student number.
Your password is the same as your test user ACUSERxx.
__ 3. On the second 5250 session, signon as admin user ACADMNxx where xx is your student
number. Your password is the same as your test user ACADMNxx.
__ 4. On the second 5250 session (User ACADMNxx), enter the following command where xx is
your student number:
STRAUTCOL USRPRF(ACUSERxx) LIBINF(*ALL) INCFSOBJ(*ALL) DLTCOL(*YES)
__ 5. On the first 5250 session (User ACUSERxx), enter the following command:
CALL PGM(ACTESTLIB/AUTCOL)
__ a. On “Display Physical File Member” panel, press F3 to exit.
__ b. On “Display Data Area” panel, press F3 to exit.
__ 6. From IBM i Access Client Solutions (ACS) Database tab, select Run SQL Scripts.
__ 7. From the Run SQL Scripts session, enter the following where xx is your student number:
SELECT * FROM qsys2.authority_collection where user_name = ‘ACUSERxx’
__ a. Click on Run then Selected at top of session.
__ 8. Authority collection data is displayed for user ACUSERxx.
EXempty
Part 3: File System objects: Example
__ 13. On the first 5250 session (User ACUSERxx), enter the following command where xx is your
student number:
EDTF STMF(‘ACADMINDIR1/ACSTMFxx’)
__ a. On Edit File panel. Press F3 to exit.
__ 14. From the Run SQL Scripts session, enter the following where xx is your student number:
SELECT * FROM qsys2.authority_collection where user_name = ‘ACUSERxx’ and
system_object_name IS NULL
__ a. Click on Run then Selected at top of session.
__ 15. Authority collection data is displayed for user ACUSERxx, all file system objects.
Part 6: Cleanup
__ 22. From the Run SQL Scripts session, click on File then Exit at top. In Inquiry Message pop-up
box asking “Save changes,” click No.
__ 23. On the first 5250 session (User ACUSERxx), enter the following command:
SIGNOFF
EXempty
__ 24. On the second 5250 session (User ACADMNxx), enter the following command where xx is
your student number:
ENDAUTCOL USRPRF(ACUSERxx)
DLTAUTCOL USRPRF(ACUSERxx)
SIGNOFF
__ 25. Close both ACS 5250 sessions. In pop-up box asking “Save current config,” click on No.
End of exercise
backpg