When a program starts, three text streams are defined:
Streams stdin, stdout, and stderr are implicitly opened the first time they are used.
These streams are not real iSeries Data Management system files, but are simulated as files by the ILE C library routines. By default, they are directed to the terminal session.
The stdin, stdout, and stderr streams can be associated with other devices using the OS/400 override commands on the files STDIN, STDOUT, and STDERR respectively. If stdin, stdout, and stderr are used, and a file override is present on any of these streams prior to opening the stream, then the override takes effect, and the I/O operation may not go to the terminal.
If stdout or stderr are used in a non-interactive job, and if there are no file overrides for the stream,then the ILE C compiler overrides the stream to the printer file QPRINT. Output prints or spools for printing instead of displaying at your workstation.
If stdin is specified (or the default accepted) for an input file that is not part of an interactive job, then the QINLINE file is used. You cannot re-read a file with QINLINE specified, because the database reader will treat it as an unnamed file, and therefore it cannot be read twice. You can avoid this by issuing an override. If you are reading characters from stdin, F4 triggers the run time to end any pending input and to set the EOF indicator on. F3 is the same as calling exit() from your ILE C program.
If stdin is specified in batch and has no overrides associated with it, then QINLINE will be used. If stdin has overrides associated with it, then the override is used instead of QINLINE.
Note: You can use freopen() to reopen text streams. The stdout and stderr streams can be reopened for printer and database files. The stdin stream can be overridden only with database files.
IBM-ILE Related Interview Questions
|IBM - RPG Interview Questions||IBM DB2 Interview Questions|
|DB2 Using SQL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX 7 Administration Interview Questions||AS400 Interview Questions|
|Automatic Storage Management (ASM) Interview Questions||Mainframe DB2 Interview Questions|
|Rpgle Interview Questions|
Introduction To The Ile C/c++ Compiler
Creating A Program
Working With Exports From Service Programs
Example - Creating A Sample Ile C Application
Running A Program
Debugging A Program
Using Stream And Record I/o Functions With Iseries Data
Using Ile C/c++ Stream Functions With The Iseries Integrated File System
Using Externally Described Files In Your Programs
Using Database Files And Distributed Data Management Files In Your Programs
Using Device Files In Your Programs
Handling Exceptions In Your Program
Using Iseries Pointers In Your Program
Using Packed Decimal Data In Your C Programs
Internationalizing Your Program
International Locale Support
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.