File Transfer to a Host Session

The following procedure is useful for uploading files from the PS/2 to a host system. Both methods hide file transfer programs from the user and thus helps him maintain a consistent way of working with the WPS.

Two alternative approaches are used; the first creates an icon onto which the user can drop the file to be transferred, the second simply adds a file transfer command to the pop-up menu.

File Transfer Icon

  • Create a folder to hold the files that are to be uploaded

  • Copy the CMD file in Figure "REXX Procedure for Host Upload" into that folder

  • Create a program reference by pulling a program template into your folder

  • Open a Settingsview for the program reference

  • Put your CMD file path and filename in the Physical Name field

  • Put %* in the Parameters field

  • Close the Settings view.

    The following REXX procedure is called when an object is dropped on the program reference icon that was created above. The name of the object is passed to the procedure which then eliminates the path information from the object. A target file type is set up and an appropriate send option (ASCII or binary) is determined. Then the Communications Manager SEND command is used to transfer the file.

    This REXX procedure does not take care of all possible problems. For instance, if the folder is on the desktop, a filename is created with the desktop folder name. As that name contains blanks, it needs to be enclosed in quotes, which is not done here. Therefore the upload folder needs to be in some other folder. However, the procedure shows how a simple REXX procedure can help create an object-oriented environment for a user.

    File Transfer from a Pop-up Menu

    For an alternative to the file upload icon, you can:

  • Create a folder to hold program references

  • Peel a program icon off the program template in Templates and drag it to this new folder

  • Enter the path and filename of your file upload utility

  • Enter the following for parameters: %* h[Enter host session letter (a,b,c,d)>]:

  • Set the working directory to the path where your file upload utility resides

  • Click on the General tab and change the name to "Upload to Host"

  • Click on Associations and type an asterisk in the Names field, then click on the "Add" push button

  • Close the Settings window.

    Now, when you click on any file in your system with the right mouse button, you can click on the arrow to the right of "Open" and you will be offered "Upload to Host" as one of the programs that may be executed against it.


    [Back: Prevent Programs Restarting at IPL]
    [Next: Limiting a User's Access to Settings]