An Exercise in Unix/Aleph – Revise entries in pc_tab_col.eng

Objectives:

After this training, the students should be able to:

  • Navigate in Unix
  • View path_convert
  • Make a backup of the current file/table
  • Change the values in a table/file
  • Use UTIL menu

Find where table/file is located in UNIX directory

We want to change what values are displayed in the ITEM window in the ITEMS module.

  1. Use the “List of ALEPH Tables (by Library/Directory)” document to identify & determine where to find the correct table to define the columns in the GUI screens. [Hint: what Library/Directory do you use in the ITEM module?]
  2. Log into the server and check in the path_convert table for the table you will be using. First go to alephe/tab by using the following:

>cd $alephe_tab

  1. View the path_convert table using the following:

>vi path_convert

  1. Use the / (slash key) command and a text string to find the exu50 section by using the following:

/exu50

  1. Look for the pc_tab_col.eng entry to see that you should make changes in the exu01/tab/pc_tab_col.eng table rather than exu50/tab/pc_tab_col.eng table.
  2. After closing the (:q) path_convert table, move to the correct directory by using the dt command at the prompt.

>dt

  1. Use the ls command to see the list of files to be sure the file you need is there.

>ls *pc_tab_col*

Copy the table/file and then revise the new file

  1. Make a backup copy of the pc_tab_col.eng table by using the following syntax:

>cp –p pc_tab_col.eng pc_tab_col.eng.20020707.sm (using today’s date &

your initials)

  1. Use the ls command to see the list of files to be your backup file is there.
  2. Make changes in pc_tab_col.eng as suggested below, using VI

>vi pc_tab_col.eng (the original file not the backup)

  1. Since this is a very large table, you will need to find the correct section for revising. First connect to the ITEMS module in the GUI Client.
  2. Click the Barcode icon and enter the following barcode: 27119-10.
  3. Using the “Item List of Record …” window (the smaller one), highlight one of the entries and right click to see all of the possible data to be displayed. Also, chose unusual text in one of the column headings. [Hint: Hol+SubLib is a good one].
  4. Go back to the server and use the / command to search for the text. For example, use / Hol+SubLib.
  5. Now comes the tricky part! [Note: the values in column 5 must add up to 100%. Do NOT change the values in column 4. If you want to rearrange the order of the columns, just rearrange the lines in this PC_ITEM_ITEM section.]
  6. You can replace the text (of column header) in column 3. [Note: be sure to leave the L (for Latin character set) in column 2.]
  7. To change the width of a column, change the percentage value in column 5.
  8. To add a new column, change the value from 000 in column 5 to a three digit number greater than zero.
  9. To delete an existing column, place 000 in column 5.
  10. Be sure that the total values of the PC_ITEM_ITEM section for column 5 equals 100.
  11. Save file.
  12. Go back to the GUI ITEMS client.
  13. Search for the item 27119-10 again.
  14. You will see that nothing has changed.
  15. Go back to the server and use UTIL W /3/3 to re-start PC server.
  16. Go back to the ITEMS client. Close client and re-open.
  17. Search for the item 27119-10 again.
  18. You should see your changes.

UNIX commands you will need:

pwdprint working directory

lslisting

ls –llong listing (includes permissions, owner, group, size, date)

cdchange directory

mkdirmake directory

cpcopies file

cp –p copies file and retains date stamp and permissions of original file

viunix editor

mvmoves/renames a file

su -switch user

ALEPH shortcuts you will need:

drdata root

dlibconnects you to appropriate library & sets the correct environment for shortcuts

NOTE: if you pwd after doing a dlib, you won’t be in new directory.

You must do dr and then pwd will show that you are in the correct path

utilbrings up the utilities menu

sys_lib_exercises_pc_tab_col_20020707.docPage 1

Revised 7/7/2002