74 lines
4.2 KiB
HTML
74 lines
4.2 KiB
HTML
|
<?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="Run an i5/OS PASE program with QP2SHELL()" />
|
||
|
<meta name="abstract" content="You use QP2SHELL or QP2SHELL2 programs to run an i5/OS PASE program from any i5/OS command line and within any high-level language program, batch job, or interactive job." />
|
||
|
<meta name="description" content="You use QP2SHELL or QP2SHELL2 programs to run an i5/OS PASE program from any i5/OS command line and within any high-level language program, batch job, or interactive job." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzalfrunning.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/qp2shell.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2000, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2000, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzalfshell" />
|
||
|
<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>Run an i5/OS PASE
|
||
|
program with QP2SHELL()</title>
|
||
|
</head>
|
||
|
<body id="rzalfshell"><a name="rzalfshell"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Run an <span class="keyword">i5/OS</span> PASE
|
||
|
program with QP2SHELL()</h1>
|
||
|
<div><p>You use QP2SHELL or QP2SHELL2 programs to run an <span class="keyword">i5/OS™</span> PASE
|
||
|
program from any <span class="keyword">i5/OS</span> command
|
||
|
line and within any high-level language program, batch job, or interactive
|
||
|
job.</p>
|
||
|
<div class="section"><p>These programs run an <span class="keyword">i5/OS</span> PASE
|
||
|
program in the job that calls it. The name of the <span class="keyword">i5/OS</span> PASE
|
||
|
program is passed as a parameter on the program.</p>
|
||
|
<p>The QP2SHELL()
|
||
|
program runs the <span class="keyword">i5/OS</span> PASE
|
||
|
program in a new activation group. The QP2SHELL2() program runs in the caller's
|
||
|
activation group.</p>
|
||
|
</div>
|
||
|
<div class="example"><p>The following example runs the <tt>ls</tt> command from the <span class="keyword">i5/OS</span> command line:</p>
|
||
|
<pre>call qp2shell parm('/QOpenSys/bin/ls' '/')</pre>
|
||
|
</div>
|
||
|
<div class="example"><p>If you pass values into QP2SHELL() using CL variables, the variables
|
||
|
must be null-terminated. For example, you need to code the above example in
|
||
|
the following way:</p>
|
||
|
<pre>PGM DCL VAR(&CMD) TYPE(*CHAR) LEN(20) VALUE('/QOpenSys/bin/ls')
|
||
|
DCL VAR(&PARM1) TYPE(*CHAR) LEN(10) VALUE('/')
|
||
|
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
|
||
|
|
||
|
CHGVAR VAR(&CMD) VALUE(&CMD *TCAT &NULL)
|
||
|
CHGVAR VAR(&PARM1) VALUE(&PARM1 *TCAT &NULL)
|
||
|
|
||
|
CALL PGM(QP2SHELL) PARM(&CMD &PARM1)
|
||
|
|
||
|
ENDIT:
|
||
|
ENDPGM</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzalfrunning.htm" title="You can read this topic for information and examples about starting an i5/OS PASE program in a job, and calling i5/OS PASE procedures from your ILE programs.">Run i5/OS PASE programs and procedures</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../apis/qp2shell.htm">QP2SHELL() and QP2SHELL2()--Run an i5/OS PASE Shell Program</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|