

            cpseg$ (6) --- copy one open segment directory to another  01/05/83


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 subroutine cpseg$ (ifd, ofd, rc)
                 integer ifd, ofd, rc

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Cpseg$'  expects 'ifd' to contain the Primos file unit of a
                 segment directory open for reading and 'ofd' to contain  the
                 Primos  file  unit  of  an  empty segment directory open for
                 writing.  'Cpseg$' attempts to make an  exact  copy  of  the
                 input segment directory in the output segment directory.  If
                 it  is  successful,  it  sets 'rc' to OK; otherwise, it sets
                 'rc' to ERR.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Cpseg$' scans the open segment directory  with  the  Primos
                 routine  SGDR$$, calling 'cpfil$' to copy files, and calling
                 itself recursively to copy nested segment directories.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 rc


            _C_a_l_l_s

                 cpfil$, cpseg$, Primos sgdr$$, Primos srch$$


            _S_e_e _A_l_s_o

                 cpfil$ (6), filcpy (2)



















            cpseg$ (6)                    - 1 -                    cpseg$ (6)


