Getting Started

To use SEW you need a mainframe account (link) and permission to the tables (link).

 

Next, you will need to install the software. We use IBM QMF-Windows and the current release is version 8. Ask your tech to install this. Install CDs are available from AIS System Support.

 

QMF Prompted Query

From the menu bar, choose “File”, then “New”, and finally “Prompted Query”.  The “Prompted Query” window will be displayed.

 

Building a Query

Icons to know.  There are five icons available to perform table functions in query building.

       IconAdd Add      IconUpdate Change       IconDelete Delete   IconUp Move Up     IconDown Move Down

 

There are five separate windows to process in a QMF Windows application.  They are the Tables, Join Conditions, Columns, Sort Conditions and Row Conditions windows.

 

Tables:  List of tables you have query access to.

The upper left window is titled “Tables”. Click the “Add” icon.

       In the message window that appears, enter the desired Table Owner, ie. “sew”,

               and leave the Table Name blank. Click the “Add from List” button.

The first table request of the QMF session will require a logon.

In the window asking for your signon information, enter your NVAS mainframe

signon and password. Leave “Account” blank. Click the “OK” button.

A list of tables will be displayed. Select one or more table(s) from the list. If you select

more than one table, “Join Conditions” will be necessary.

 

Join Conditions:  Define the relationship between the selected tables.

To add joins, click the Join Conditions “Add” icon.

Typically you will join an SSN from the first table to an SSN in the 2nd table.

To remove joins, highlight the join statement and click the “Delete” icon.

QMF will automatically fill in the join statement if the tables have been joined in a      previous query.  Check the joins, as they may, or may not, be what you wanted.

 

Columns: Limit the columns of data that are returned to the answer set.

The default is to return all columns from every table selected.

To select which columns are returned, click the “Add” icon.

       Every column from the selected tables will be displayed.

       Click on the desired column(s) and click the “Add” button.

To remove a previously selected column, highlight the column and

       click the “Delete” icon.

To change the order of the report, click the “Up” and “Down” icons.

The top column in the window will be the left most column on the report.

The second from the top will be the second on the report, and so on. 

 

Sort Conditions:  Order of the rows in the answer set.

Choosing a sort condition may make your query run slower.

       Only the columns selected for output are available for sorting.

 

Row Conditions: Limit the number of data rows that are returned.

The default is to return all rows from every table selected.

A good rule is that every query should have at least one row condition.

Row conditions on the ccyys, social security number, department or major are the most common.

       To limit the rows returned, click the “Add” icon

               Select a column, such as CCYYS, to limit the query.

               Choose a combination of operators, such as “is equal to”.

               Enter a value to compare against, such as 20024.

       To change (or delete) a previously entered Row Condition

               Click on the condition, then click on the “Change” (or “Delete”) icon.

 

When you have multiple row conditions, you can specify the relationship between the conditions.  When you add a row condition, there are “And” and “Or” radio buttons.  The “And” relationship is the default.

 

If you are mixing And’s and Or’s in the Row Conditions window, you will need to add parenthesis. Typically you will add an open parenthesis in one expression, and a closing a parenthesis in a second.  Parenthesis must be used in matched pairs.  To add the opening parenthesis, highlight an existing Row Condition and click the Change icon. The column you selected now appears in the “Enter an Expression Here” window. Enter the opening parenthesis before the column name. To add the closing parenthesis, highlight an existing Row Condition and click the Update icon. Enter the closing parenthesis after the last value in the frame titled Right Hand.

 

IMPORTANT:  Your choice in the Joins Conditions window and the Row Conditions window can have a large impact on your query.  Check the values carefully.

 

Saving and Running the Query

Icons to know.  Found along the top of the QMF Window panel.

       IconOpen Open   IconSave Save    IconRun Run     IconStop Stop    IconPrint Print   IconPrompted Builder

 

Opening an existing query: Click the Open icon

Saving the displayed query: Click the Save icon

Running the displayed query: Click the Run icon

Stopping a running query: Click the Stop icon

Printing the data: Click the Printer icon

Returning to the Prompted Query Builder: Click the Builder icon

 

Saving the data: From the menu bar, choose “File”, “Export Data”.

Save as type “.csv”.

 


Helpful Hints

 

Case, Dates, and Quotes

Case does matter. ‘Y’ is different than ‘y’. 

For the SEW tables, all character values except for names and addresses are upper case.

Most dates are in the form of  ‘mm/dd/yyyy’.

Quotes are often optional. Prompted Query Builder will add them as appropriate.

If you do add quotes, use the single quote ( ‘ ).

 

Frequently Asked Questions

Q: Why am I  getting no records returned?

A: The most common error is in the Row Conditions window, in the frame titled “Right side”. If you are comparing against a character value, is it in the proper case format (upper verses lower)? If you are comparing a date, is the date in the correct format? Have you entered a department number instead of a major number, or the reverse? Are you comparing the 5 digit CCYYS against a 3 digit value?

 

Q: Why am I getting far more students than I think I should?

A: The most common error is in the Row Conditions window. Did you forget some of the selection criteria, such as selecting for a single semester or a specific major?

 

Q: Why am I getting the same student multiple times?

A: The most common error is in the Join Conditions window. Check that all the necessary joins are specified. The second most common error is in the Row Conditions window.  Are you selecting from a table that has a single student multiple times?  Most students will have multiple Session records, one for every semester they apply for or are enrolled in.  A student will have even more Course Records, as they will have one record for every course they have ever enrolled in.

 

Q: Why am I getting students that I know are no longer enrolled?

A: The most common error is in the Row Conditions window. Did you remember to check the Enrolled Indicator for a value of ‘Y’? Did you enter an incorrect semester?

 

Q: Why does my query take so long to run?

A: The most common error is in the Join Conditions window. Where possible, have you joined using columns that are in the key sequence?  The second most common error is in the Tables window.  Have you included tables that are not necessary?  Specifying a value in the Sort Conditions may also slow down a query.

 

Q: Why, after selecting 2 or more tables, does the Join Conditions window automatically have values in it?

A: Once a join has been built, QMF remembers it. The next time you access the same two tables, the Join Conditions window will automatically be populated with the previously created joins. If the join is not the proper join for the current query, you may delete it.  You delete a join by highlighting it, and clicking the Delete icon. That join is now deleted for this Prompted Query, and for all subsequent Prompted Queries. If you open an existing query that had the previously deleted join, it will be remembered, and will be in force for that Prompted Query, and all subsequent Prompted Queries.

 

AIS homepage