cpfil$ (6) --- copy one open file to another 03/25/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n subroutine cpfil$ (ifd, ofd, rc) integer ifd, ofd, rc Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Cpfil$' expects 'ifd' to contain the Primos file unit num- ber of a file open for reading, and 'ofd' to contain the Primos file unit number of a file open for writing. 'Cpfil$' attempts to copy the contents of the input file to the output file. If any condition arises that prevents com- pletion of the copy, 'cpfil$' sets 'rc' to ERR; otherwise, it sets it to OK. On return, both files are left open and positioned to the end. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Cpfil$' makes repeated calls to Primos PRWF$$ with a large buffer to quickly move the data between the files. _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d rc _C_a_l_l_s Primos prwf$$ _S_e_e _A_l_s_o cpseg$ (6), filcpy (2), fcopy (2) cpfil$ (6) - 1 - cpfil$ (6)