PRTVAR is used to print selected portions of a Case Data file. There are capabilities for various types of sorts and several internal variables are available to the user.

Program Invocation
The specific syntax for program invocation varies between operating systems. This document diplays the code for the AIX version.
opt: N NOGO option, perform control card check
I Print invalids as asterisks instead of blanks.
R Print task responses as raw ratings instead of
percent time spent ratings
Z Do not print the Privacy Act message
CDf: Input Case Data file
CSf: Input Cluster Solution file, required if a
presentation sequence is used.
TFf: Input Task Factor file, required if a
group membership mask is used.
VTf: Input Variable Title file. Required if computed
or background variables are requested.
TT: Input Task Title file. Required if task variables
are requested.
CVf: Input Code Values file. Required if code values
are used for requested variables.
PRTVAR Control Card
PRTVAR: cc 01-06 The literal 'PRTVAR'
stdy: cc 08-11 The study number for this run
nh: cc 13 The number of column heading lines
s1: cc 15-19 The variable ID for the primary sort
sq1: cc 21 The sort sequence for the primary sort.
'D' = descending (default)
'A' = ascending
s2: cc 23-27 The variable id for the secondary sort
sq2: cc 29 The sort sequence for the secondary sort
pid: cc 31-36 The presentation sequence ID.
msk: cc 38-43 Group membership mask. If specified, only
the cases for this group will be reported.
Title Card (optional)
If used, the title supplied will be printed at the top of each page on the output report. If the title field of this card is blank or if this card is not used the title for the study found on the input file will be used.
TITLE: cc 01-05 The literal 'TITLE' title: cc 07-66 Any report title information desired
Variable Request Cards
The cards in this section contain variable identifiers for each variable to be printed. The specified order of the identifiers determines the sequence of the data columns on the output report. In addition to the case data variables contained on the input file, several other types of pseudo variables are available for printing. The following tables contain the variable identifiers which are acceptable.
---- Variables from the input file -----
Cxxxx Computed variables C0007 and above
Vxxxx Any background variable
Txxxx Any task variable (raw response or percent time)
---- Pseudo Variables within PRTVAR -----
C0000 Line sequence number within report
C0009 Presentation sequence number
Dxxxx Count of responses at level xxxx
Pxxxx Percent of responses at level xxxx
Note: Response level variables only work with input files which use an integer response scale of 99 or less points.
id1: cc 01-05 --+ id2: cc 07-11 : id3: cc 13-17 : id4: cc 19-23 : id5: cc 25-29 : id6: cc 31-35 : The next variable to be id7: cc 37-41 +-- printed. Blank fields will id8: cc 43-47 : be ignored. id9: cc 49-53 : id10: cc 55-59 : id11: cc 61-65 : id12: cc 67-71 : id13: cc 73-77 --+
The variable request cards are terminated by an "@eof" image.
Report Format Specifications
This set of cards controls the appearance of the report printed by PRTVAR. These cards include the column headings for the report as well as any formatting information that is required for printing the data requested. The user is provides a template of the final report. Since control cards are limited to 80 characters but the output can be 132 characters, the user must set up the left half of the report page, then the right half of the report page. Each half-page includes the number of column heading cards specified on the PRTVAR control card, as well as one additional card showing where to place the data under the headings provided. The same number of column heading cards must be used for each half-page, even if this means including blank lines. The data format line must also appear for each half-page even if this means including a blank line.
The cards would be arranged in the following manner:
Column heading line 1 - Left Half Page
Column heading line 2 - Left Half Page .
. .
Column heading line 9 - Left Half Page
Data Format & Position- Left Half Page
Column heading line 1 - Right Half Page
Column heading line 2 - Right Half Page
. . .
Column heading line 9 - Right Half Page
Data Format & Position- Right Half Page
As many as nine lines of column headings are acceptable and as few as zero will work. It is recommended that at least 1 column heading card be used for labeling the output, and that column headings be limited to about four lines.
The following example demonstrates how the control cards give a preview of what the output report will look like. The third and sixth lines of the example contain the data formatting information for the output. The details of these lines will be described later in this section.
Half-Page Line Actual Image Left 1-> Sequence Number Left 2-> Number Supervised Organization Left - Data 3-> C... V.. V............. ! Right 4-> Tasks Distributions Right 5-> 01 12 76 30 1's 5's 9's Right - Data 6-> T T T T C.. C.. C..
Please note the '!' character in the above example. This character is called the LEFT-WIDTH delimiter. Its purpose is to signify the desired width of the left half. PRTVAR uses 132 characters from each pair of cards above to construct the report. The LEFT WIDTH delimiter can be used to break the information in a convenient place. For instance, if the LEFT WIDTH delimiter had not been used in the example, the break between left and right would have occurred at column 80 and that could be in the middle of the task or distribution columns. This would complicate a proper setup of the column headings and data format cards. The LEFT WIDTH delimiter should only be used once on any one of the Left Half cards. When encountered, the left half cards will include all information from the first card column up to but not including the column containing the LEFT WIDTH delimiter. The right half cards will then be read and added to the left half cards to build a 132 character line. For example, if only 61 characters were used from the Left Half cards, the first 71 characters would be used from each of the Right Half cards to build the output report formatting and heading information.
The following two subsections describe the column heading and data format cards respectively. Remember that each card is part of a paired set and only half of the pair is described.
Column Heading Cards
The column heading cards may contain any information desired for labeling the output report. Any characters will be printed except for the '!' character, which is reserved as the LEFT WIDTH delimiter. Two column heading parts will be joined together to form a 132 character line.
heading: cc 01-80 Column heading information desired for
half of the page.
Data Format Cards
This pair of cards determines the display format of variables. Each variable specified on the variable request cards must have a corresponding format description on this pair of cards or the program will terminate in error. The first format description encountered is matched with the first variable request, the second with the second request, and so on. When the format descriptions are matched with their corresponding variable request, the data type of each is compared. If the data types do not match an error has occurred. The variable request identifiers and their corresponding data type formats can be found in the table in the following paragraph. The following table contains a list of the acceptable format descriptions available for use in a PRTVAR run. These descriptions are flexible in that they allow the user to specify the format for printing the variable data.
Computed variables, distribution variables (Dxxxx), percentage variables (Pxxxx), and task variables (percent time) can be printed as floating point numbers with any precision desired. Background variables may be printed in any size field specified. If the field is too small, the rightmost data will be chopped off. If it is too big, spaces will be added to the right to fill the field. Task variables may also be printed in their raw response form. When this method is chosen (use the 'R' option) tasks which have not been responded to will be printed as spaces instead of zeroes to enhance the visual impact of the response pattern.
Variable Format Type Examples C0000 C C... C. C..... Cxxxx C C... C....D.. CD.... Cxxxx A (Code Value) A... A....... A..... Dxxxx C C.. C.... Pxxxx C C... C....D.. C..D.. Txxxx T (Percent) T... T....D.. T..D.. Txxxx T (Raw) T T.. T. Txxxx A (Code Value) A A.. A. Vxxxx V (Raw) V... V........ V V. Vxxxx A (Code Value) A... A........ A A.
In the examples above, the 'D' character signifies the position where a decimal point is to occur. If no D is specified for a "C" or "T" (percent) type variable, the decimal will not be printed. Periods are used as data-width place holders in the format. This means that given the second example for computed variables, the print field would be 8 characters wide with 2 digits of decimal accuracy. Any spaces found on these cards will be printed as space between fields on the output report. When code value formats are requested for "C" or "T" variables, the values will be rounded to integers before looking up the code value.
data format: cc 01-80 Data type, width and position for each
variable printed on this half page.
Report Note Cards (optional)
The cards in this section are textual notes that are to be printed on the report.
note: cc 01-80 Any text desired
PRTVAR control cards are terminated by an end-of-file condition or an "@eof" image.
@codap prtvar r ssss cd100 cs100 - vt100 tt000
prtvar ssss 3 PS0001
TITLE Test run of PRTVAR, no mask, tasks raw
C0009 V0001 C0004 C0005 D0001 D0002 D0003 P0006 P0007
T0008 T0009 T0010 T0011 T0012 T0013 T0014 T0015
T0180 T0181 T0182 T0183 T0184 T0185 T0186 T0187
@EOF
!
Sequence Booklet Average Average
Number ID Between Within
C... V... C...D.. C...D..
Distributions Percentages Task Responses
----------------- ------------- -------- --------
1's 2's 3's 6's 7's [ 8-15 ] [180-187]
C... C... C... C..D.. C..D.. TTTTTTTT TTTTTTTT
@eof
This run prints the requested variables for each case on the Case Data file. The cases will be listed in KPATH sequence (PS0001). Raw ratings will be printed for all tasks requested.
@codap prtvar - ssss cd100 - tf100 vt100 tt000 cv100
prtvar ssss 3 V0019 A V0001 A GP0002
TITLE Test run of PRTVAR, masked, sorted, tasks are percent time
V0001 V0022 V0017 V0019
T0008 T0009 T0010 T0011
@EOF
Booklet Major
ID Job Title Grade Command !
V.... V................ A....... V........
Task Responses
---------------------------
08 09 10 11
...... T..D.. T..D.. T..D.. T..D..
@eof
This run prints the requested variables for the members of group GP0002. The list is sorted into MajComs, with each MajCom sorted into booklet number sequence. The percent time spent will be printed for all tasks requested.