1 / 37

An End-User Perspective On Using NatQuery Building a Dynamic Variable

An End-User Perspective On Using NatQuery Building a Dynamic Variable. www.natworks-inc.com. T. 802 485-6112. Note this example Of NatQuery is being run against ADABAS on Linux in a PC network environment.

zion
Download Presentation

An End-User Perspective On Using NatQuery Building a Dynamic Variable

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An End-User Perspective On Using NatQuery Building a Dynamic Variable www.natworks-inc.com T. 802 485-6112

  2. Note this example Of NatQuery is being run against ADABAS on Linux in a PC network environment. The following screens may differ in your environment but the basic process of building a dynamic variable will be similar. NatQuery is a workstation-based tool that provides a Graphical User Interface (GUI) allowing an End-User to easily extract data from a remote ADABAS / Natural mainframe, then integrate this data into common workstation tools. Shown above is the NatQuery “desktop”. The user will begin by clicking the New Query icon.

  3. Our user wishes to ask for EMPLOEES named X, where X = a dynamic variable. A dynamic variable will allow the user to substitute new EMPLOEE names into this query without having to write the query again and again. Clicking the New Query icon opens the “Select Files” window. Our user will chose the EMPLOYEES file.

  4. Having selected the EMPLOYEES file, we are now presented with the “Select Fields from EMPLOYEES” window.

  5. Our user has chosen the three fields in the right side pane for use with this query. This was done by double clicking on the Field name, or highlight and then ADDing the field. The fourth field of CITY is about to be selected for inclusion.

  6. NatQuery now asks the user if they wish to include files that NatQuery has been told have a relationship with Employees. NatQuery omits those files without links (relationship) to the EMPLOYEES file. This knowledge is governed by the ADABAS DBA.

  7. Having clicked the “Continue” button in the prior window the user is now presented with the “Selection Logic” window. The user only wants specific Employee records so they have clicked the “Apply Selection Logic” in the Selection Mode box.

  8. In the “Selection Logic to Apply” box, the user will chose, “Where Field”, “is” equal, “to” a, variable. Clicking the Variable button will allow the user a choice of available variables, if there are any, or a chance to Add (build) a specific variable.

  9. Currently there are no variables available for use in this query. Adding a “dynamic” variable will allow the user to substitute different names into the query at will. The user will click the ADD button to begin the process of adding a variable.

  10. In the “Define Query Variable” window the user can name the variable, choose to include it in the output, choose the format and length, and most importantly, choose which of five types of variables they wish to build. This window shows the default settings.

  11. In this example the user will reuse a Field name for the dynamic variable name. Because they wish to have the ability to change the employee (last) name at will they have clicked the “Dynamic” variable button in the Type and Value box this enabled the Define Value button.

  12. 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. This action gives default values for the Format and Length windows, the user is free to change this information at their discretion.

  13. Pressing “OK” in the “Define Dynamic #Name” window brings the User back to the “Define Variable” window. By clicking “OK” here the user has finished building their dynamic NAME variable.

  14. The dynamic variable is now available to the user. As it is not a part of the query yet, the Modify, Delete, and Select buttons are active allowing the user a choice of action. By clicking the “Select” button this variable will become part of the query.

  15. Here we see the variable is now incorporated into the query. This concludes the building of the query by our user. The query is now ready to be submitted, and so the user will click the “OK” button.

  16. The user may now review the query. If satisfied, the user will click the “Send to Server” icon. The next few steps would reflect expected windows as seen during the submission process. This presentation will skip these steps and focus on using the new dynamic variable.

  17. After completing the steps required 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.”

  18. The “MS Excel Extract Configuration - Field Information” window lets the user edit the column headers to reflect more user friendly titles. To edit a Field the user would highlight the “Field Name” of choice in the “Database Field Information” pane and then click the “Edit button.”

  19. Our user has chosen Name, now the user may rename the column and with certain variables they would also be able to change the Format and Length.

  20. Our user has renamed this variable output field (output fields are used as column headers in the case of MS Excel) to be “USERVAR Employee.” They will now click “OK.”

  21. The dynamic variable will now appear as the column header “USERVAR Employee” of the populated Excel spreadsheet. The next few steps are the expected screens seen by the user during the submission process. For the purpose of this session we will skip over these steps.

  22. Having completed the retrieval process, NatQuery now asks if the user would like to go ahead and populate the requested Target. In this case the user chose to see their data in an Excel™ spreadsheet.

  23. Here we see the 19 records that were returned for the users query. In the spreadsheet, the Employee name SMITH appears twice because they chose to include the USERVAR Employee in the extract information. This was an option when the user created the Dynamic variable and it could have been excluded.

  24. 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 including Scheduled Requests or click “OK” to return to their open query on the desktop.

  25. The user now has many choices; Modify the dynamic variable and run the query again, Save and Close the query, modify the query, or they may choose to close the query without saving it.

  26. By selecting the “Modify” button the user will be able to change the Selection Logic of the current query.

  27. The “Selection Logic” window will 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.

  28. The user does not wish to add another variable. They merely wish to exclude the existing variable from the output. Aside from using the Modify button on the Query Selection Logic window, the user also has the option of clicking on the Query Variables icon to be taken immediately to the List Query Variable window. They would then highlight the desired variable and this would enable the Modify button.

  29. Because this specific variable is being used in the query’s Selection Logic this message tells the user that certain parts of the variable’s make-up can not be changed. After clicking OK in the message box the user will be able to un-click the “Include with extracted fields” checkbox.

  30. Because this variable has been modified the user will need to click OK to continue.

  31. Nothing has changed within the query structure itself. When the user clicks the “Send to Server” icon they will be asked for the dynamic variable again. Instead of SMITH the user in this example can now types in the last name “JONES” for instance.

  32. Note that the dynamic variable USERVAR EMPLOYEE is no longer part of the Database Field information – it will not be returned with the retrieved query data.

  33. After the submission process has completed the retrieved data is able to be downloaded into the target. Note that “Jones” is not repeated a second time as “Smith” was in the previous query.

  34. 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. The user has elected to close the query, but they forgot to “save” it first.

  35. NatQuery reminds the user they have in some way changed the query from its original form. If the user says Yes the query will be saved with all changes. If the user says No and the query has previously been saved then it will be saved in the original parameters specified by the user.

  36. The user chose Cancel in the last message box so that they could add some text to their long query description. 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 can now Save and Close this query.

  37. Simple Ideas with Enormous Potential URL: www.natworks-inc.comE-Mail: info@natworks-inc.com454 South Main Street Northfield, VT 05663 T. 802 485-6112

More Related