Download 97866533-Mastering-IBM-i-Mcpress-2011-Ed1.pdf PDF

TagsIbm Db2 Ibm System I Command Line Interface Ibm Rpg
File Size13.8 MB
Total Pages953
Table of Contents
	1: Communicating with the System
		The System
		IBM i Objects
		Types of Jobs
		Control Language (CL)
		System Values
		Licensed Programs
		User Profi le
		User Interface
		Menu Screens
		Prompt Entry/Command Prompt Screens
		Using Help
		List or Work-With Screens
		In Summary
		Key Terms
		Review Questions
		Lab 1
	2: Using CL
		CL Commands
		Control Language Syntax
		Menus of Commands
		The GO Command
		Library Lists
		In Summary
		Key Terms
		Review Questions
		Lab 2
	3: Objects
		The IBM i Object-Based Architecture
		Types of IBM i Objects
		Requesting an Object
		Qualifi ed Names
		Library-List Commands
		Locating an Object
		Storing Objects
		Simplifi ed Batch Work Management
		In Summary
		Key Terms
		Review Questions
		Lab 3
	4: Handling Spooled Files
		Printer Files
		Printer Writer
		Changing Writers
		Changing Spooled Files
		Clear Output Queue
		Assistance Levels
		In Summary
		Key Terms
		Review Questions
		Lab 4
	5: Describing a Database File
		File Varieties
		Program-Described Files
		Externally Described Files
		In Summary
		Key Terms
		Review Questions
		Lab 5
	6: Creating and Using an Externally Described Database File
		More About SEU
		Compiling the File Description
		Displaying an Object’s Description
		Data File Utility
		In Summary
		Key Terms
		Review Questions
		Lab 6
	7: Introduction to Query
		What Query for i5/OS Does
		Starting Query for i5/OS
		Working with Queries
		Defi ning a Query
		Refi ning Your Query
		A Conceptual Foundation for Joining Files
		Creating a Join Query
		Specifying the Join Relationship
		In Summary
		Key Terms
		Review Questions
		Lab 7
	8: Using Logical Files
		Physical Files and Access Paths
		Logical Files
		Creating a Logical File
		Creating Join Logical Files
		Multiple-Format Logical Files
		In Summary
		Key Terms
		Review Questions
		Lab 8
	9: Additional Database Facilities
		Creating a File (Review)
		Changing the Source DDS
		Recompiling Programs and Queries That Use a Changed Physical File
		Dealing with Based-On Logical Files
		Using CHGPF to Modify a Physical File
		Database File-Level Security
		In Summary
		Key Terms
		Review Questions
		Lab 9
	10: Using IBM i Navigator
		Introduction to IBM i Access
		Accessing Help
		Creating a Connection to the System
		Basic Operations
		Work Management
		File Systems
		In Summary
		Key Terms
		Review Questions
		Lab 10
		Review Questions
	11: Using Remote System Explorer
		Getting Started
		In Summary
		Key Terms
		Review Questions
		Lab 11
	12: Using Screen Designer and Report Designer
		Getting Started
		Creating a Display Screen
		In Summary
		Key Terms
		Review Questions
		Lab 12
	13: Introduction to SQL
		A Short History of SQL
		Introduction to SQL Terms
		Introduction to SQL
		Interfaces Used to Enter SQL Commands
		Starting the Run SQL Scripts Interface
		SQL Syntax
		File Maintenance Using SQL
		Using SQL Assist/Prompt
		In Summary
		Key Terms
		Review Questions
		Lab 13
	14: Using IBM i Access for Web
		Introduction to IBM i Access for Web
		In Summary
		Key Terms
		Review Questions
		Lab 14
	15: Introduction to DB2 Web Query for i
		DB2 Web Query for i
		Query for i5/OS Limitations
		DB2 Web Query Features
		Getting Started with DB2 Web Query
		Introducing InfoAssist
		Creating the Profi t Margin Inventory Report
		Creating a Profi t Margin Chart
		Creating a Compound Document
		Key Terms
		Review Questions
		Lab 15
	16: Getting Started with CL Programming
		CL Review
		CL Program Uses
		Advantages of CL Programs
		Creating CL Programs
		Using RDP to Enter CL Source
		CL Program Structure
		Designing the Start-Up Program
		Entering the Program
		Finishing the Start-Up Program
		Creating a CL Program
		In Summary
		Key Terms
		Review Questions
		Lab 16
		Lab 16 Source Listings
Document Text Contents
Page 2

MC Press Online, LLC
Ketchum, ID 83340

Jim Buck

Jerry Fottral

Jim Buck and
Jerry Fottral

The Only IBM i book you
will ever need. Your best
resource for today’s IBM i.


Page 476

Chapter 9 Additional Database Facilities • 461

Figure 9.33: Rename Objects Screen

Give fi le STUPF a new name of OLDSTUPF, and then press Enter. You should be
returned to the PDM screen. The message at the bottom of the screen should tell you
that the rename was successful.

Now use the Display option once again to check the description of logical fi le
STULF1. Specifi cally, notice the fi le named under Files accessed by logical file. As
you can see, the name has been changed to OLDSTUPF, the renamed physical fi le
accessed through logical fi le STULF1.

Now press Enter or F12 to return to the Work with Objects Using PDM screen.
9.6. Choose the Work with option for your source physical fi le, QDDSSRC.
From the Work with Members Using PDM screen, edit source member STUPF. Insert

