04
Mon, Nov
1 New Articles

Getting Started with Multimedia on the AS/400

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Ultimedia System Facilities is an OS/400 no-charge feature that brings exciting new multimedia function to the AS/400. Every AS/400 beginning with V3R1 can support images, sound, video, and graphics and text documents. Ultimedia System Facilities acts as a server for large multimedia objects. It is a cooperative client/server application with client code available for AS/400 Client Access for DOS Extended, Windows 3.1, OS/2, and Optimized for OS/2.

Ultimedia System Facilities is free with OS/400 and Client Access. Just use the Work with Licensed Programs (GO LICPGM) menu and install the host code from your CD-ROM or tape. Then, from your programmable workstation, attached to the AS/400 using Client Access shared folders, download the PC code.

Using Ultimedia System Facilities' graphical user interface (GUI), you can develop new multimedia content. Plus, it contains APIs for RPG, COBOL, C, and CL that allow you to add multimedia content to existing AS/400 applications without rewriting them.

Ultimedia System Facilities includes all of the traditional benefits of the AS/400 and is integrated with the base system. Ultimedia System Facilities provides a powerful, natural interface that builds on system security, system management, ease of use, and networking. The multimedia object repository has a GUI called the Multimedia Catalog.

Ultimedia System Facilities supports object management and tracking. Once you either create your new multimedia content or import it into Ultimedia System Facilities from your favorite authoring tool, you register it in the repository and never worry about where it is physically stored. You just call it by name.

With Ultimedia System Facilities, you can use your choice of storage medium, be it system DASD, host- or LAN-attached 3995 optical storage devices, or PC LAN servers. Ultimedia System Facilities can manage your analog devices as well as be the storage point for digitized multimedia.

Ultimedia System Facilities also takes advantage of functions within OS/2 and Windows to capture and present your new multimedia objects. Any multimedia card that uses Media Control Interface (MCI) drivers can be used with Ultimedia System Facilities. A PC is used to create and capture as well as play back or present multimedia data. See the sidebar, "Ultimedia Requirements for Windows," for more information about using Ultimedia System Facilities on your system.

Ultimedia System Facilities utilizes some new concepts and unique features, such as containers, key objects, and sequences.

Containers are simply folders in which to organize your work. The multimedia repository is the "base container" and is the parent for all other objects and containers. Containers can hold any kind of Ultimedia System Facilities object, and many other types of objects, at once. You may want to put all the new multimedia objects for a related topic into one container.

Design considerations for containers are important. Rick Flanagan of SUNRISE Systems Group, Inc. of Sanibel Island, Florida, wrestled with the idea for his application and decided simplicity was key. He opted for one container per rental property vs. one container with all front views, one for all rear views, and one for all the floor plans. Maintenance has been greatly simplified by his choice because updates for a single rental unit always go into the same container. If a unit is sold and no longer available for rental, the cleanup is simple-delete one container. Naming a container is also easy. He uses the address of the property.

Key objects are used to organize and select the best multimedia objects for a given user, taking into account the PC the user is signed on to at the time. A collection of related objects, called key objects, is created. A template is used to create the empty key object.

Next, you simply drag and drop the related objects into the key objects. In a university, for example, a self-study lecture called Economics 101 may be available as text in English and Spanish and as an audio file in French or German. There may also be a video file of the original presentation or a digitized set of the foils presented by the professor.

When the student signs on to the self-study system, the system may ask for certain student identification. It will then call a single Ultimedia System Facilities API called "Present an Object" to play the class to the student. The API basically says, "Present the multimedia object named Economics 101," and Ultimedia System Facilities does the rest. User-specified criteria are used by the system to select the best version for each student.

So, for example, Angela, who prefers English and whose very basic PC has no audio or video cards, will read the English text version of the class. Dominique, who has a sound card and prefers French, will listen to the audio file of the class in French. Paul, who has a multimedia PC and prefers video, will see the class as it was originally presented. Peter, who also has a multimedia PC but prefers graphics, will see the foils.

Without a concept like key objects, it is difficult to write a general multimedia application when users have different national language preferences and different PC capabilities.

