init$plg (2) --- force PL/I G i/o to recognize the Subsystem 01/07/83 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n init$plg: procedure; Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n A call to 'init$plg' from a PL/I G program attaches the PL/I G file SYSIN to the file open as standard input (either disk or terminal) and attaches the PL/I G file SYSPRINT to the file open as standard output (either disk or terminal). To use 'init$plg', it must be declared in the main program, declare init$plg entry; and then called before any executable statements: call init$plg; _I_m_p_l_e_m_e_n_t_a_t_i_o_n First 'init$plg' calls 'flush$' on standard input and stan- dard output to clean up any unfinished Subsystem I/O. 'Init$plg' then calls the Subsystem 'mapfd' to determine the Primos file unit attached to standard input. If 'mapfd' returns a file descriptor, 'init$plg' opens SYSIN using that file descriptor; otherwise, it opens SYSIN on the terminal. The procedure is then repeated for standard output and the PL/I G file SYSPRINT. _C_a_l_l_s flush$, mapfd, mapsu, Primos p$open _B_u_g_s Files redirected to /dev/null are not supported. Output on SYSPRINT not followed by a line boundary (e.g. PUT SKIP) will be ignored when the file is directed to disk. It is usually best to terminate all programs with a PUT SKIP to insure that this line boundary is present. _S_e_e _A_l_s_o init$p (2), init$f (2) init$plg (2) - 1 - init$plg (2)