USF Work with Containers and Work with Objects This sample is a ILE RPG application that uses UIM to perform Work with functions for USF containers and objects. It provides functions to create containers and objects, change containers and objects, copy objects, present objects, and display attributes of containers and objects. The application assumes that Ultimedia System Facilities is already started on the workstation on which the application is being run. NOTE: Some of the programs use pointer arithmetic which is only supported on systems with V3R7 or greater. The following is a list of USF APIs used and which source member they are used in USF API SOURCE MEMBER ------- ------------- QUMBCRTO USFCAC USFOAC QUMBSATT USFCAC USFOAC QUMBRATT USFCAC USFCINC USFOAC USFOINC QUMBDLTO USFCAC USFOAC QUMBQOBJ USFCINC USFOINC QUMBQATT USFCINC USFOINC QUMBCPYO USFOAC QUMBQUSR USFOAC QUMBPOBJ USFOAC The following instructions describe how to restore and build this sample on your AS/400. 1. Create a library on the AS/400 called WRKUSF. You can use the following command. CRTLIB LIB(WRKUSF) TEXT('USF Work with sample') 2. Create a save file to hold the sample code. CRTSAVF FILE(WRKUSF/WRKUSFSV) TEXT('USF Work with save file') 3. FTP the WRKUSFSV.SAV file into the WRKUSF/WRKUSFSV save file just created. To sure to use binary mode during the FTP. 4. Restore the WRKUSF source file using the following command. RSTOBJ OBJ(WRKUSF) SAVLIB(WRKUSF) DEV(*SAVF) SAVF(WRKUSF/WRKUSFSV) RSTLIB(WRKUSF) This will restore a source file called WRKUSF/WRKUSF. This readme text can also be found in the member called $README. 5. Add the WRKUSF library to the library list. 6. Run a CRTCLPGM command for the MAKEWRKUSF member in WRKUSF. This will create a CL program to create the rest of the application. 7. Call the CL program passing in the library where the source file is located. CALL MAKEWRKUSF WRKUSF There will be two commands that are created. They both have one parameter which is the initial container to work with. The commands are: WRKUSFCNR WRKUSFOBJ If no value is entered for the command parameter the command will use the base container as the initial container. An example of the commands would be: WRKUSFOBJ SAMPLES which would list all of the objects in the samples container.