Sequences are simple slideshows you can make with Ultimedia System Facilities. Again, as with key objects, you take a template for a sequence and drag and drop your objects onto a spreadsheet-like interface. There you can specify where to have the object appear on the desktop, when to begin and end, and what size to make it. In minutes, you have a business presentation ready to go.

In this article, I've included a simple RPG application that allows you to query for an individual and display data about the person (see 1). Function keys are provided that allow you to see an image of the person or listen to an audio file the person created (see 2). For example, the Show Image key displays a picture of the person (see 3).

In this article, I've included a simple RPG application that allows you to query for an individual and display data about the person (see Figure 1). Function keys are provided that allow you to see an image of the person or listen to an audio file the person created (see Figure 2). For example, the Show Image key displays a picture of the person (see Figure 3).

In this case, the program is geared toward students, and the query is driven by a student ID number. The code is based on a program used by IBM's Partners in Development class to introduce customers to Ultimedia System Facilities. It uses a simple database, as shown in 4.

In this case, the program is geared toward students, and the query is driven by a student ID number. The code is based on a program used by IBM's Partners in Development class to introduce customers to Ultimedia System Facilities. It uses a simple database, as shown in Figure 4.

Audio and image were easily added to this application by adding to the main screen function keys that call Ultimedia System Facilities APIs to present the image or audio files, if they exist. F9 presents images, and F10 plays audio files.

The application shown here assumes that Ultimedia System Facilities is already started on the workstation on which the application is being run. It then uses the following APIs:

o QUMBQUSR to query for the user's remote network ID and remote location name. This will be used to present the multimedia objects on the correct workstation.

o QUMBQATT to query the multimedia repository to see if the student has image or audio data available to be displayed.

o QUMBPOBJ to actually present the image or play back the audio file for the student. This API presents and plays back any type of object stored in the repository.

The source for the program and its accompanying files is shown in Figures 5-7.

To begin programming with Ultimedia System Facilities under Windows, as in this example, you need to know that the RPG include members are stored in the QAUMBRPG source file. If you want to program a PC application, refer to the OS/400 Ultimedia System Facilities Programming manual for further instructions on header files, import libraries, and how Ultimedia System Facilities PC APIs can handle returning more than 64KB under Windows.

Customers working with Ultimedia System Facilities are excited about the product. Rick Flanagan modernized his Reservation Board RPG application in a few hours.

Reservation Board is a vacation rental and resort software package that offers text information on rates and descriptive information online. However, the people taking the reservations have to page through books of photos and descriptions to answer questions about the rental units for their customers.

Rick can now add photos of the units and graphics of the floor plans. Reservation Board began as a S/36 RPG application. In 1987, Rick took it to a PC using Baby/36. Later, when IBM announced the AS/400 D02, Rick had found the "right size and price AS/400" and brought the application over to the AS/400 environment. Since then, he has continued to evolve his application on the AS/400.

I asked Rick to describe his experience using Ultimedia System Facilities. "It was good," he said. "For an old RPG programmer, it's just the thing to get you into the modern world."

Rick had come to an IBM Rochester Partners in Development class not even used to PCs. He was given a quick overview of PC terms and shown some RPG source code with Ultimedia System Facilities APIs added to it. In just 90 minutes, he had images in his application. The images had been prescanned for him, and much of the time was actually spent loading his applications onto the AS/400. The second day, he experimented until he had three images on the reservations screen placed just where he wanted them.

Rick said, "Ultimedia System Facilities is exactly what they want." Customers had requested this level of function for years."

Take a few minutes and think of all the customer requests you have on the back burner because multimedia has been too complicated. The AS/400 can help you organize your multimedia objects, manage them for you, and make your application look as though it belongs in the 21st century.

It can all be done without redesigning and rewriting your existing RPG applications and without retraining customers and end users. They just become more and more productive. Make your application sell itself off the shelf. Go one step further and create online multimedia training packages for your application and increase your customers' satisfaction and self-reliance while you boost your sales, your image, and your bottom line.

Nancy M. McGinnis is the multimedia project manager for IBM Rochester.

REFERENCES

OS/400 Ultimedia System Facilities Programming V3R1 (SC41-3652, CD-ROM QBKAS300).

To contact Partners in Development, call 800-365-4426, ext. 400.


