There are many options available to customize the content and the appearance of an IDOC. However, there are default options which will usually produce satisfactory results, at least as a starting point. One purpose of this document is to illustrate how to run the procedures in a simple way, taking advantage of the default options.
layout -qx > LAYOUT
Many options are available to customize the IDOC. But to do so, you must consult the documentation for the QEXTRACT and/or XCODEBK programs. In this document we will illustrate how to take advantage of the default options and run the procedures in a relatively uncomplicated way.
cd \xstudy\e-inst
With any text editor that creates a plain ASCII file, create a file containing commands that specify the desired options for QEXTRACT. Any name will do for the file; in this example we will call the command file ‘qextract.opt’. An example that will cover most situations is the following:
#__________(Command file for QEXTRACT)___________________________ # Note that lines beginning with ‘#’ are interpreted as comments. # Begin the commands in column 1 of your file. title = This is the title of the study output = myfile.idl # If you used the ’case insensitive’ option in CASES, add this line: nocase = yes # If you used macros in your instruments, be sure to translate # the instrument with the ‘-m’ option of the CASES ‘qt’ program; # and add this line to the commands for QEXTRACT: macros = yes #__________(End of command file)_________________________________The above command file will work fine, assuming that you named your layout file ‘LAYOUT’, and you are running the QEXTRACT program in the same directory as the ‘.q’ files (or the macro- expanded ‘.m’ files). (For more options and explanations, see the full QEXTRACT document.)
qextract -b qextract.opt
Diagnostic and error messages are appended to the file ‘QEXTRACT.MSG’. Items with no path to them, if any, are listed in the file ‘QEXTRACT.ORF’. Those files should be viewed. For more information on those files, see the description of Files Produced by QEXTRACT.
mkdir idoc
With any text editor that creates a plain ASCII file, create a file containing commands that specify the desired options for XCODEBK. Any name will do for the file; in this example we will call the command file ‘xcodebk.opt’. An example that will cover most situations is the following:
#__________(Command file for XCODEBK - HTML IDOC)_______________ # Note that lines beginning with ‘#’ are interpreted as comments. # Begin the commands in column 1 of your file. # Specify the name of the IDL file you created IDL = myfile.idl # Specify the name of the logo file, if you have a logo or some links # to appear at the top of the title page and the main index pages. LOGO = logofile # The following line informs XCODEBK to create the HTML files in # the directory ‘idoc’. # The files will all have the prefix ‘sdoc’. # The main page of the IDOC will be named ‘sdoc.htm’. savefile = idoc\sdoc # If you used the ’case insensitive’ option in CASES # and the NOCASE option for QEXTRACT, add this line: nocase = yes #__________(End of command file)_________________________________The above command file will work fine, assuming that you named your IDL file ‘myfile.idl’, and your logo URL and links are in the file ‘logofile’, and you are running the XCODEBK program in the parent directory of the ‘idoc’ subdirectory, where the program will store the HTML files. (For more options and explanations, see the full XCODEBK document.)
xcodebk -b xcodebk.opt
However, to make the IDOC viewable by users on other computers, it is necessary to put it in a network-accessible location and provide users with the Web address (the URL). There are two steps involved:
For purposes of illustration, assume that the entire set of IDOC files (with the prefix ‘sdoc’) has been moved to the directory ‘D:\wwwdocs\surveyx’. Note that in such a case, the URL for the main page will be something like:
http://www.institute.edu/surveyx/sdoc.htm
A more user-friendly way would be to include the URL on a Web
page that users have regular access to. That way, they can see
what is available and just click on the reference to the IDOC. A
simple example of such a file might be:
With any text editor that creates a plain ASCII file, create a
file containing commands that specify the desired options for
XCODEBK. Any name will do for the file; in this example we will
call the command file ‘xcodebk.opt’. An example that will cover
most situations is the following:
#__________(Command file for XCODEBK - Printed IDOC)____________ # Note that lines beginning with ‘#’ are interpreted as comments. # Begin the commands in column 1 of your file. # Specify the name of the IDL file you created IDL = myfile.idl # Specify that the IDOC is to be formatted for 2-sided printing # and written to the file ‘myfile.txt’ type = print2side savefile = myfile.txt # If you want to include all items, instead of just the screens, # include the following specification: include = all #__________(End of command file)_________________________________The above command file will work fine, assuming that you named your IDL file ‘myfile.idl’; and you are running the XCODEBK program in the same directory in which the IDL file is located. (For more options and explanations, see the full XCODEBK document.)
xcodebk -b xcodebk.opt
For instruments with many thousands of items, the printed IDOC can require literally thousands of pages, depending on whether the IDOC is to include all items or only the screens, and on whether a template is specified that includes more elements than the default template. Users should give careful thought to the purposes and requirements for a printed IDOC, before attempting to print one out. Upon reflection it may turn out that the HTML version of an IDOC is sufficient.