330 likes | 488 Views
IBC233 Lecture 2 Updated Winter 2008. Agenda . Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator. ISeries Architecture. Application Software. Logical Machine. OS/400. Machine Interface (MI). Physical Machine. Physical Machine. CL.
E N D
Agenda • Test next Week – Jan 23 • ISeries Architecture • CL (Control Language) • Library Lists • Operations Navigator
ISeries Architecture Application Software Logical Machine OS/400 Machine Interface (MI) Physical Machine Physical Machine
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.
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.
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
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*
What are the easiest ways to enter Commands? • Use the iSeries menus • Use the Prompt Screens (F4)
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
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)
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)?
Question • What would you type to send the “Hi Friend’ to the message queue for DB233C40?
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
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
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
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
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
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
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.
Question • Why would we want to change our library list? • Is BAC344LIB a Current Library or a User Library?
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.
Demo “MARKS” Application • See in done in C • See it done using a display file and a CL program
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.
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.
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
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.
Changing Display Options • Right Click on entity • Click on Properties
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
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