Getting Started with Multimedia on the AS/400

Ultimedia Requirements for Windows

Ultimedia System Facilities can be used with a Windows-based PC. The PC must be an 80386 or higher. A 486 with 8MB of RAM is recommended. The display can be a VGA, SVGA, or XGA. You will also need a communications connection, such as a token-ring, to the AS/400.

Software required includes DOS Version 5.0 or higher, Microsoft Windows 3.1 with Multimedia Extensions, Client Access/400 for Extended DOS, or Client Access/400 for Windows and a communications protocol supported by Client Access/400.

Many popular cards are supported with their MCI drivers:

o Creative Labs Soundblaster, Soundblaster PRO, OPL2, OPL3, MVC, and Soundblaster 16

o Media Vision Pro Audio Spectrum 16

o Creative Labs Video Blaster and Video Blaster FS2000

Getting Started with Multimedia on the AS/400

Figure 1: Sample Ultimedia Application


Getting Started with Multimedia on the AS/400

Figure 2: Selecting a Sample Record


Getting Started with Multimedia on the AS/400

Figure 3: Showing a Sample Image



Getting Started with Multimedia on the AS/400

Figure 4: Physical File STUDENTS

 *=============================================================== * To compile: * * CRTPF FILE(XXX/STUDENTS) SRCFILE(XXX/QDDSSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A R STD A STDNBR 2 A STDNAM 10 A STDCPY 30 A STDSTN 2 A STDOCC 30 A STDIMG 50 A STDAUD 50 A K STDNBR 
Getting Started with Multimedia on the AS/400

Figure 5: Display File USF001DF

 *=============================================================== * To compile: * * CRTDSPF FILE(XXX/USF001DF) SRCFILE(XXX/QDDSSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A DSPSIZ(24 80 *DS3) A PRINT A REF(STUDENTS) A R MAIN A CA03 A 1 10'AS/400 ULTIMEDIA SYSTEM FACILITIES' A COLOR(RED) A 1 45'LABORATORY EXERCISE' A COLOR(RED) A 3 72 DATE EDTCDE(Y) A 5 30'Student Query' A COLOR(WHT) A 7 10'Student Number' A STDNUM 2D B 7 26 A 90 ERRMSG('Student number not found.') A 9 10'Type student number and press ent- A er.' A COLOR(BLU) A 22 10'F3=Exit' A COLOR(BLU) A R DETL A N09 CA09 A N10 CA10 A CA12 A 1 10'AS/400 ULTIMEDIA SYSTEM FACILITIES' A COLOR(RED) A 1 45'LABORATORY EXERCISE' A COLOR(RED) A 3 72 DATE EDTCDE(Y) A 5 30'Student Information' A COLOR(WHT) A 7 10'Student Number' A 8 10'Student Name' A 9 10'Company' A 10 10'Laboratory Station' A 11 10'Occupation' A 09 17 10'No image available.' A COLOR(RED) A 10 18 10'No audio available.' A COLOR(RED) A N09 22 20'F9=Show Image' A COLOR(BLU) A N10 22 40'F10=Play Audio' A COLOR(BLU) A 22 60'F12=Cancel' A COLOR(BLU) A STDNBR R O 7 30REFFLD(STDNBR) A STDNAM R O 8 30REFFLD(STDNAM) A STDCPY R O 9 30REFFLD(STDCPY) A STDSTN R O 10 30REFFLD(STDSTN) A STDOCC R O 11 30REFFLD(STDOCC) 
Getting Started with Multimedia on the AS/400

Figure 6: Printer File USF001PR

 *=============================================================== * To compile: * * CRTPRTF FILE(XXX/USF001PR) SRCFILE(XXX/QDDSSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A R QUOUT A 1 1'USER PROFILE:' A USERID 10 1 40 A 2 1'REMOTE NET ID:' A QURID 8 2 40 A 3 1'REMOTE LOCATION NAME:' A QURLN 8 3 40 A 4 1'QUERY USER ERROR CODE:' A ERREX 7 4 40 A R QOAOUT A 5 1'OBJECT ID:' A QOAID1 20 5 40 A 6 1'QUERY OBJECTS BY ATTRB ERROR CODE:' A ERREX 7 6 40 A R POOUT A 7 1'PRESENT OBJECT ERROR CODE:' A ERREX 7 7 40 A 8 1'----------------------------------' 
Getting Started with Multimedia on the AS/400

Figure 7: RPG Program USF001RG

 *=============================================================== * To compile: * * CRTRPGPGM PGM(XXX/USF001RG) SRCFILE(XXX/QRPGSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FUSF001PRO E PRINTER FUSF001DFCF E WORKSTN FSTUDENTSIF E K DISK *=============================================================== * API error code parameter IERRDS DS I I 16 B 1 40ERRBR I B 5 80ERRBA I 9 15 ERREX I 16 16 ERRRV *=============================================================== * 'Query User' API parameters IQURB IDS I B 1 40QUBR I B 5 80QUBA I B 9 120QUOF I B 13 160QUNR I B 17 200QURV I 21 30 QUUP I 31 38 QURID I 39 46 QURLN I 47 47 QUPF I DS I I 47 B 1 40QURBL I I 'USRR0100' 5 12 QUFN I SDS I 254 263 USERID *=============================================================== * 'Query Objects by Attribute' API parameters IQOARB IDS I B 1 40QOABR I B 5 80QOABA I B 9 120QOAOF I B 13 160QOANR I B 17 200QOARV I 21 40 QOAID1 I DS I I 40 B 1 40QOARBL I I 'QRYR0100' 5 12 QOAFN I I 1 B 13 160QOAQT I I 17 66 QOASV I I 50 B 67 700QOASVL I I '0' 71 71 QOAIPM *=============================================================== * 'Present Object' API parameters IPOO IDS I 1 11 POAID I 12 12 PORV I B 13 160POPT I B 17 200POOID1 I B 21 240POOID2 I B 25 280POOID3 IPOI IDS I 1 16 PORLN I 17 36 POOID I B 37 400POAF I B 41 440POCF I B 45 480POEUIF I B 49 520POIID1 I B 53 560POIID2 I B 57 600PPIID3 I 61 100 POWT I DS I I 28 B 1 40POOL I I 100 B 5 80POIL *=============================================================== * Main loop C EXFMTMAIN C *INKC DOWEQ*OFF C STDNUM CHAINSTUDENTS 90 C *IN90 IFEQ *OFF C STDIMG IFEQ *BLANKS C MOVE *ON *IN09 C ELSE C MOVE *OFF *IN09 C ENDIF C STDAUD IFEQ *BLANKS C MOVE *ON *IN10 C ELSE C MOVE *OFF *IN10 C ENDIF C EXSR DETAIL C ENDIF C EXFMTMAIN C ENDDO * C MOVE *ON *INLR *=============================================================== C DETAIL BEGSR * C EXFMTDETL C *INKL DOWEQ*OFF C *INKI IFEQ *ON C MOVELSTDIMG QOASV C EXSR USFAPI C ELSE C *INKJ IFEQ *ON C MOVELSTDAUD QOASV C EXSR USFAPI C ENDIF C ENDIF C EXFMTDETL C ENDDO * C ENDSR *=============================================================== C USFAPI BEGSR * C* Call 'Query User' API C CALL 'QUMBQUSR' C PARM QURB C PARM QURBL C PARM QUFN C PARM USERID C PARM ERRDS * C WRITEQUOUT C ERREX IFEQ *BLANKS * * Call 'Query Objects by Attribute' API C CALL 'QUMBQATT' C PARM QOARB C PARM QOARBL C PARM QOAFN C PARM QOAQT C PARM QOASV C PARM QOASVL C PARM QOAIPM C PARM ERRDS * C WRITEQOAOUT C ERREX IFEQ *BLANKS * * Set 'Present Object' API parameters C QURID CAT QURLN PORLN C MOVELQOAID1 POOID C Z-ADD2 POAF C Z-ADD4098 POCF C Z-ADD2 POEUIF C MOVE *BLANKS POWT * * Call 'Present Object' API C CALL 'QUMBPOBJ' C PARM POO C PARM POOL C PARM POI C PARM POIL C PARM ERRDS * C WRITEPOOUT C ENDIF C ENDIF * C ENDSR 
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: