Previous Topic Next topic Print topic


Example Fileshare Client

An example Fileshare Client is provided in the fileshar.project in the demo folder of your COBOL development system.

Note: You cannot run this example Fileshare Client unless TCP/IP support is installed and configured on your machine and you have a working TCP/IP connection to a remote machine on which you have installed and correctly configured a Fileshare Server. A Fileshare Client uses the Common Communications Interface CCI_ccitcp2 is running on. To do this, you must run the CCI installation utility.

The CCI installation utility will prompt you for a host name. If you do not know the TCP/IP host name of the system that the CCITCP2 daemon is running on, contact your system/network administrator.

To run the example Fileshare Client:

  1. Open fileshar.app in the demo directory.
  2. Run the application by clicking on Run on the Debug menu. (The first time that you run this application you will be prompted to rebuild the project. Rebuild the project by answering Yes to the prompt and then select Run from the Debug menu again.)
  3. The Fileshare Client prompts you:

    Do you want to use Fileshare (y/n):

    Enter y. (If you enter n, the Fileshare Client still runs but uses a local file rather than connecting to a Fileshare Server.)

  4. The first time you run this application, the Fileshare Client prompts you:

    Enter the name of your fileshare server:

    Enter the name of the Fileshare Server to which you want to connect.

    A Fileshare Client configuration file, fhredir.cfg, is created in the current directory containing the name of the Fileshare Server that you specified.

    When you subsequently run this application you are prompted:

    A fileshare client configuration file fhredir.cfg already exists in the current working directory. Overwrite (y/n).

    If you want to use the Fileshare Server specified in the existing configuration file, enter n. The following message is displayed:

    The existing fileshare client configuration file will be used

    If you want to specify a different Fileshare Server, enter y. You are prompted to enter the name of the Fileshare Server that you want to connect to:

    Enter the name of your fileshare server:

  5. Once you have specified a Fileshare Server, the Fileshare Client prompts you:

    Enter the name of the file you want to write to:

    Enter the name of the file that you want to write to.

  6. At this stage you are prompted:

    Do you want to continue ? (y/n)

    If you enter n, you are prompted:

    Press <return> to quit

    Press Enter to terminate the Fileshare Client.

    If you enter y, the file will be created on the Fileshare Server and 10 records will be written to it before you are prompted:

    Enter: <1> COMMIT

    <2> ROLLBACK

    Enter 1 to write the records to the file or 2 to delete them. Another 10 records will be written and you will be prompted again to commit or rollback.

  7. Finally, a list of the records written to the file is displayed and you are prompted:

    Press <return> to quit

    Press Enter to terminate the Fileshare Client.

Previous Topic Next topic Print topic