<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="reference" /> <meta name="DC.Title" content="Example: QINSTAPP program" /> <meta name="abstract" content="This is an example program that can be saved to tape or optical media and loaded on the system using the Load and Run Media Program (LODRUN) command." /> <meta name="description" content="This is an example program that can be saved to tape or optical media and loaded on the system using the Load and Run Media Program (LODRUN) command." /> <meta name="DC.subject" content="example, QINSTAPP program" /> <meta name="keywords" content="example, QINSTAPP program" /> <meta name="DC.Relation" scheme="URI" content="loadrunap.htm" /> <meta name="DC.Relation" scheme="URI" content="../cl/lodrun.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="venresp" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Example: QINSTAPP program</title> </head> <body id="venresp"><a name="venresp"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Example: QINSTAPP program</h1> <div><p>This is an example program that can be saved to tape or optical media and loaded on the system using the <span class="cmdname">Load and Run Media Program (LODRUN)</span> command.</p> <div class="section"><p> Following is an example of a QINSTAPP program. The program is saved to a tape or optical media by the program writer and loaded on the system using the <span class="cmdname">Load and Run Media Program (LODRUN)</span> command. The <span class="cmdname">Load and Run Media Program (LODRUN)</span> command passes control of the system to the program, which then performs the tasks written into the program.</p> <p>This example program can be designed to accomplish many different tasks. For example, the program could: </p> <ul><li>Restore and run other programs or applications</li> <li>Restore a library</li> <li>Delete another program or application</li> <li>Create specific environments</li> <li>Correct problems in existing applications</li> </ul> </div> <div class="example"> <div class="fignone" id="venresp__wd22"><a name="venresp__wd22"><!-- --></a><span class="figcap">Figure 1. Example of an Application Using the LODRUN Command</span><pre>PGM PARM(&DEV) /* "Device" is only Parm allowed */ DCL VAR(&DEV) TYPE(*CHAR) LEN(10) DCL VAR(&MODEL) TYPE(*CHAR) LEN(4) /* Can check for appropriate model number, release level, and so on */ RTVSYSVAL SYSVAL(QMODEL) RTNVAR(&MODEL) IF (&MODEL *EQ 'xxxxx') THEN... /* Install a library for new application (programs, data): */ RSTLIB SAVLIB(NEWAPP) DEV(&DEV) ENDOPT(*LEAVE) + MBROPT(*ALL) /* Install a command to start new application: */ RSTOBJ OBJ(NEWAPP) SAVLIB(QGPL) DEV(&DEV) + MBROPT(*ALL) END: ENDPGM</pre> </div> </div> </div> <div> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="loadrunap.htm" title="The Load and Run Media Program (LODRUN) command allows the user to load and run an application written by another user or a software vendor from tapes or optical media supplied by the other user.">Load and run an application from tape or optical media</a></div> </div> <div class="relinfo"><strong>Related information</strong><br /> <div><a href="../cl/lodrun.htm">Load and Run Media Program (LODRUN) command</a></div> </div> </div> </body> </html>