Title: | VAX/DEC COBOL |
Notice: | Kit,doc,performance talk info-->DIR/KEY=KIT or DOC or PERF_TALK |
Moderator: | PACKED::BRAFFITT |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3250 |
Total number of notes: | 13077 |
Reformat seems to be an interactive utility. Is there a way to run it with one command line from Unix? What I need to do is put it in a Unix makefile. Can this be done or does it require user interaction? Thanks, Dan
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3202.1 | Call reformat via a script file that takes arguments | GROSS::GROSS | Louis Gross | Wed Feb 19 1997 16:21 | 29 |
Here is a very primitive sh script: ------------------------------------ reformat <<ENDOFIT $1 $2 $3 ENDOFIT ------------------------------------ which calls reformat with the three arguments passed into it. The script should begin with a check of the arguments, displaying a syntax message if any are missing (or if the first is other than Y or N, or even translating something more intuitive, such as "toansi" and "fromansi", and perhaps checking that the $2.cob is a readable file. Then, the command line (assumeing its calls reformat.script): reformat.script n dcb1490a temp will display the following: REFORMAT - ANSI-to-terminal format conversion mode [ Y / N ]? REFORMAT - Terminal-to-ANSI format selected REFORMAT - Terminal-format input file spec : REFORMAT - ANSI-format output file spec : REFORMAT - Columns 73 to 80 : REFORMAT - 52 Terminal COBOL source records converted to ANSI format REFORMAT - ANSI-to-terminal format conversion mode [ Y / N ]? progid.zko.dec.com> and temp.cob will have the ansi version of the input dcb1490a.cob, which is in terminal format. | |||||
3202.2 | % reformat < r.in | PACKED::BRAFFITT | Wed Feb 19 1997 16:26 | 18 | |
>Reformat seems to be an interactive utility. Is there a way to run it with one >command line from Unix? What I need to do is put it in a Unix makefile. Yes. For example, you can create a 4-line input file to use as input to reformat. If you create r.in with leading and trailing blank lines as follows: <blank> t.cob t2.cob <blank> then do % reformat < r.in you will get the terminal format file t.cob converted to ANSI format t2.cob. | |||||
3202.3 | DRAGN::BOURQUARD | This is not here | Thu Feb 20 1997 14:56 | 3 | |
Thanks for the quick respone, folks! Either of those will do the trick for me. Dan |