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
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:
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.