USF Sample RUNUSFAPI This sample provides an AS/400 command interface to run the USF APIs. It uses an ILE C command processing program to take the command input and call the APIs. The command has some prompt and help text so that you can interactively try out the commands and learn how to use them. It also show how the APIs can be called from an ILE C program. The command uses a user space that is used to hold the container ID, object ID and async ID for the user running the command. This will allow the command to be run to query for an object and run a second time to present the object and the object ID will be saved saved by the command so it will not have to be keyed into the command parameters. The user space is set up to hold 100 user IDs with their data. When an object name is entered in the command an is found it's object ID is saved. From then on you can use the value *PRV for the object name and the previously found object ID will be used. If you don't want to search for the object name in a specific container use the value *NONE as the container name. The CaptureObject, PresentFile, and Present Object APIs will save the async ID that is returned. If the value *PRV is entered for the async ID on the following APIs the saved async ID value is used. ControlProcess ObjectSelection QryWinPositionAndSize RtvMultimediaMessage SetWinPositionAndSize The application assumes that Ultimedia System Facilities is already started on the workstation on which the application is being run. The following instructions describe how to restore and build this sample on your AS/400. 1. Create a save file to hold the sample code. The instructions use the QGPL library as the library where the save file is created. CRTSAVF FILE(QGPL/USFAPI) TEXT('RUNUSFAPI save file') 2. FTP the USFAPI.SAV file into the QGPL/USFAPI save file just created. To sure to use binary mode during the FTP. 3. Restore the RUNUSFAPI library file using the following command. RSTLIB SAVLIB(RUNUSFAPI) DEV(*SAVF) SAVF(QGPL/USFAPI) RSTLIB(RUNUSFAPI) This readme text can also be found in the member RUNUSFAPI/QCLSRC($README). 4. Add the RUNUSFAPI library to the library list. 5. Run a CRTCLPGM command for the MAKEUSFAPI member in RUNUSFAPI/QCLSRC. This will create a CL program to create the rest of the application. 6. Call the CL program passing in the library where the source files are located. CALL RUNUSFAPI/MAKEUSFAPI RUNUSFAPI The MAKEUSFAPI will create a user space object in the RUNUSFAPI library. You may have to change the QALWUSRDMN system value to add the RUNUSFAPI library to the list in order for the create user space to work. After adding the RUNUSFAPI library to the library list you can then run or prompt on the RUNUSFAPI command from the command line or enter the command GO RUNUSFAPI to go to the menu of USF APIs.