ibc233 lecture 2 updated winter 2008 agenda test next week – jan 23 iseries architecture cl...

33
IBC233 Lecture 2 Updated Winter 2008

Upload: maryann-burke

Post on 14-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

IBC233 Lecture 2

Updated Winter 2008

Page 2: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Agenda

• Test next Week – Jan 23

• ISeries Architecture

• CL (Control Language)

• Library Lists

• Operations Navigator

Page 3: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

ISeries Architecture

LogicalMachine

PhysicalMachine

Application Software

OS/400

Machine Interface (MI)

Physical Machine

Page 4: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

CL

• Control Language– It’s how you communicate with the ISeries

Server– Made up of over 1500 commands based

on the English language– Commands can be grouped together in a

CL program to perform a certain task.

Page 5: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Command Syntax

Command Name— Parameter(s)

eg. WRKOBJPDM LIBRARY01

or

WRKOBJPDM LIB(LIBRARY01)

A Parameter is a key piece of information that the command needs for execution. Most parameters have default values.

Page 6: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Command Names

• Based on the English Language

• Verbs eg. Create, Delete, Copy, etc.

• Nouns (objects) eg. Library, File, Job

• Adjectives - used to further define the noun (object)

• eg. CRTLIB WRKUSRPRF DSPJOBQ CRTCBLPGM

Page 7: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Finding Commands

• Use the menus (MAJOR, VERB menus)

• Go directly to the menu associated with the noun or verb e.g. GO CMDCRT or GO CMDOUTQ

• DSP*

Page 8: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

What are the easiest ways to enter Commands?

• Use the iSeries menus

• Use the Prompt Screens (F4)

Page 9: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

CL Syntax

• Keyword– Each command parameter has a keyword or

label associated– Keyword notation assigns the parameter value

to the parameter with the given keyword

• Positional Notation– Assigns the parameter value to each parameter

in order

Page 10: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

WRKOBJPDM

• Parameters:– Library (LIB)– Objects (OBJ)– Object Type (OBJTYP)– Object Attribute (OBJATR)

• WRKOBJPDM QCLLESRC– Is positional notation and will work with objects using PDM on

library QCLLESRC

• WRKOBJPDM OBJ(QCLLESRC)– Is keyword notation and will work with all objects in the

previously used library that have the name QCLLESRC)

Page 11: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Question

• How would you find the keyword for the DATE and USER parameters used in the command to retrieve job attributes?

• How would you find all the keywords of a command to display your job log (the history of your job)?

Page 12: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Question

• What would you type to send the “Hi Friend’ to the message queue for DB233C40?

Page 13: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Steps to Creating a CL Program

• Create a Source Physical File to hold the code if it doesn’t already exist

• Create a Source Member in the Source Physical File

• Type in code

• Exit and Save

• Compile

Page 14: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

How the iSeries finds Objects

• When an object is created, it is created ‘in’ a particular library.

• To access an object, the iSeries needs to know what library the object is in.

• (CL) Commands prompt you for the object name and library name.

• *LIBL is the default for library

Page 15: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Library Lists

• The list of Libraries through which the iSeries searches to find objects.

• Similar to the DOS ‘Path’ concept

• Each Job has a library list

• *LIBL = library list

Page 16: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Library Lists cont’d

• A Library List consists of 4 parts:– System Libraries (up to 15)– Product Libraries (none, 1 or 2)– Current Library(1 only)– User Library ( up to 25)

• To view your library list - DSPLIBL

Page 17: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

How do Libraries get on your Library List?

• When you sign on, your library list is built from:– QSYSLIBL (system value)– QUSRLIBL (system value)– Current library from User Profile

• Product libraries are added as needed by the system

Page 18: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Library List Commands• ADDLIBLE

– Adds an entry to a library list to the USER portion of the library list

• RMVLIBLE– Removes an entry from the USER portion of

the library list

• EDTLIBL– Adds/Deletes/Changes entries on the USER

portion of the library list

Page 19: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Library List Commands

• CHGCURLIB– Changes the Current Library

• CHGLIBL– Changes the Current Library and allows

Add/Change/Delete to the USER portion of the library list.

• All Library List commands are listed on the CMDLIBL menu.

Page 20: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Question

• Why would we want to change our library list?

• Is BAC344LIB a Current Library or a User Library?

Page 21: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Hunt for the program Hello

Page 22: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Storing Objects

• When an object is created, it is stored in the library specified.

• If no library is specified, it is stored in *CURLIB (current library).

• If there is no current library, it is stored in QGPL library.

• Exception: Library Descriptions, Device Descriptions and User Profiles are always stored in library QSYS.

Page 23: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Demo “MARKS” Application

• See in done in C

• See it done using a display file and a CL program

Page 24: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Input/Output Screen:

Page 25: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Constants and Attributes• ‘Constants’ are basically the words that you want

displayed on the screen. Examples of constants would be Screen Title, showing available function keys.

• Attributes define how constants and other fields are displayed on the screen. Each field on the screen has an attribute byte or properties.

Page 26: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Designing your screen

• Use constants to give the user information• Define your data (input/output) fields

– Fields must be identified as input, output or both– They must declared as character or numeric– Length and if numeric, no. of decimal places must be

defined• Date, Time or User constants can be used to

display system values.

Page 27: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Designing Screens

• Start IBM WDSC – Code Designer• Find the following Icons

– Create named field– Create date constant– Create time constant– Create text constant

• Use Properties to change named field attributes

Page 28: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Naming Data Fields

• It is important to name each of the data fields. These names will become the variable names when used in a program.

Page 29: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Changing Display Options

• Right Click on entity

• Click on Properties

Page 30: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Enabling Function Keys

• Click on the icon – Show record Properties

• Click on CA/CF

• Click on either CA to create a CA function key or CF to create a CF function key

• Click on the function Key

• Click on the parameters function key

Page 31: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Demonstration

Page 32: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

Testing Display Files – Screen Design Aid

• Check compile listing to make sure it’s OK• STRSDA, Option 3: Test Display File• Enter the Display File Name• Set the indicators and data fields• Press enter to see how it looks• Repeat the last 2 steps as needed

Page 33: IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator

For next Week: