QP2TERM()--Run an IBM PASE for i Terminal Session

 #include <qp2term.h>  

 void QP2TERM(...);

  Default Public Authority: *USE

  Threadsafe: No

The QP2TERM() program runs an interactive terminal session that starts a batch job to run an IBM® i Portable Application Solutions Environment (IBM PASE for i) program. This program uses the workstation display in the interactive to present output and accept input for files stdin, stdout, and stderr in the batch job.


argument strings
(Input) Optional pointers to null-terminated character strings that specify the path name of the IBM PASE for i program to run and any argument strings to pass to the program. If no parameters are specified, QP2TERM runs the default IBM PASE for i shell as an interactive login shell. The default IBM PASE for i shell is an implementation of the Korn shell, with path name /QOpenSys/usr/bin/sh.

Note: When the job default CCSID is a mixed-byte CCSID, it will be treated as if it was set to the corresponding SBCS CCSID. If the argument strings contain DBCS characters, unexpected results will occur.

Note: When calling QP2TERM from CL, be sure to quote any argument string that could be interpreted as a numeric value. CL converts unquoted numeric arguments to decimal or floating-point format, which does not match the assumption made by QP2TERM and IBM PASE for i programs that all arguments are null-terminated character strings.


Return Value

QP2TERM returns no function result. Escape messages are sent to report errors.

Error Messages

Usage Notes

  1. QP2TERM uses the Qp0zStartTerminal API to manage the interactive display and start a batch job. The batch job copies most attributes of the interactive job and calls program QP2SHELL to run the IBM PASE for i program. See QP2SHELL() and QP2SHELL2()--Run an IBM PASE for i Program for details about running an IBM PASE for i program.

  2. QP2TERM copies all ILE environment variables from the interactive job to the batch job before starting the batch job, except the following ILE environment variables, which are set or replaced in the batch job. These changes affect the batch job only. They do not modify the environment in the job that called QP2TERM.

Related Information

API introduced: V4R5

[ Back to top | IBM PASE for i APIs | APIs by category ]