USF Sample 01 This sample is a simple OPM RPG application that allows you to query for an individual and display data about the person. Function keys are provided that allow you to see an image of the person (F9) or listen to an audio file (F10) the person created. The program (USF01RG) is geared toward students, and the query is driven by a student ID number. It uses a simple database (STUDENTS) to store the information about the students. DFU can be used to enter information about the students. The STDIMG field should contain the name of an Ultimedia System Facilities image object. The STDAUD field should contain the name of an Ultimedia System Facilities audio object. The application assumes that Ultimedia System Facilities is already started on the workstation on which the application is being run. The program uses the following APIs QUMBUSER to query for the user's remote location name and network ID. This is used by the present object API to tell it where to present the multimedia data. QUMBQATT to query the multimedia repository to see if the student has image or audio data available. This API will return an object ID which will be used by the present object API to tell it which object to present. QUMBPOBJ to present the image or play the audio for the student. The following instructions describe how to restore and build this sample on your AS/400. 1. Create a library on the AS/400 called USFSAMPLES. You can use the following command. CRTLIB LIB(USFAMPLES) TEXT('USF Sample code') 2. Create a save file to hold the sample code. CRTSAVF FILE(USFSAMPLES/USF1SAMP) TEXT('USF sample 1') 3. FTP the USF1SAMP.SAV file into the USFSAMPLES/USF1SAMP save file just created. To sure to use binary mode during the FTP. 4. Restore the USFSAMP1 source file using the following command. RSTOBJ OBJ(USFSAMP1) SAVLIB(USFSAMPLES) DEV(*SAVF) SAVF(USFSAMPLES/USF1SAMP) This will restore a source file called USFSAMPLES/USFSAMP1. This readme text can also be found in the member called $README. 5. Run a CRTCLPGM command for the CRTSAMP01 member in USFSAMPLES. 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 file is located. CALL CRTSAMP01 USFSAMPLES 7. Then update the STUDENTS database with student data and the application can be run with the following command. CALL USF01RG When the application is run a spool file (USF01PR) is created that will show the results from the Ultimedia System Facilities API calls. This file can be used to help debug if a problem occurs.