


      NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))                  ((((UUUUNNNNIIIIXXXX 5555....0000))))                 NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))



      NNNNAAAAMMMMEEEE
           newform - change the format of a text file

      SSSSYYYYNNNNTTTTAAAAXXXX
           nnnneeeewwwwffffoooorrrrmmmm [----ssss] [----iiiitabspec] [----ooootabspec] [----bbbbn] [----eeeen] [----ppppn] [----aaaan]
           [----ffff] [----ccccchar] [----lllln] [files]

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _N_e_w_f_o_r_m reads lines from the named _f_i_l_e_s, or the standard
           input if no input file is named, and reproduces the lines on
           the standard output.  Lines are reformatted in accordance
           with command line options in effect.

           Except for ----ssss, command line options may appear in any order,
           may be repeated, and may be intermingled with the optional
           _f_i_l_e_s.  Command line options are processed in the order
           specified.  This means that option sequences like ``----eeee15
           ----llll60'' will yield results different from ``----llll60 ----eeee15''.
           Options are applied to all _f_i_l_e_s on the command line.

           ----iiii_t_a_b_s_p_e_c Input tab specification:  expands tabs to spaces,
                     according to the tab specifications given.
                     _T_a_b_s_p_e_c recognizes all tab specification forms
                     described in _t_a_b_s(1).  In addition, _t_a_b_s_p_e_c may be
                     --------, in which _n_e_w_f_o_r_m assumes that the tab
                     specification is to be found in the first line
                     read from the standard input (see _f_s_p_e_c(4)).  If
                     no _t_a_b_s_p_e_c is given, _t_a_b_s_p_e_c defaults to ----8888.  A
                     _t_a_b_s_p_e_c of ----0000 expects no tabs; if any are found,
                     they are treated as ----1111.

           ----oooo_t_a_b_s_p_e_c Output tab specification:  replaces spaces by
                     tabs, according to the tab specifications given.
                     The tab specifications are the same as for
                     ----iiii_t_a_b_s_p_e_c.  If no _t_a_b_s_p_e_c is given, _t_a_b_s_p_e_c
                     defaults to ----8888.  A _t_a_b_s_p_e_c of ----0000 means that no
                     spaces will be converted to tabs on output.

           ----llll_n       Set the effective line length to _n characters.  If
                     _n is not entered, ----llll defaults to 72.  The default
                     line length without the ----llll option is 80
                     characters.  Note that tabs and backspaces are
                     considered to be one character (use ----iiii to expand
                     tabs to spaces).

           ----bbbb_n       Truncate _n characters from the beginning of the
                     line when the line length is greater than the
                     effective line length (see ----llll_n).  Default is to
                     truncate the number of characters necessary to
                     obtain the effective line length.  The default
                     value is used when ----bbbb with no _n is used.  This
                     option can be used to delete the sequence numbers



      Page 1                                                   (9010-E)






      NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))                  ((((UUUUNNNNIIIIXXXX 5555....0000))))                 NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))



                     from a COBOL program as follows:
                               newform -l1 -b7 file-name

                     The ----llll1111 must be used to set the effective line
                     length shorter than any existing line in the file
                     so that the ----bbbb option is activated.

           ----eeee_n       Same as ----bbbb_n except that characters are truncated
                     from the end of the line.

           ----cccc_k       Change the prefix/append character to _k.  Default
                     character for _k is a space.

           ----pppp_n       Prefix _n characters (see ----cccc_k) to the beginning of
                     a line when the line length is less than the
                     effective line length.  Default is to prefix the
                     number of characters necessary to obtain the
                     effective line length.

           ----aaaa_n       Same as ----pppp_n except characters are appended to the
                     end of a line.

           ----ffff        Write the tab specification format line on the
                     standard output before any other lines are output.
                     The tab specification format line which is printed
                     will correspond to the format specified in the
                     _l_a_s_t ----oooo option.  If no ----oooo option is specified, the
                     line which is printed will contain the default
                     specification of ----8888.

           ----ssss        Shears off leading characters on each line up to
                     the first tab and places up to 8 of the sheared
                     characters at the end of the line.  If more than 8
                     characters (not counting the first tab) are
                     sheared, the eighth character is replaced by a ****
                     and any characters to the right of it are
                     discarded.  The first tab is always discarded.

                     An error message and program exit will occur if
                     this option is used on a file without a tab on
                     each line.  The characters sheared off are saved
                     internally until all other options specified are
                     applied to that line.  The characters are then
                     added at the end of the processed line.

                     For example, to convert a file with leading
                     digits, one or more tabs, and text on each line,
                     to a file beginning with the text, all tabs after
                     the first expanded to spaces, padded with spaces
                     out to column 72 (or truncated to column 72), and
                     the leading digits placed starting at column 73,
                     the command would be:



      Page 2                                                   (9010-E)






      NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))                  ((((UUUUNNNNIIIIXXXX 5555....0000))))                 NNNNEEEEWWWWFFFFOOOORRRRMMMM((((1111))))



                               newform -s -i -l -a -e file-name

      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
           All diagnostics are fatal.
           _u_s_a_g_e: ...                   _N_e_w_f_o_r_m was called with a bad
                                        option.
           _n_o_t -_s _f_o_r_m_a_t                There was no tab on one line.
           _c_a_n'_t _o_p_e_n _f_i_l_e              Self explanatory.
           _i_n_t_e_r_n_a_l _l_i_n_e _t_o_o _l_o_n_g       A line exceeds 512 characters
                                        after being expanded in the
                                        internal work buffer.
           _t_a_b_s_p_e_c _i_n _e_r_r_o_r             A tab specification is
                                        incorrectly formatted, or
                                        specified tab stops are not
                                        ascending.
           _t_a_b_s_p_e_c _i_n_d_i_r_e_c_t_i_o_n _i_l_l_e_g_a_l  A _t_a_b_s_p_e_c read from a file (or
                                        standard input) may not contain
                                        a _t_a_b_s_p_e_c referencing another
                                        file (or standard input).

      EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
           0 - normal execution
           1 - for any error

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           csplit(1), tabs(1), fspec(4).

      BBBBUUUUGGGGSSSS
           _N_e_w_f_o_r_m normally only keeps track of physical characters;
           however, for the ----iiii and ----oooo options, _n_e_w_f_o_r_m will keep track
           of backspaces in order to line up tabs in the appropriate
           logical columns.

           _N_e_w_f_o_r_m will not prompt the user if a _t_a_b_s_p_e_c is to be read
           from the standard input (by use of ----iiii-------- or ----oooo--------).

           If the ----ffff option is used, and the last ----oooo option specified
           was ----oooo--------, and was preceded by either a ----oooo-------- or a ----iiii--------, the
           tab specification format line will be incorrect.
















      Page 3                                                   (9010-E)