a fi eld called ACTBAL (account balance) right after the FNAME fi eld. (We would
not normally put new fi elds in the middle of name fi elds, but doing so will help
you easily see the data when we display the changed fi le’s data member.) Specify
fi eld ACTBAL as a signed numeric (zoned-decimal) fi eld with a length of 7 and two
decimal places.

Page 477

462 • Mastering IBM i

9.7. Exit SEU, and save the changes. From the Work with Members Using PDM screen,
take the option to compile the source, creating a new physical fi le. At this point,
if we had not already renamed the existing data-fi le object, a Confi rm Compile of
Member screen would have appeared, and we would have had to tell the system to
delete the old STUPF, which it could do only if we had already deleted its based-on
logical fi le (or fi les).

Use the DSPMSG (Display Messages) command (or the appropriate PDM option) to
be sure the compile was successful. If it was not, edit the source member and use
the Browse/Copy option to pull the spooled fi le into a split screen. Determine the
error, make corrections to the source DDS, and recompile.

9.8. When the compile is completed successfully, you will have a new version of fi le
STUPF in your library, with fi eld ACTBAL added.

Now return to the Work with Objects Using PDM screen by pressing F12 from the
Work with Members Using PDM screen.
9.8.a. Does the new fi le, STUPF, appear on the list screen? Why or why not?

Refresh the screen, and make sure that fi le STUPF is listed.

Part 2

Goals Verify the success of the Part 1 fi le change.
Use CPYF to move data from the old to the new fi le.
Verify the success of the CPYF command.
Delete the backup fi le.
Recompile the logical fi le (or fi les).
Start at WRKOBJPDM or any command line.
Procedure DSPFFD STUPF, check fi elds.
Perform the copy:


CRTLF on each logical fi le currently pointing to OLDSTUPF.

Page 952

Index • 937

user proÞ les, 7–10
authorities for, 35
Change Primary Group (CHGPGP)

in, 453
Change ProÞ le (CHGPRF) and,

70–72, 442, 910
Change User ProÞ le (CHGPRF) in,

120, 162
Change User ProÞ le

(CHGUSRPRF) in, 453
changing, 120
Display User ProÞ le (DSPUSRPRF)

in, 58–60
group, 8, 450–454
library list for, 63
password for, 8–10, 76–79
sign-on with, 8–10
status, 8
system administrator and, 70

user-deÞ ned Þ ls system (UDFSs), 526
users, 7
utilities, 167

VALUES keyword in select/omit

operations, 340, 390

adding, 878
Change Variable (CHGVAR) value

in, 878–880
CL and, 872
Declare CL Variable (DCL) in, 569
declare, 876–878
types and attributes of, 877
VAR parameter and, 886

Variables view, debugging, 575
Verb Commands (VERB) menu, 54–55
verbs commonly used in CL, 45–47
verifying copy operation, 432–433
views, 333

in RSE, 550–551
in Screen Designer/Report Designer,

in SQL, 652, 683–684, 686

virtual storage, 84

viruses, 84
volatility, 355

Web products, 7
WebSphere Application Server, 7
WebSphere Development Studio Client

for System i (WDSc), 547
WHEN, in CL, 883–884
WHERE clause, in SQL, 667,

wildcard characters, SQL and,

Windows, 6–7, 485, 551. See also IBM

i Access for Windows
work management, 1, 100–105,

512–522. See also Batch work
active job management, 513–518
changing a job, 516–517
IBM i Navigator and, 512–522
job queues in, 518–519, 522
logging level in, 517–518
messages, message severity in,

output queues in, 520–521
subsystem management and,

Work with Active Jobs

(WRKACTJOB) and, 513–518
work scheduling, 101
Work with System Values

(WRKSYSVAL), 34–38
Work with Active Jobs

(WRKACTJOB), 513–518, 918
Work with All Printers screen, 137, 162
Work With All Spooled Files screen,

142, 157, 159
Work with Job Queue (WRKJOBQ), 46
Work with Libraries (WRKLIB),

Work with Libraries Using PDM

(WRKLIBPDM), 174–178
Work with Licensed Program (GO


Work with Members Using PDM
(WRKMBRPDM), 182–187, 205,
207–212, 216–217, 221, 236,
238–245, 308, 415, 466–470
logical Þ les and, 351–352

Work with Message Queue

Work with Messages screen, 223
Work with Object Links (WRKLNK),

Work with Objects (WRKOBJ), 536
Work with Objects Using PDM

(WRKOBJPDM), 172, 179–182,
205–207, 224–229, 423–424, 446
Query for i5/OS and, 318, 319–325

Work with Output Queue
(WRKOUTQ), 46, 104, 133–140,
150, 159–160, 237–241, 308

Work with Printer Output screen, 147,

Work with Printers screen, 161
Work with Queries (WRKQRY),

Work with Spooled Files (WRKSPLF),

139–140, 150, 156–159
Work with User Jobs (WRKUSRJ),

107–111, 114
work-with screens. See list or work-

with screens
workbench, for RSE, 550
writer, printer. See Printer writers

XML, 784, 785

Year function, SQL, 669

Zend, 527
Zend PHP, 7
Zend subsystem, 521
Zendsvr subsystem, 521
zoned decimal data type, 192, 193–195

Similer Documents