CNVOUT2HTML - a conversion utility for X-12-ARIMA Version 0.3 output

Purpose:

Converts output from Version 0.3 of X-12-ARIMA into an accessible HTML file with formatted text (the -a runtime flag must be used when generating the output).

This utility is a DOS utility - the examples below assume you are running the utility within a DOS command window, and are running the utility in the same directory that the utility is stored in. For integration into a Windows environment, download WinX12 from the following website:

http://www.census.gov/srd/www/x12a/winx12home.html

Syntax:

cnvout2html file.out { dir }
cnvout2html file.log { dir }
cnvout2html file.err { dir }
cnvout2html file.spc { dir }
cnvout2html metafile.mta { dir }
cnvout2html datafile.dta { dir }

where:

file.out is the program output from a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

file.err is the error output from a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

file.log is the log file from a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

file.spc is an input specification used in a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

metafile.mta is a metafile used in a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

datafile.mta is a data metafile used in a run of Version 0.3 of X-12-ARIMA with the -a runtime flag;

dir is an optional output directory where the HTML files are stored - partial directories are accepted. If no directory is given, the program will write all files into the directory of the output files.

Note:

CNVOUT2HTML assumes that Version 0.3 of X-12-ARIMA has been run with the -a runtime flag, which inserts codes in the output that indicate to the cnvout2html utility which table is to be processed.

To run X-12-ARIMA on the input specification file nestarts.spc so that the output can be converted using cnvout2html, the user will need to enter

x12a nestarts -a

in a DOS command window.

How to run the metafile usstarts.mta is given below:

x12a -m usstarts -a

Note that using the -a flag also invokes the functionality of the -w and -p runtime flags; for more information, consult the Reference Manual for Version 0.3 of X-12-ARIMA.

The HTML file generated for X-12-ARIMA program output and log files will have internal links to allow the user to move from table to table while browsing the file. Index files for the output are also generated, so the user can jump to a specific table in the output.

The output produced by cnvout2html depends on the type of file the program encounters. Specifying an X-12-ARIMA output file, as in

cnvout2html outfile.out

will generate two files:

Similarly, two files will be generated when processing an X-12-ARIMA log file; entering

cnvout2html outfile.log

will generate:

Processing the error file generated from an X-12-ARIMA run will generate an HTML file of that error file; no index is generated for the error file.

So entering

cnvout2html outfile.err

will generate an HTML file containing the error output, in a file named outfile_err.html.

It is cumbersome to have to enter these one at a time. Using input spec, metafiles, and data metafiles can make it easier.

Using a input specification file as an input for the cnvout2html utility generates HTML output for the program output file, the error file and the log file, if one exists (remember if the input specification file was run as part of a metafile run, there would only be a log file associated with the metafile).

Using a metafile as an input for the cnvout2html utility generates HTML output for all the program output files and error files associated with the input specification files contained in the metafile, as well as the log file associated with the metafile. There is also an index file linking all the output generated by processing the metafile.

Using a data metafile as an input for the cnvout2html utility generates HTML output for all the program output files and error files associated with the data files processed by the data metafile, as well as the log file associated with the data metafile. There is also an index file linking all the output generated by processing the data metafile.

The HTML files generated by this utility conform to the W3C standard for HTML 4.01 Transitional.

Example 1: Input specification file

After running Version 0.3 of X-12-ARIMA on an input specification file named ne.spc as below:

x12a ne -a

running

cnvout2html ne.spc c:\x12a\html\

will generate

all in a subdirectory named c:\x12a\html.

Example 2: Metafile

For a metafile named nacars.mta given below:

uscars
cancars
mexcars

and after running Version 0.3 of X-12-ARIMA as below:

x12a -m nacars -a

running

cnvout2html nacars.mta c:\x12a\html\

will generate

all in a subdirectory named c:\x12a\html.

Example 3: Data Metafile

For a data metafile named sim.dta given below:

sim01
sim02
sim03

and after running Version 0.3 of X-12-ARIMA as below:

x12a airline -d sim -a

running

cnvout2html sim.dta c:\x12a\html\

will generate

all in a subdirectory named c:\x12a\html.

Note that this utility has been integrated into the Windows Interface to X-12-ARIMA - for more details, access the documentation for the Windows Interface from the following website:

http://www.census.gov/srd/www/x12a/runx12doc.html

Note that file names with spaces need to be enclosed in double quotes, just as in Version 0.3 of X-12-ARIMA.

This program was written with the Icon programming language, with special routines provided by the Icon program library. For more information on Icon, see "The Icon Programming Language, Third Edition" by Ralph E. Griswold and Madge T. Griswold, published by Peer-to-Peer Communications.

The source code for this program is available upon request.

Support:

Contact Brian C. Monsell at any one of the following:

email: brian.c.monsell@census.gov or x12@census.gov

Phone: 301-763-1721 (or 301-763-1649)

FAX: 301-763-8399

Revision Date : December 1, 2009

Source: U.S. Census Bureau, Statistical Research Divison