#include <qp2term.h> void QP2TERM(...);
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.
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.
Object Referred to | Authority Required |
---|---|
Each directory in the path to the IBM PASE for i program and shared libraries | *X |
IBM PASE for i program (not a shell script) in a local file system | *X |
IBM PASE for i program in a remote file system or shell script | *RX |
IBM PASE for i shared library | *R |
QP2TERM returns no function result. Escape messages are sent to report errors.
Message ID | Error Message Text |
---|---|
CPFB9C4 E | Error running IBM PASE for i terminal session, reason code &1, errno &2. |
CPFB9C9 E | Terminal session already in use. |
CPFB9CA E | Batch job ended in error. |
COLUMNS | If COLUMNS is not already set, QP2TERM sets it to the number of columns available for program output on the interactive display. |
ROWS | If ROWS is not already set, QP2TERM sets it to the number of rows available for program output on the interactive display. |
QIBM_USE_DESCRIPTOR_STDIO=I | QP2TERM sets QIBM_USE_DESCRIPTOR_STDIO to ensure that files stdin, stdout, and stderr use Integrated File System descriptors 0, 1, and 2. The terminal session manager attaches open pipes to these file descriptors in the batch job. |
QIBM_PASE_DESCRIPTOR_STDIO=T | QP2TERM sets QIBM_PASE_DESCRIPTOR_STDIO to ensure that IBM PASE for i runtime does ASCII/EBCDIC text conversion for data that the IBM PASE for i program reads or writes to files stdin, stdout, and stderr. |