Updating a department at the local location

You can use the distributed organization sample application to update department information at the local location.

Procedure

To update department information:

  1. Enter the following values in the distributed organization sample application:
    • On the ACTION line, enter u for update.
    • On the OBJECT line, enter de for department.
    • On the SEARCH CRITERIA line, enter di for department number.
    • Leave the LOCATION line blank, indicating local location.
    • On the DATA line, enter %, which displays a list of all the departments.
    Figure 1. Starting the distributed organization application
                            DB2 ORGANIZATION APPLICATION
     ===>_
    
    
      ACTION .........:u       A  (ADD)              E  (ERASE)
                               D  (DISPLAY)          U  (UPDATE)
    
      OBJECT .........:de      DE (DEPARTMENT)       EM (EMPLOYEE)
                               DS (DEPT STRUCTURE)
    
      SEARCH CRITERIA :di      DI (DEPARTMENT ID)    MN (MANAGER NAME)
                               DN (DEPARTMENT NAME)  EI (EMPLOYEE ID)
                               MI (MANAGER ID)       EN (EMPLOYEE NAME)
    
      LOCATION .......:        (Blank implies local location)
    
      DATA ...........:%
    
      PRESS: ENTER to process    END to exit
     
  2. Press the ENTER key.
    The panel below lists the departments that can be updated. Select the department to be updated by inserting an S in the left margin by the department number.
    Figure 2. Selecting a department to be updated
                            DB2 ORGANIZATION APPLICATION      ROW 1 to 14 of 14
     ===>_
         ACTION:  UPDATE A DEPARTMENT
    
         TO SELECT FROM THE LIST PLACE AN S NEXT TO THE DEPARTMENT
         PRESS ENTER TO PROCESS OR END TO EXIT
    
         D/ID  DEPARTMENT NAME                        M/ID     MANAGER NAME
    
         A00   SPIFFY COMPUTER SERVICE DIV.           000010   CI HAAS
         B01   PLANNING                               000020   ML THOMPSON
         C01   INFORMATION CENTER                     000030   SA KWAN
         D01   DEVELOPMENT CENTER
         D11   MANUFACTURING SYSTEMS                  000060   IF STERN
         D21   ADMINISTRATION SYSTEMS                 000070   ED PULASKI
     S   E01   SUPPORT SERVICES                       000050   JB GEYER
         E11   OPERATIONS                             000090   EW HENDERSON
         E21   SOFTWARE SUPPORT                       000100   TQ SPENSER
         F22   BRANCH OFFICE F2
         G22   BRANCH OFFICE G2
         H22   BRANCH OFFICE H2
         I22   BRANCH OFFICE I2
         J22   BRANCH OFFCIE J2
     
  3. Press the ENTER key.
    The panel below displays the information relevant to the selected department. Enter the information you want to update on this panel; in this case, enter the name of the department.
    Figure 3. Updating a department
                            DB2 ORGANIZATION APPLICATION
     ===>_
    
                                  UPDATE A DEPARTMENT
    
       DEPARTMENT ID                     :  E01
                  NAME                   :  hardware support service
                  MANAGER ID             :  000050
                  ADMIN DEP ID           :  A00
                  LOCATION               :
    
       MANAGER    ID                     :  000050
                  FIRST NAME             :  JOHN
                  MIDDLE INITIAL         :  B
                  LAST NAME              :  GEYER
                  WORK DEPT ID           :  E01
    
      PRESS: ENTER TO PROCESS    END TO EXIT
     
  4. Press the ENTER key to process the updated information.
    A message appears on this panel that states the update was successful.
    Figure 4. Update successfully processed
                            DB2 ORGANIZATION APPLICATION
     ===>_
     DSN8014I   DSN8HC3-DEPARTMENT SUCCESSFULLY UPDATED
                                  UPDATE A DEPARTMENT
    
       DEPARTMENT ID                     :  E01
                  NAME                   :  HARDWARE SUPPORT SERVICE
                  MANAGER ID             :  000050
                  ADMIN DEP ID           :  A00
                  LOCATION               :
    
       MANAGER    ID                     :  000050
                  FIRST NAME             :  JOHN
                  MIDDLE INITIAL         :  B
                  LAST NAME              :  GEYER
                  WORK DEPT ID           :  E01
    
      PRESS: ENTER TO PROCESS    END TO EXIT
     
  5. Press ENTER to return to the previous panel or END to exit.
    If you return to the previous panel, you can now select another department to update, or press ENTER or END to exit. The same message appears on this panel, indicating the update was successful.
    Figure 5. Department successfully updated
                            DB2 ORGANIZATION APPLICATION      ROW 1 to 14 of 14
     ===>_
     DSN8014I   DSN8HC3-DEPARTMENT SUCCESSFULLY UPDATED
         ACTION:  UPDATE A DEPARTMENT
    
         TO SELECT FROM THE LIST PLACE AN S NEXT TO THE DEPARTMENT
         PRESS ENTER TO PROCESS OR END TO EXIT
    
         D/ID  DEPARTMENT NAME                        M/ID     MANAGER NAME
    
         A00   SPIFFY COMPUTER SERVICE DIV.           000010   CI HAAS
         B01   PLANNING                               000020   ML THOMPSON
         C01   INFORMATION CENTER                     000030   SA KWAN
         D01   DEVELOPMENT CENTER
         D11   MANUFACTURING SYSTEMS                  000060   IF STERN
         D21   ADMINISTRATION SYSTEMS                 000070   ED PULASKI
         E01   HARDWARE SUPPORT SERVICE               000050   JB GEYER
         E11   OPERATIONS                             000090   EW HENDERSON
         E21   SOFTWARE SUPPORT                       000100   TQ SPENSER
         F22   BRANCH OFFICE F2
         G22   BRANCH OFFICE G2
         H22   BRANCH OFFICE H2
         I22   BRANCH OFFICE I2
         J22   BRANCH OFFICE J2