500 likes | 679 Views
An End-User Perspective On Using NatQuery To Extract Data From ADABAS Building a Dynamic Variable. Presented by Treehouse Software, Inc.
E N D
An End-User Perspective On Using NatQuery To Extract Data From ADABAS Building a Dynamic Variable Presented by Treehouse Software, Inc.
NatQuery is a workstation-based tool that provides for a Graphical User Interface (GUI) that allows an End-User to easily extract data from a remote ADABAS / Natural Server, and then integrate this data into common workstation tools. Shown above is the NatQuery “desktop”.
Our user will begin by clicking the “New Query” icon. This opens the “Select Files” window. Our user wishes to ask for EMPLOEES named X, where X = a dynamic variable.
Having selected the EMPLOYEES file, we are now presented with the “Select Fields from EMPLOYEES” window.
Our user has chosen the four fields in the right side pane for use with this query. This is done by double clicking or, highlight, and ADD, the field.
NatQuery will now ask the user if they wish to include files that NatQuery knows have a relationship with Employees. NatQuery is smart enough to have omitted those files without links to EMPLOYEES. This knowledge is brought about by the cardinality rules inherent within your existing ADABAS Database Files and as governed by the ADABAS DBA.
Having clicked the “Continue” button in the prior window the user is now presented with the “Selection Logic” window. Only specific Employee records are being asked for, and so, the user has clicked the “Apply Selection Logic” in the Selection Mode box.
In the “Selection Logic to Apply” box, the user will chose, name, is equal, to a variable. Clicking the variable button will allow the user a choice of many different variable types for their use in building this specific query.
Clicking the Variable button brought up the “List Variables” window. Currently there are no variables being used in this query. We wish to add a “dynamic” variable that will allow the user to substitute names into the query at will. The user will click the ADD button to begin the process of adding a variable.
In the “Define Variable” window the user can name the new variable, choose to include it in the output, change the format and length, and most importantly chose which of five types of variables they will need for this query.
In this example the user will reuse a field name for the variable name. Because they wish to have the ability to change the employee (variable) name in the future they have clicked the “Dynamic” button in the Type and Value box
Clicking the “Define Value” button brings up the “Define Dynamic Name” window. For the purpose of this query the user will click the “Dynamic Input” button.
The format and length will be determined by the last field chosen in the “Selection Logic to Apply” box in the “Selection Logic” window. The “OK” and the “HELP” buttons become enabled with the Dynamic Input selection. By clicking “OK” the user will populate the “Current Value of Variable” box.
Pressing “OK” in the “Define Dynamic Name” window brings the User back to the “Define Variable” window. By clicking “OK” we will have completely built an ad hoc dynamic variable.
The dynamic variable is now available to the user. As it is not a part of the query as yet the Modify, Delete, and Select buttons are active to allow the user a choice of action. By clicking the “Select” button this variable will become part of the query.
Here we see the variable as part of the query. This concludes the building of the query by our user. It is now ready to be submitted, and so the user will click the “OK” button.
The user may now review the query prior to sending it to the server. If satisfied, the user will click the “Send to Server” icon.
In the “Query Description” window the user may change the default title (Program Name) of the new query, add a short description of the query, and or add a longer more detailed description of the new query.
Our user has chosen to fill in both the “Short” and “Long” descriptive field boxes but not to change the default “Program Name.” They will now click the “OK” button.
The user is now presented with the “Send To Server Options” window. This window allows the user to retrieve the needed information in a variety of ways. Under “Extract Type, the user has chosen “Download into Excel.”
After clicking the “OK” button in the “Send To Server Options” window, the user will be asked to supply the “Dynamic Input Value” which will be their chosen variable name (EMPLOYEE Name), in this case the user has chosen the name “SMITH.”
The default criteria calls for “Upper Case Only” but may be changed by clicking on the checked box. In this example the user knows they will need to have upper case characters so they will allow the default setting and click the “OK” button.
The default Database Field Names will be used as Column Headers in the Excel “target”. However, the user may edit these as they wish through the “Edit” tab on this screen.
The user may double click on the “Field Name” of choice in the “Database Field Information” pane or single click and then click “Edit.”
Either action will bring up the “Output Field Information” window. Here the user may rename the column and with certain variables they may also change the Format and Length.
Our user has renamed the variable output field (column header in the case of Excel spreadsheet) to be “USERVAR Employee.” They will now click “OK.”
The dynamic variable will now appear as the column header “USERVAR Employee” of the populated Excel spreadsheet.
Because this is the opening session for the user, they are prompted for their FTP session password. This password will be retained throughout the users session, if the user logs off then the password is deleted from NatQuery’s memory.
With the FTP security cleared, NatQuery will now ask the user if they still would like to send their query to the server. The user will click yes, if they are ready to send their query to the server. If however the user needs to do some other task, they may click “No” and still preserve their newly built query.
NatQuery has now created a local log file in which the users request number, slot number and query status (PENDING or OPEN) are recorded.
In the “Check Server” window we see that the users request 133, is pending. This means that the information has not yet been processed by the server.
Clicking the “Check Server for Update” button tells the user that request 133 is done, how many records were looked at and how many were returned. It also reminds the user what “target” they chose to download the data to, in this case the user has chosen Excel.
By clicking anywhere on the “Log Status” report the user will highlight all the information. This action invokes the “Retrieve Request Output” button and the “Clear Selection Request” button. In this example the user will click on the “Retrieve Request Output” button.
The user will need to chose the directory where they will store their query information. A default directory will have been designated by the database administer, but the user may now direct the output to a directory of their choosing.
NatQuery informs the user that the download was successful and that it has been stored in the designated directory.
With the data downloaded to a specified directory file, the user could now click “No” and move on to perform other tasks. If the user clicks the “Yes” button they will download the returned information into Excel.
Several steps back in the “Define Variable” window the user had the option to include or exclude the dynamic variable in the output file. In the Excel spreadsheet that the user created, the Employee name SMITH appears twice because they chose to include the USERVAR Employee in the extract information.
Upon closing Excel the user will see the “Check Server” window showing each “slot’ allocated to the user as being either open or pending. The user may retrieve any pending queries or click “OK” to return to the open query on the desktop.
The user now has many choices; Save and Modify the original request, Save and Close the open query, or they may chose not to save the existing query at all. By selecting just the “Modify” button the user will be able to change the current query.
The “Selection Logic” window will now allow the user to Modify the entire query or just portions of it. In this example the user wishes to exclude the dynamic variable from the output file. By clicking the variable button the user will invoke the “List Variable” window.
The user does not wish to add another variable. They merely wish to exclude the existing variable from the output. Clicking on the variable listed in the “Value’ pane will invoke the Modify button. Through the use of the Modify button and the resulting “Define Variable” window the user will be able to click off the “Include with Extract” box.
The user knows that the “Last Name” and the “Dynamic Input” will both be the Employees last name. The ”Define Variable” window that appears here, tells the user that certain parts of the variable’s make-up can not be changed.
By default the “Include with Extract Fields” will be checked. Here the user has unchecked the box and it will therefore not be included in the extract output. The user will now click OK.
Nothing has changed within the query structure itself. When the user clicks the “Send to Server” icon they will be asked for the variables value. Instead of SMITH the user in this example now types in JONES.
The user in this example has dynamically changed the Employee name from “Smith” to “Jones.” The Variable “USERVAR_Employee” is no longer a part of the output.
The user again has choices; Save and Modify this new request, Save and Close the new query, or they may chose not to save the query at all. In this window the user has already elected to close the query, but they forgot to “save” it first.
By clicking the “Query Description” icon the user may rename the query to reflect the changes made. Depending on the breadth of these changes, this may or may not be appropriate.
The user has clicked on the “Save” icon. This “saved” the last modified query request created by the user.
The viewer should be aware that the building of this sample query was governed by certain limitations that would be pre-defined by the clients Data Base Administrator.
URL: www.treehouse.comE-Mail: tsi@treehouse.com Phone: (412) 741-1677