═══ 1. Special Notices ═══ References in this help to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM licensed program in this help is not intended to state or imply that only IBM's licensed program may be used. Any functionally equivalent product, program, or service that does not infringe any of IBM's intellectual property rights may be used instead of the IBM product, program, or service. Evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, is the user's responsibility. IBM may have patents or pending patent applications covering subject matter in this help. The furnishing of this help does not give you any license to these patents. The following terms, denoted by an asterisk (*) in this help, are trademarks of the IBM Corporation in the United States and/or other countries: IBM OS/2 Operating System/2 Presentation Manager WorkFrame/2. The following terms used in this publication are trademarks of Microsoft Corporation. They are denoted by a double asterisk (**) when they appear in the text. Microsoft Windows. This help 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 the names and addresses used by an actual business enterprise is entirely coincidental. ═══ 2. Start Here ═══ The IBM* Library Manager lets you create and maintain libraries of object code. Library Manager lets you do all that the WorkFrame/2's command line library utility, LIB, does while also adding the advantages of a graphical user interface. Like LIB, Library Manager works with standard libraries and import libraries but not with dynamic link libraries (DLLs). This tutorial describes how to use Library Manager to: o Create a library o Add object files to a library o Change the characteristics of a library o Generate a listing file. o Copy object modules to a directory o Delete object modules from a library. Note: To follow the steps in this tutorial, you need to create a directory on your hard drive as a work space. The tutorial assumes this directory is called D:\TEMPDIR but you can use another one if you already have a directory with this name. The directory and its contents can be deleted when you have finished the tutorial. Create this directory before moving on to the next panel. The tutorial takes about 20 minutes to complete. If you feel you need more information about using the controls in the Library Manager program, use the help that comes with the program. When you are finished with a tutorial panel, continue to the next one by selecting the Forward push button at the bottom of the tutorial window. ═══ 3. Overview ═══ ═══ ═══ ═══ ═══ You can do many library tasks from the main Library Manager window (shown on the left). The Library field identifies the name of the library you are working on. The Object modules container shows the object modules contained in the library. In the lower part of the window, the controls grouped under the heading Object files let you list files in different directories. You can perform most common library operations by simply dragging files and modules between the Object modules and Object files controls. Other operations can be performed through the pop-up menus found in both the Object modules container and the Object files list. Use the online help to learn more about these menus. For more information, consult the online help. If you want to start this tutorial from the Library Manager, select Tutorial from the Help pull-down. ═══ 4. Dragging Techniques ═══ The diagram below illustrates some of the operations you can perform through direct manipulation. ╔═══════════════════════════════╗ ║ IBM Library Manager ║ ║───────────────────────────────║ ║ ║ ║ Object modules ║ ╔════════════════════════════╗ ║ ┌──────────────────────────┐ ║ ║ A Desktop Object ║ ║ │ ┌─┐ ┌─┐ │ ║ 5 ║────────────────────────────║ ║ │ └─┘ └─┘ ──┼─────────── ║ ║ │ OBJ1 OBJ2 │ ║ ║ ║ ║ │  ─┼──────────── ║ ║ └─────────┼───┼────────────┘ ║ 6 ║ ║ ║ │1 │2 ║ ║ ║ ║ Files │ │ ║ ║ ║ ║ ┌─────────┼───┼─┐ ║ ║  │ ║ ║ │obj1.obj │  │ ║ 3 ╚═════│═══════════│══════════╝ ║ │obj2.obj ─┼──────────────────────────┘ │ ║ │obj3.obj ─┼──────────────────────────────────────┘ ║ └───────────────┘ ║ 4 ║ ║ ╚═══════════════════════════════╝ You can: o Add object modules to the library by dragging object files to the object modules container (1 and 6). Object files can be dragged from the Files list or from anywhere on the Desktop. o Copy object modules to a directory (2) or folder (5) where they become object files. o Copy object files to the Desktop (3) and copy Desktop object files to the Files list (4). You will use some of these direct manipulations in this tutorial. ═══ 5. Lesson 1: Opening the Library Manager Window ═══ If you haven't already started the Library Manager utility, do so by double-clicking on the Library Manager icon, , in the Tools folder and selecting OK when the Product information window appears. In the following sections of the tutorial, you will be following instructions in the panels. At this time you may want to size the tutorial window so you can see both it and the Library Manager window. ═══ 6. Lesson 2: Creating a New Library ═══ This lesson shows you how to create a new library. The new library will be called TUTLIB.LIB and will reside in the directory D:\TEMPDIR. 1. Select New from the File pull-down to initialize the controls for a new library. 2. Replace the text [Untitled] in the Library field with d:\tempdir\tutlib.lib to specify the location and name of the new library. If the name you typed did not end with the extension ".LIB", Library Manager would have appended it. Note: To open an existing library, you would select Open from the File pull-down. ═══ 7. Lesson 3: Copying Object Files to the Library ═══ There are three small object files in the PRJ\LIBTUT subdirectory of the WorkFrame/2* directory. Copy these object files to the new library by doing the following: 1. Select the drive where the WorkFrame/2 product is installed using the Drive list. 2. Using the Directory list, switch to the directory where the WorkFrame/2 product is installed. Then switch to the PRJ directory and, lastly, to the LIBTUT directory 3. Ensure that is selected as the Type of files. The Files directory should now list three object files: TUT1.OBJ, TUT2.OBJ, and TUT3.OBJ. 4. Click on these files so that they are selected. Then drag them to the Object modules window. As shown below, the Object modules container now has three object modules: TUT1, TUT2, and TUT3. ═══ 8. Lesson 4: Changing Library Characteristics ═══ Now that you have created a library and added object modules to it, you can: o Set the library's page size o Specify whether or not searches into the library are to be case-sensitive o Include or exclude extended dictionary information. Because the library is new, these controls are initially set at their default values. If the library was not new, the controls would indicate what characteristics the library currently has and you could change them as required. In the following steps, you will set the library's page size to 128 and not include any dictionary information. 1. Click on the Settings... item in the Options pull-down to open the Settings note book. 2. Click on the New library page. 3. Deselect the Create extended dictionary checkbox to not include an extended dictionary in the library when it is created. 4. Use the arrows next to the Page size field to adjust the page size to 128. 5. Close the Settings note book. ═══ 9. Lesson 5: Creating a Listing ═══ A listing is an ASCII file indicating the contents of the library. For details about interpreting a list file, see the LIB Utility Reference reference in the WorkFrame/2 Information folder. To create a list file and specify its level of detail: Select ListingLevel 2 from the Options pull-down. The listing is created when the Library Manager is closed or when the library is saved. It will have the same name as the library except that the extension will be LST instead of LIB. ═══ 10. Lesson 6: Creating Object Files from Object Modules ═══ You may have the situation where you would like to use one or more object modules in a library as object files. In the following steps, you will switch to the directory you created and copy two of the object modules to it. 1. Using the Drive and Directory controls, change the current driver and directory to D:\TEMPDIR. At this point, the Files list should be empty since it was created at the beginning of the tutorial and no files have been saved to it. 2. Click on the TUT2 and TUT3 modules in the Object modules container. 3. Drag the selected modules from the Object modules container to the Files list. You will see two object files, TUT2.OBJ and TUT3.OBJ, appear as shown below. ═══ 11. Lesson 7: Deleting An Object Module ═══ In this lesson, you will remove an object module from the library. Note that removing a library's object module does not delete the object file associated with it. 1. Select the TUT3 module in the Object modules container. 2. Drag it to the Shredder icon on the Desktop. 3. When the confirmation window appears, select its Delete push button to delete the module. You can also delete object modules using the pop-up menu in the Object modules container. ═══ 12. Lesson 8: Closing the Library Manager ═══ 1. Select Save from the File pull-down to save the library. 2. Close Library Manager by double-clicking on its system menu icon. As Library Manager closes, it will create the list file which you can browse with a text editor. After the Library Manager window has closed, you can take a look at the listing it created in the D:\TEMPDIR directory. ═══ 13. Summary ═══ You have now finished the Library Manager tutorial. Once you have exited the tutorial, you can delete the D:\TEMPDIR directory and its contents. To learn about controls not covered in this tutorial, use the online help. ═══ Library ═══ A library is an organized collection of object code which contains functions and data that are already assembled or compiled. Once an object file is incorporated into a library, it becomes an object module. Libraries are used to: o Support high level languages. Most compilers include libraries to perform standard operations, such as input/output and floating-point mathematics. When your program refers to a library routine, the compiler and linker combine the library routine with your program. o Perform complex and specialized activities, such as database management or advanced graphics. You can use your own libraries or specialized libraries supplied by a vendor. o Support your own work. If you have created routines that you use with a variety of programs, you may want to consolidate these routines into a library. You can then link to one library. ═══ Output Library ═══ If you specify a file in outlibrary, LIB creates a new output file with the modifications and leaves your input file intact. Otherwise, LIB replaces your input file with the modified file. In the latter case, a backup of your original input file is stored in the current directory with the file name extension ".BAK". ═══ Object File ═══ An object file is produced by a compiler or assembler from one or more source files. An object file has an extension of ".OBJ". (as in "MYPROJ.OBJ"). In LIB, HPFS file names are also supported as long as the file name ends with ".OBJ" (as in "MYOBJECTFILE.NEW.OBJ"). ═══ Object Module ═══ The object module is a self-contained unit within a library of precompiled or preassembled routines. When individual object files are combined into a single library file, they become object modules. In LIB, an object module is referred to by its name, without a file extension. For example, assume that the object file KEELING.OBJ is inserted into a library. It then becomes an object module and is simply referred to as KEELING. ═══ ═══ Trademark of IBM.