Your SlideShare is downloading. ×
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Coordinator
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Coordinator

318

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
318
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. DB2 Workshops: Introduction 378 Workshop Database Overview An "Event Scheduling Database" has been created and will be used for your DB2 work in this course. A data model for this database is: Event MenuItem used for used in chosen for located in Selected Room Reservation Item This data model has been implemented with the following relational tables: EVENT (EVENTID, EVENT_DATE, CONTACT, PHONE, BILLING_PERCENT, COORDINATOR, CONTRACT_DATE, EVENT_TYPE, CLOSED) ROOM (ROOMID, CAPACITY, HRLY_RATE, ORIENTATION, HNDCAP_ACCESS, NETWORK_ACCESS) RESERVATION (EVENTID, ROOMID , START_TIME, END_TIME, HRS_USED, ARRANGEMENT, EST_ATTENDANCE) MENUITEM (ITEMNO, DESCRIPTION, UNIT_PRICE, EST_SERVINGS) SELECTEDITEM (ITEMNO, EVENTID, ROOMID, UNIT_COUNT, DELIVERY_TIME, DATE_CONFIRMED,) ITK 378 Workshops (Dr. Barbara Beccue) page 1
  • 2. DB2 Workshops: Introduction Notes about some of the fields: COORDINATOR is either JIM, SUE, or RAE: our staff members who will coordinate an event. BILLING_PERCENT is the percentage of full price we will bill at: e.g., .75 or 1.00 or .50 Note: the percent has already been changed to a decimal fraction. EVENT_TYPE One of following 1-letter codes: C: Commercial N: Nonprofit/educational P: Private I: Internal CLOSED Whether or not an event is closed to public: Y (yes, it is closed to the public) or N (no, it is not closed to the public) HRS_USED Number of hours the room will be in use (redundant with times, but simpler for us) ARRANGEMENT One of the following 1-letter codes: T: Theater style S: Seminar style D: Dinner style O: Open style Getting Off to a good start in these Workshops. Read the handouts completely before you begin a workshop and follow the directions carefully. Often there are notes specific to a workshop that come after the problem statements and directions. Contact your instructor if you encounter major problems. Write down (exactly) the numbers and text of any error messages you receive. Don't assume a problem will go away, it generally doesn't. Often a problem is specific to your data sets and account. ITK 378 Workshops (Dr. Barbara Beccue) page 2
  • 3. DB2 Workshops: Introduction EVENT ROOM RESERVATION MENUITEM SELECTEDITEM When the database was created, the tables and attributes were defined as follows: EVENT EVENTID SMALLINT NOT NULL CONTACT CHAR(20) NOT NULL PHONE CHAR(12) NOT NULL WITH DEFAULT EVENT_DATE DATE NOT NULL EVENT_TYPE CHAR(1) NOT NULL BILLING_PERCENT DEC(3,2) NOT NULL CONTRACT_DATE DATE COORDINATOR CHAR(5) CLOSED CHAR(1) NOT NULL PRIMARY KEY (EVENTID) ROOM ROOMID CHAR(6) NOT NULL CAPACITY SMALLINT NOT NULL HRLY_RATE DEC(5,2) NOT NULL HNDCAP_ACCESS CHAR(1) NOT NULL NETWORK_ACCESS CHAR(1) NOT NULL ORIENTATION CHAR(4) NOT NULL PRIMARY KEY (ROOMID) ITK 378 Workshops (Dr. Barbara Beccue) page 3
  • 4. DB2 Workshops: Introduction MENUITEM ITEMNO SMALLINT NOT NULL DESCRIPTION CHAR(20) NOT NULL UNIT_PRICE DECIMAL (5,2) NOT NULL EST_SERVINGS SMALLINT NOT NULL PRIMARY KEY (ITEMNO) RESERVATION EVENTID SMALLINT NOT NULL ROOMID CHAR(6) NOT NULL START_TIME TIME NOT NULL END_TIME TIME NOT NULL HRS_USED SMALLINT NOT NULL ARRANGEMENT CHAR(1) NOT NULL WITH DEFAULT EST_ATTENDANCE SMALLINT NOT NULL WITH DEFAULT PRIMARY KEY (EVENTID, ROOMID) FOREIGN KEY RSRM (ROOMID) REFERENCES ROOM ON DELETE RESTRICT FOREIGN KEY RSEV (EVENTID) REFERENCES EVENT ON DELETE RESTRICT SELECTEDITEM ITEMNO SMALLINT NOT NULL EVENTID SMALLINT NOT NULL ROOMID CHAR(6) NOT NULL DELIVERY_TIME TIME NOT NULL UNIT_COUNT SMALLINT NOT NULL DATE_CONFIRMED DATE PRIMARY KEY (ITEMNO, EVENTID, ROOMID) FOREIGN KEY FSRM (EVENTID, ROOMID) REFERENCES RESERVATION ON DELETE RESTRICT FOREIGN KEY FSMI (ITEMNO) REFERENCES MENUITEM ON DELETE RESTRICT ITK 378 Workshops (Dr. Barbara Beccue) page 4
  • 5. DB2 Workshops: Introduction Workshop Database: Data EVENT table Eventid Event Contact Phone Billing Coordinator Event Closed Contract Date percent type date 2076 09/23/2005 HANK PRITCHARD 555-8888 0.80 JIM I Y 08/01/2005 2099 10/03/2005 BILL COLSON 777-3333 1.00 SUE P Y 09/05/2005 2107 11/15/2005 RALPH RICHARDS 555-4444 0.75 RAE C N 09/30/2005 2150 07/05/2005 BETTY THOMAS 777-1111 1.00 JIM P N 05/03/2005 2188 08/25/2005 NED ZORDA 555-9999 0.75 N Y 06/10/2005 2201 11/14/2005 CAL BORDEN 555-6666 1.00 RAE P Y 08/03/2005 2220 09/12/2005 FRANK CRANDALL 777-1111 1.00 SUE C N 08/02/2005 2233 11/23/2005 AILENE FROST 777-4444 0.80 RAE N N 07/01/2005 2267 09/04/2005 TERI YOUNG 555-7777 1.00 JIM C N 06/29/2005 ROOM table Roomid Capacity Hrly_rate Hndcap_access Network_access Orientation 133 75 55.00 Y N EW 141 230 170.00 Y N NSEW 155 35 25.00 N N NS 178 45 30.00 Y Y EW 180B 80 75.00 Y Y NW 213 50 50.00 Y N NS 223 120 80.00 Y Y EW 243 25 30.00 N Y NSEW 254 50 45.00 N N NS 260A 75 60.00 N Y NS MENUITEM table Itemno Description Unit_Price Est_Servings 123 CHEESE TRAY 25.00 20 150 SMALL VEGGIE TRAY 15.00 20 160 FRESH FRUIT TRAY 32.00 20 200 MINI QUICHES 40.00 25 250 SWEDISH MEATBALLS 35.00 25 275 EGG ROLLS 25.00 20 350 COLD BUFFET 8.00 1 375 HOT BUFFET 14.00 1 430 CRACKERS AND DIP 12.00 30 500 ASSORTED SOFT 5.50 10 DRINK 520 PUNCH 10.00 20 ITK 378 Workshops (Dr. Barbara Beccue) page 5
  • 6. DB2 Workshops: Introduction RESERVATION table Eventid Roomid Start End Hrs Arrangement Est_Attendance time time Used 2076 155 10:00 AM 2:00 PM 4 O 25 2099 133 11:00 AM 12:00 PM 1 S 60 2099 223 9:00 AM 11:00 AM 2 D 100 2107 155 3:00 PM 5:00 PM 2 O 20 2107 243 2:00 PM 5:00 PM 3 T 20 2150 133 1:00 PM 5:00 PM 4 O 70 2150 155 5:00 PM 6:00 PM 1 T 25 2150 141 3: 00 PM 5:00 PM 2 S 200 2188 141 10:00 AM 4:00 PM 6 O 100 2201 141 9:00 AM 11:00 AM 2 T 100 2201 155 11:00 AM 2:00 PM 3 S 20 2201 178 2:00 PM 3:00 PM 1 S 40 2201 223 11:00 AM 2:00 PM 3 D 80 2220 213 12:00 PM 4:00 PM 4 T 35 2233 133 1:00 PM 3:00 PM 2 S 55 2233 223 1:00 PM 3:00 PM 2 D 90 2267 133 9:00 AM 12:00 PM 3 S 60 SELECTEDITEM table Itemno Eventid Roomid Delivery_Time Unit_count Date_Confirmed 123 2267 133 11:00 AM 3 07/08/2005 150 2099 133 11:00 AM 3 09/22/2005 150 2099 223 9:00 AM 5 09/22/2005 250 2099 223 9:00 AM 4 09/24/2005 250 2107 243 3:00 PM 1 350 2201 223 1:00 PM 80 08/20/2005 375 2233 133 1:00 PM 55 430 2188 141 2:00 PM 7 08/01/2005 250 2201 178 2:00 PM 4 08/20/2005 500 2201 223 1:00 PM 8 08/20/2005 520 2267 133 11:00 AM 3 07/10/2005 150 2201 178 2:00 PM 4 08/20/2005 500 2099 223 1:00 PM 8 09/15/2005 520 2099 223 9:00 AM 2 09/24/2005 250 2267 133 11:00 AM 3 07/08/2005 ITK 378 Workshops (Dr. Barbara Beccue) page 6
  • 7. DB2 Workshops: Introduction Introduction to TSO/ISPF To work with mainframe DB2, you will work with TSO - IBM's Time Sharing Option and ISPF - Interactive System Productivity Facility. TSO is an online rather than batch system allowing you to communicate interactively with the system using terminals. ISPF (it's usually called SPF) provides a menu-driven, full screen interface to most of TSO's features. Therefore you will invoke TSO's features by selecting menu options and answering system prompts rather than creating JCL and submitting jobs. This handout will take you through all the parts of TSO that you will need to do the DB2 workshops for this class. There are many more aspects that we will not get into. Your TSO signon id @378uid Your instructor will assign you a 3 digit number, e.g., 107, which forms part of your tsoid. Your tsoid will have the format: @378uid where you substitute your 3 digit number for uid. For example, the student with number 107 would have the tsoid @378107 . Whenever the value @378uid or @378101 appears in a class handout, you should substitute your actual tsoid (not your university id). Using TSO and ISPF screens When presented with a menu screen, simply make your selection and press the ENTER key. Either upper or lower case can be used for any value to be entered. Often you will make selections from a series of menu screens to get to the screen you need for a particular task. If you are familiar enough with the menu values, you can use a shortcut of entering successive menu selection values separated by a period as a single selection. For example, entering 3.6 is equivalent to selecting 3 on the current menu and 6 on the next menu. On non-menu screens there is a command/option field which is sometimes used and entry fields where you fill in values to provide the necessary information for completing the task. Often some values will already be filled in for you, either default values or values you entered previously on that screen. Use the tabs (preferred) and arrow keys to move around the screen filling in or changing values as desired. Press ENTER (the one to the right of the number pad unless the ENTER by the alphabet portion of the keyboard has been mapped for the ‘enter’ for the mainframe) when you have completed entering any needed values on the screen. You then continue on to the next screen/task or see the same screen with a message indicating the outcome of the operation. If there are problems, you receive appropriate messages (use HELP for longer descriptions). To indicate you are done with a screen and so ready to return to the previous level, you press PF3 or enter the END command (see PF keys description). ITK 378 Workshops (Dr. Barbara Beccue) page 7
  • 8. DB2 Workshops: Introduction PC Terminal Emulation The PC keyboard is different from an actual mainframe keyboard. When you are using the terminal emulation software in the ITK labs, certain keys on your PC have been mapped to various mainframe key functions, as follows: Mainframe Key PC keys PF1, PF2, … F1, F2, … Reset Left CTRL key or Esc Clear Pause Enter Right CTRL key or Enter in numeric keyboard (Enter in regular keyboard set is just carriage return to next line of screen) Arrow keys let you move around the screen a character at a time, as in word processing. Tab key takes you from one data entry field to the next and is the best way to make sure you are in an actual data entry field. If you try to type in outside the approved data entry fields, you will “lock up” your “terminal”. (An “X” or error sign will appear in lower left corner of screen) Use “Reset” to unlock this, then use tab to get into the correct field. PF Keys You will need to work with a number of PF Keys. The meanings of the PF Keys you are likely to be interested in are as follows: PF1 - Help shows you general information about the panel or command or additional information about a message displayed in the upper right corner of the screen. Use the help key to teach yourself about the system. PF2 - Split allows a user to split the screen into multiple windows. PF3 - End indicates you are done with a screen/panel and returns you to the previous screen PF4 - Return is equivalent to multiple PF3's returning you either to the primary option menu or to the panel that invoked a nested dialog. It will frequently save you entering the END command repeatedly. PF7 - Up scrolls up a screen PF8 - Down scrolls down a screen PF9 - Swap switches from one window to the other when in split screen mode PF10 - Left scrolls the screen left PF11 - Right scrolls the screen right The scrolling keys (PF7, PF8, PF10, PF11) are used as you examine SQL output at your terminal or work with a pds member that does not fit entirely on 1 screen ITK 378 Workshops (Dr. Barbara Beccue) page 8
  • 9. DB2 Workshops: Introduction Commands in ISPF The PF keys are really shorthand for typing in commands in the command line. E.g., For example, typing the word UP in the command/option field, then pressing ENTER is equivalent to pressing PF7. A limited number of commands have been equated to PF keys. Use of PF keys for command entry is strongly recommended to save time and to reduce typing errors. There are default PF key definitions for many frequently used system commands. Data Set Naming Conventions TSO uses naming conventions of its own for data sets in addition to those of standard MVS. These data set naming conventions follow the format: tsoid.group.type where tsoid is the TSO user identifier assigned to a user, group is a name created to identify the data set (we'll always use ITK), and type is a value used to identify the type of data stored in the data set. For example, the data set named @378uid.ITK.COBOL will be a library for COBOL programs for the 378 student with tsoid value of @378uid. You will only be concerned with sequential and partitioned data sets. A partitioned data set (pds) is a type of data set used on IBM mainframes to hold a library, or collection, of members, each of which is sequential. For example, in this workshop you will work with a partitioned data set (library) which you will use to contain the sets of SQL statements that you will execute as you complete each 378 workshop. Each member will contain the SQL statements for 1 workshop. When you log on to TSO for the first time for this class, 3 libraries (partitioned data sets) will automatically be allocated for your use in this course. One library, named @378uid.ITK.SPUFI, will be used to store SQL statements. Another library, named @378uid.ITK.COBOL, will hold COBOL programs and will be used in a later workshop. The third library, named @378uid.ITK.JCL, will hold files of operating system Job Control Language commands which will be used to print copies of your SQL statements and to execute programs in the embedded SQL workshop. Generally, you should not include your tsoid when entering a data set name on a screen. TSO will automatically add your tsoid to the front of the data set name you give. For example, when you enter the name ITK.SPUFI(WKSHP1) or RESULT, you are really referring to the data sets @378uid.ITK.SPUFI(WKSHP1) or @378uid.RESULT If you put your tsoid as part of the data set name, you need to enclose the entire name in apostrophes so that TSO will not add your tsoid. For example, '@378uid.RESULT' and RESULT specify the same data set. ITK 378 Workshops (Dr. Barbara Beccue) page 9
  • 10. DB2 Workshops: Introduction Signing on to the ISU/TSO system To sign on, double click on an ISU Host Session icon on your desktop. You should get a screen asking for your user name and password (if you don’t, close the window and open again). Enter anything (like a single letter) in each of User and Password fields and press ENTER on numeric keyboard (or Right Ctrl key). On the next screen, enter 2 for the TSO option You will be prompted to enter your userid. This is the tsoid, in the form @378uid, that you were assigned by your instructor. (Whenever you see the value @378uid in 378 DB2 handouts, substitute your actual tsoid.) TSO/E LOGON Switch to John Muir’s power point presentation, “ISU ITK MVS system logon. NOTE: The system will automatically insist that YOU ENTER A NEW PASSWORD at this time. Choose a password and make sure that you will remember it. Be careful to type exactly what you want, as you cannot see the results. Once you are sure of what you've typed, Press Enter. You are PERMANENTLY CHANGING YOUR PASSWORD to this new value. You will be requested to verify the new password by re-typing it, then pressing Enter. After this first time, whenever you log on, enter the (new) PASSWORD YOU JUST CREATED as your password on this logon screen. You will not need to change your password again (unless you wish to use a different value) so don't enter anything in new password the next time you logon. The next screen tells you the logon is in progress and will display *** on a separate line when finished with the logon procedure. Whenever *** appear, read the message and then press Enter. ITK 378 Workshops (Dr. Barbara Beccue) page 10
  • 11. Workshop 1 Workshop 1 Specific Directions Objective: to go through the process of executing SQL statements against the DB2 class database so that you become familiar with the mainframe environment and have tested out the process, setting up the necessary settings, screens and obtaining printed listings. It's important that you read all the directions carefully and follow them exactly. Most of the problems come from students misunderstanding or not following the instructions. Be especially careful to get the job card statements typed in exactly as shown in this handout. You will be told the SQL statements to enter in Action 4. Later workshops will allow you to develop skill in writing SQL to retrieve data. Since you will already have been through the process once, you will then be able to concentrate on learning SQL in the later workshops. In this workshop you will find answers to the following questions: 1. List all the data in the database tables (to be used as a reference in later workshops to verify you get correct answers). 2. Get information on all closed commercial events. 3. Get information on all events scheduled in a particular room on a specific day. For this workshop you are to do the following actions. The handout will guide you through the needed actions. Follow the directions exactly. Action 1: Sign on to TSO following the directions given previously. Action 2: Customize the environment (Done once this semester) REMEMBER: @378uid should be your assigned TSO id. NOTE: At this time, I am not going to require you to turn in printed output. Instead, when you have finished a workshop, send me an e-mail stating that your workshop #n is ready to grade. In the e-mail be sure to tell me your name, tsoid and password. When I have finished grading the workshops, I will return an e-mail to you with the grade/grade sheet for that workshop. The workshops are due as indicated on the class schedule. If the e-mail is sent after the due date, the workshop will receive a late penalty. ITK 378 Workshops (Dr. Barbara Beccue) page 11
  • 12. Workshop 1 Explanation of LIST & Log Data sets The list data set is especially important because ITK 378 will use it to get certain printed listings. such as listing the contents of a member of a library. However, your list data set is NOT printed at the time you do the specific print utility operation. Instead the output of all such requests are accumulated during your mainframe session and one combined listing is submitted to be printed when you logoff TSO. The log data set is used by the system, in some cases, to record system information about your session. It is sometimes used by the Technical Support staff when investigating problems. You will not deal with the log data set directly. Action 3: Getting Started with SPUFI Switch to John Muir’s power point presentation, “ISU ITK MVS System: Getting Started with SPUFI. Action 4: Create your database, table space and assign your storage space. Use pds, sturead.dbauth. Copy and modify for your tsoid. Action 5: Create the tables and insert the data into your database. Use pds, sturead.bldf06db. Copy and modify for your tsoid. Then execute. Action 6: Enter SQL statements required for workshop 1. Now press Enter to continue on to the 2nd processing option on the main SPUFI screen - EDIT INPUT. This will take you into the ISPF editor which is the same editor as choosing EDIT option 2 from the primary ISPF menu. You should now be at an EDIT screen with a warning message - type RECOVERY ON in command field and press ENTER. If you don't get the warning message, just continue on following the directions. The main part of the screen will now look like: EDIT @378uid.ITK.SPUFI(WKSHP1) COLUMNS 001 072 COMMAND ==> SCROLL==>PAGE ****** ******************************** TOP OF DATA ************* ****** *****************************BOTTOM OF DATA ************** This represents a (currently empty) data set. Usually an input data set has line numbers shown at left and then the actual contents of each statement. As the COLUMNS value indicates, the first position after the blank will correspond to column 1. The editor automatically numbers the lines. ITK 378 Workshops (Dr. Barbara Beccue) page 12
  • 13. Workshop 1 Before you enter the SQL statements, do the following to ensure that the SQL statements are saved in CAPITALS On the command line, type CAPS ON and press ENTER just as you did for changing the recovery setting. Doing this means you won’t have to be concerned about whether your statements are entered in lower or upper case (ie, whether Caps Lock is on or off) , the system will automatically change them to upper case as needed by the mainframe. The SQL lines you see on the screen should appear as upper case. Position the cursor at left end of TOP OF DATA line, type i and press ENTER. You now are in insert mode and can type in SQL statements. As you hit ENTER at the end of a line, you automatically get the next line. You continue in insert mode until you enter a blank statement. A short summary of the editing commands is given a little later in this handout. Enter your SQL statements (see summary of editing commands below) in either upper or lower case; the editor will automatically put them in uppercase. Enter your SQL statements for Workshop 1 as follows: ****** **************************** -- 378 WORKSHOP 1 FOR STUDENT: lastname, firstname -- -- #1 LIST DATA IN EACH DATABASE TABLE -- SELECT * FROM EVENT; SELECT * FROM ROOM; SELECT * FROM RESERVATION; SELECT * FROM MENUITEM; SELECT * FROM SELECTEDITEM; -- -- #2 LOCATE ALL COMMERCIAL EVENTS -- SELECT * FROM EVENT WHERE EVENT_TYPE =‘C’; -- -- #3 FIND ALL EVENTS SCHEDULED IN RM 133 AFTER JUNE 15, 2005 -- SELECT EVENT.EVENTID, EVENT_TYPE, START_TIME, END_TIME FROM RESERVATION INNER JOIN EVENT ON RESERVATION.EVENTID = EVENT.EVENTID WHERE ROOMID = ‘133’ AND EVENT_DATE > ‘06/15/2005’; ****** **************************** Carefully proofread the SQL statements that you enter as a typo can easily create a syntax error or change the query into one that finds no qualifying data. Verify that these statements retrieve the expected data (see the earlier handout pages showing the data in each database table). ITK 378 Workshops (Dr. Barbara Beccue) page 13
  • 14. Workshop 1 Note: The dashes ( -- ) in positions 1 and 2 of a SQL statement make it a comment. Always start your statements in position 3 or later and use several lines for good readability. Sometimes you will want to change SQL statements into comments when you want to execute the same library member but not all the statements (so you are leaving space to make the statement a comment at some future time). Several SQL statements can be in 1 member. Use a semicolon (;) to indicate the end of each SQL statement. Keep the statements for each set of workshop problems so that you can refer to them. Editing in ISPF You start with the input data set shown on the screen and type where you wish, changing the statements, and using the arrow keys and tabs to move around. To insert line(s), place an i in the 1st position of the line number (new lines will be inserted after this line) and hit ENTER. Enter the line, hit Return to get a new line, enter the next line, etc. When you Return on an empty line, the insertion of lines will stop. To delete a line, place a d in the 1st position of the line number and press ENTER. To delete a block of lines, place DD in the leftmost position on first and last lines of the block and press ENTER. To repeat a line, place an r at the left on the line number; for several lines use Rn where n is number of times you want the line repeated. To copy a block of lines, mark the beginning and end of the block with CC in the leftmost position of the line numbers, and place a B (before) or A (after) on the line number of the destination. Moving a block of lines is just like copying a block except you mark the beginning and end of the block with MM ITK 378 Workshops (Dr. Barbara Beccue) page 14
  • 15. Workshop 1 Action 7: Execute your SQL statements. When finished typing in and changing your SQL statements, press PF3 to return to SPUFI menu. The EDIT INPUT option will have an * instead of YES to indicate that this option has been completed. Next press Enter to execute your SQL statements. As the execution finishes, you will automatically be put into browse mode to examine the output (in output data set named tsoid.RESULT). You use PF7/8 and PF10/11 to scroll through the listing. You should see the desired data displayed and get an SQLCODE of 100 (the equivalent of end of file/table) or 0 (successful). Negative SQLCODE values indicate errors. Look up negative values in the DB2 Reference Guide or the DB2 Messages and Codes manual, if needed. Check the SQL output to be sure you retrieved the correct data from the database. When done examining (browsing) your output, press PF3 which puts you back into SPUFI Menu screen. After returning to SPUFI main screen, you can choose to repeat the cycle of editing the SQL statements, executing them, and browsing by simply hitting ENTER. Note the YESs have reappeared and will control the operations to be done. Once you are done executing your SQL statements, from the SPUFI menu screen press PF3 to return to the ISPF PRIMARY OPTION MENU. ITK 378 Workshops (Dr. Barbara Beccue) page 15
  • 16. Workshop 1 Action 6: Send an e-mail to your instructor indicating that your workshop #n is ready to grade. Include your name, tsoid, and password in the e-mail so that the instructor can logon to your account and grade the workshop. Your grade and grading sheet will be sent to you via e-mail when the grading for the workshop is completed. The e-mail should be sent by the beginning of the class at which it is due – see course schedule for due dates. If e-mails are sent after the due date and time expect to receive a late penalty for the workshop. Action 7: Exit From TSO: To Return to ISPF Primary Options Menu From DB2I Primary Options Menu or anywhere outside DB2 in ISPF PF3 (or multiple PF3's) From below DB2I Primary Options Menu PF3 (to DB2 Menu) then PF3 to ISPF Menu To exit from TSO from ISPF Primary Menu X or PF3 or PF4 It is better to exit explicitly than to let the session time out. Summary of Workshop 1 You should now be familiar enough with this new environment to be able to do the following in future workshops: - Sign on to TSO/ISPF and get to DB2 (choose M . 12) - Use DB2's SPUFI component and the ISPF editor to enter and execute SQL statements ITK 378 Workshops (Dr. Barbara Beccue) page 16
  • 17. Workshop 1 DB2 Manuals DB2 Manuals are available online through ISU’s Technical Services web page located at www.ts.ilstu.edu/ • Click on Find a bookshelf under IBM Book Manager • Userid= books, password= ibmbooks • Scroll down to “DB2 UDB for OS/390 V6” Bookshelf or enter “DB2 UDB for OS/390 V6” in the search box at the top and click on SUBMIT • Once the DB2 book list comes up, save a bookmark to it • You will still have to use the userid and password each time you come back but can go right to the desired set of manuals The most useful manuals will probably be: SQL Reference Application Programming and SQL Guide Messages and Codes (for DB2 and SQL error codes) Choose “SQL Codes” from the main web page to quickly look up the meaning of error codes you receive. ITK 378 Workshops (Dr. Barbara Beccue) page 17

×