Receive Data from Host

To open the Receive Data from Host window from the session window of a 3270 Display session, 5250 Display session, or VT Display session, click Actions > Transfer Data > Receive Data from Host.

The Receive Data from Host window allows you to use and manage SQL statements. If your Z and I Emulator for Web client is configured to do so, you can perform the following actions:

  • Run an existing SQL statement and view the results.
    • The remote database server to which you connect can be on a different host than the host running your emulator session.
  • Modify and test an SQL statement using the SQL Wizard.
  • Create a new SQL statement.
  • Delete an existing SQL statement.
  • Import an SQL statement from a file, or Export an SQL statement to a file.

The Saved SQL Statements area lists the names of SQL statements currently available, either within the current session or within your personal library. Within the Saved SQL Statements area:

  • Click the + or - icon beside Current Session to expand or collapse this category.
  • Click the + or - icon beside Personal Library to expand or collapse this category.

Some of the options described below possibly do not appear on your Receive Data from Host window, depending on how your Z and I Emulator for Web administrator has configured your Z and I Emulator for Web client.

Open
Click Open to open the currently selected SQL statement:
  • If you configured and saved the SQL statement in the Configure SQL Statement window, then Z and I Emulator for Web opens the statement in the Configure SQL Statement window.
  • In contrast, if you configured and saved the SQL statement in the SQL Wizard, then Z and I Emulator for Web opens the statement in the SQL Wizard.
Run
Click Run to run the currently selected SQL statement.
  • If the statement is successful:
    • If the SQL statement is an SQL Select statement:
      • If the output of the SQL Select statement is not directed to a file, then Z and I Emulator for Web opens the Query Results window to show the results of the statement.
      • In contrast, if the output of the SQL Select statement is directed to a file, then Z and I Emulator for Web displays a confirmation message to indicate that the statement is successful.
    • If the SQL statement is an SQL Insert, Update, or Delete statement, then Z and I Emulator for Web displays a confirmation message to indicate that the statement is successful.
  • If an error occurs, Z and I Emulator for Web displays an error message.
New
Click New to open the Configure SQL Statement window and create a new SQL statement.
Delete
Click Delete to delete the currently selected SQL statement from the current session or from your Personal Library. A message prompts, "Are you sure?"
Import
Click Import to read an SQL statement from a file and add it to the current session. The SQL statement is added to the list of SQL statements under Current Session. Follow these steps:
  1. Click Import.
  2. In the Import window, select a file containing an SQL statement, or type in the path and name of the file.
  3. Click Open.
Only one SQL statement is contained in a file. The default file extension is .sql.
Export
Click Export to store the selected SQL statement into a file. Only one SQL statement is stored per file. The default file extension is .sql.

Related topics: