Presentation on theme: "Week # 2 - Agenda Types of AS/400 Objects Qualified/Unqualified Names"— Presentation transcript:
1Week # 2 - Agenda Types of AS/400 Objects Qualified/Unqualified Names Object ManagementCL SyntaxLibrary ListUser JobsSpool Files and PrintingPDM (Programming Development Manager)SEU (Source Entry Utility)
2Week # 2 Types of AS/400 Objects All AS/400 objects are categorized by object type. An object’s type defines the object’s purpose and how it can be used on the system.OS/400 provides more than 40 object types that encompass all applications and system resources, including programs, data, and hardware.
4Week # 2 Types of AS/400 Objects (Continued) When you create an object and give it a name, the system assigns the object type, as determined by the command you used.Examples:Command CRTUSRPRF (Create User Profile) generates the object type *USRPRFCommand CRTLIB (Create Library) generates the object type *LIB
5Week # 2 Types of AS/400 Objects (Continued) Some CL commands work with any type of object, but there are object types that have certain CL commands that can be used only for that type.Examples:DSPOBJD (Display Object Description) command works for objects of any typeDSPUSRPRF (Display User Profile) command works only for *USRPRF objects
6Week # 2 Types of AS/400 Objects (Continued) When you create an object, it “goes into” a (User) library (unless the object created is, in fact, a library). This is not a physical collection of objects but a single-level directory to a group of related objects.
7Week # 2 Types of AS/400 Objects (Continued) A library also provides a logical reference to objects by using address pointers.The type and authorization level of each object is associated with the library entry for that object.(Present whiteboard illustration now)
8Week # 2 Requesting an Object When you request an object (by selecting a menu option or by entering a command), it usually is not necessary to specify the library name in which the object resides.You specify an object name (up to10-characters without a library reference), and the system searches the job’s current library list to locate an object matching the specified name and type appropriate for the request.
9Week # 2 Requesting an Object (Continued) Example: You want to use the CALL command to execute a program. The CALL command’s only required parameter is the name of the program; so if you want to run a program named ACTCUS (to list all active accounts in a customer file), you would enter the commandCALL ACTCUS
10Week # 2 Requesting an Object (Continued) The only valid object type for a CALL command is *PGM, so if you include the object type in the library entry, the system can determine whether it’s type is appropriate for the requested operation without having to locate and load the actual object.
11Week # 2 Qualified/Unqualified Names To run, for example, program ACTCUS in library TSTLIB1, proceed in two ways:Change the library list, orUse a qualified name for the object (the most direct because it includes a reference to a library + the 10-character object name), which would take the form –CALL libref/objname
12Week # 2 Qualified/Unqualified Names (Continued) In the form libref/objname, libref is an explicit library-object name; therefore, to execute program ATCUS in library TSTLIB1, specify the following CALL command:CALL TSTLIB1/ACTCUSHere, the system searches only library TSTLIB1 for program ACTCUS.
13Week # 2 Qualified/Unqualified Names (Continued) The library specified in an explicit qualified name does not need to be in your library list, but you (the requester) must be authorized not only to use that library but also to use the object within the library. The first thing the system does is determine whether you have proper authority to the library you named.When you use a simple unqualified name, the search for an object is limited to your library list. The system determined that were authorized to use the library-list libraries when your job began. (Attempting to add to your library list a library to which you are not authorized will cause an error.)
14Week # 2 Qualified/Unqualified Names (Continued) If you are authorized to the library specified in an explicit qualified name but the system cannot find a matching object name of the appropriate type, or if you are not authorized to use the object, the system does not search beyond the specified library. Instead, the system returns a message such as “Object OBJNAME in library LIBNAME not found” or “Not authorized to object OBJNAME in library LIBNAME.”
15Week # 2 Qualified/Unqualified Names (Continued) It might be necessary to use a qualified name if:Objects with the same name and type exist in more than one library in your library listYou need an object that is not in any library in your library listTo use a qualified name, you need authority adequate for the intended use, both to the object and library.
16Object ManagementDefinition > ‘An object is information stored on the iSeries system that can be operated on by using commands & programs.Some types are > Program, File, Folder & LibraryMain characteristics are > Name, Library, Type, Attribute, Owner Name, Creator Name & Authorization
17Object Management (Continued) Comparing types > Source Physical File vs Data File (wb)Life Cycle of code from development to execution(wb)Difference between a Member and an Object (i.e. Programs & Files) (wb)
18iSeries LibrariesDifferences between System, Product and User librariesA User library is an object that groups related objects of other types including programs and filesCurrent Library
19Library ListA Library List (on the iSeries) is a ‘search path’ that specifies the Current library and a group of System, Product and User libraries that a job uses when searching for required objects (from top to bottom). (dmo)Qualified vs Unqualified jobs (wb)Job Description defines the default Library List for User profiles (Parameter in the User profile) (wb)
20Library List (Continued) The QGPL and QTEMP should be standard on all Library Lists (dmo)As of OS/400 release 5.1, the maximum # of libraries allowed on the Library List has been increased to over 200 libraries.The iSeries commands relating to the maintenance of the current Library List is temporary for that sign-on session. (wb)
21PDM (Programming Development Manager) Walk thru of Options 1, 2 & 3
24CL Syntax Do all commands have parameters? Why should you always press F4 following a command instead of enter?
25Positional or Keyword? By Keyword, both these are allowed CRTLIB LIB(ACTLIB) TYPE(*TEST) TEXT(‘Accounting’)CRTLIB TYPE(*TEST) TEXT(‘Accounting’) LIB(ACTLIB)
26Positional Allowed: Not Allowed CRTLIB ACTLIB *TEST CRTLIB *TEST ACTLIB
27Menu Menus GO MAIN main menu (F16) GO MAJOR major commands menu (F4) GO VERB action menuGO SUBJECT objects menuGO CMDxxxx verb, noun, function
284 Parts of a Library List (or the 4 library list types) System (SYS) Product (PRD)Current (CUR)User (USR)
29Library List Commands ADDLIBLE RMVLIBLE EDTLIBL Adds an entry to a library list to the USER portion of the library listRMVLIBLERemoves an entry from the USER portion of the library listEDTLIBLAdds/Deletes/Changes entries on the USER portion of the library list
30Library List Commands CHGCURLIB CHGLIBL Changes the Current LibraryCHGLIBLChanges 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.
32Spooled Files AS/400 objects that contain data for printing Are stored in Output QueuesTo print a Spooled File, the file must be moved to an Output Queue attached to a printer.
33How Do Spooled Files get Created? QINTERJobOutput QueueProgram/CommandSpooled FileDataReportLayout*FILE*FILE
34CE233A01 PRT01 SPLF#1 SPLF#3 SPLF#2 SPLF#4 Change the Spooled File to OutQPRT01SPLF#2SPLF#4
35Work with Jobs CommandTo display information about your current Interactive job, simply type: WRKJOBTo display information about any other job, use the Work With Job and enter the Job Name and User. Number is Optional.To display your Batch Jobs, use the Work with Submitted Jobs Commands (WRKSBMJOB)
36WRKUSRJOBShows you a list of all of the jobs that you own on the system irregardless of the subsystemStatusActive = Job is currently runningOutq = Job is finishedJobq = Job is waiting to process.To delete a ‘run-away’ job, take option 4