PRTFAC: Print Requested Task Factors

Last updated 19 Nov 97

PRTFAC collects all the data factors requested from a FACSET file, optionally sorts the data, and prints the data in a report formatted according to user defined specifications. In addition to the factors already on the input file, PRTFAC makes available other data in the form of pseudo factors. These factors include task sequence and line sequence numbers, and the task title statements. The final report may be sorted on one or two of the data factors contained on the input FACSET file. The number of tasks reported may be limited by specifying a task selection mask or by specifying a print suppression condition via the print suppression control card (SUP).

Program Invocation

The specific syntax for program invocation varies between operating systems. This document diplays the code for the AIX version.


@codap prtfac <opt> <ssss> <FS> [TT] [TF] [CV] [txt] [htm]

opt:  D   Double space task listing
      I   Print invalids as asterisks instead of blanks
ssss:     The study number
FS:       Input FACSET file
TT:       Input Task Title file, required if task titles are requested
TFf:      Input Task Factor file, required if a task selection mask is
	  specified on the PRTFAC Control Card
CV:       Input Code Values file.  Required if code values are requested
	  in the factor formats.
txt:      Output task listing report in text format.  Contains no FORTRAN
	  formats, no page breaks, no block header data, and only one
	  label at the top of the file.
htm:      Output report in html format.  If this file is specified, the user
	  is limited to 20 factors plus the task title.

PRTFAC Control Card


PRTFAC <stdy> <nh> <nv> [s1] [sq1] [s2] [sq2] [msk] [typ]

PRTFAC:  cc 01-06  The literal 'PRTFAC'
stdy:    cc 08-11  The study number for this run
nh:      cc 13     The number of column heading lines in the final report
nv:      cc 15-17  The number of factors  to be printed.  The maximum number of
		   factors that can be printed is 132.
s1:      cc 19-23  The factor ID to use for the primary sort (optional).
		   Must be on the FACSET file (no pseudo factors).
sq1:     cc 25     The  sort sequence for  the primary sort.  The default value
		   'D' is descending.  An 'A' makes the sort ascending.
s2:      cc 27-31  The factor ID for the secondary (optional)
sq2:     cc 33     The sort sequence for the secondary sort.  The default value
		   'D' is descending.  An 'A' makes the sort ascending.
msk:     cc 35-46  Task selection factor (optional).  If specified, only tasks
		   with a positive value for the msk/typ factor are reported.
typ:     cc 48-59  Task selection mask factor type

Title Card (optional)

If used, the title supplied will be printed at the top of each page on the output report. Default title is the study title.


TITLE <title>

TITLE:   cc 01-05  The literal 'TITLE'
title:   cc 07-66  Any report title information desired

Footnote Card (optional)

If used, the footnote supplied will be printed on the last line of each page on the output report.


FOOT <footnote>
FOOT:     cc 01-04  The literal 'FOOT'
footnote: cc 06-77  Any information desired

Task Print Suppression Card

This card is not required. If used, all tasks which have a value meets the specified condition for the indicated factor will NOT be printed. All other tasks will be printed. It should be noted that if the line sequence number is printed on the report when this capability is used, the sequence number will be in order, but it will not be continuous. For example, if five tasks were to be printed, but the third task was suppressed via this feature, the line sequence number progression would be 1, 2, 4, 5.


SUP <factor> <cond> <val>

SUP:     cc 01-03  The literal 'SUP'
factor:  cc 05-09  The ID for the factor to be used for print suppression.
cond:    cc 11-12  The suppression condition to be tested
		   'EQ' - Equal to
		   'NE' - Not equal to
		   'LE' - Less than or equal to
		   'LT' - Less than
		   'GE' - Greater than or equal to
		   'GT' - Greater than
val:     cc 14-23  The decimal number to be used for the comparison.

Absolute Task Addition Cards (optional)

This control card set allows the user to force printing of any desired tasks(s), regardless of whether it meets the criteria for printing. It supercedes any task suppression conditions. If an extended task title list is used, the extra tasks must be listed in this section. These cards are initiated with the literal 'ADD' and terminated with an '@EOF'.


ADD
<task>[-<tasku>]
@EOF

task: cc 01-04 The task number to be unconditionally printed. If using a range, this specifies the lower limit. '-': cc 05 The literal '-' if specifying a range tasku: cc 06-09 The upper limit task number if specifying a range

Task Deletion Cards (optional)

This control card set allows the user to reject printing of any desired tasks(s). Any task listed in this section will not be printed unless it is also specified in the ADD section. These cards are initiated with the literal 'DEL' and terminated with an '@EOF'.


DEL
<task>[-<tasku>]
@EOF

task: cc 01-04 The task number to NOT print. If using a range this specifies the lower limit. '-': cc 05 The literal '-' if specifying a range tasku: cc 06-09 The upper limit task number if specifying a range

Factor Request Cards

These cards contain the factor identifiers for each factor to be printed. The specified order of the identifiers determines the sequence of the data columns on the output report. In addition to the factors available from the input file, several pseudo factors are available for use. The following table lists the different factor types which may be printed.

Identifier  Factor Description

            ---- Factors Available on Input File -----

Fxxxx       FACSET Factor Identifier

---- Pseudo Factors within PRTFAC ----- L0000 Line sequence number within report T0000 Task sequence number TITLE Task title statement


id1 [id2] [id3] ... [id12] [id13]

          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 factor identifier to
          id7:      cc 37-41    +--  be 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 63-77  --+

PRTFAC will continue reading factor request cards until it has found the number of factor identifiers specified on the PRTFAC control card.

Report Format Specifications

This set of cards controls the appearance of the report. These cards include the column headings for the report as well as any formatting information that is required for printing the data requested. In this section the user is asked to provide a sample of how the final report is to look. To insure an easily checked setup, the user is asked to set up the left half of the report page, then the right half of the report page. Each half-page set up will include the number of column heading cards specified on the PRTFAC Control Card above, 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 n - Left Half Page  
               Data Format and Position- Left Half Page 
               Column heading line 1 - Right Half Page  
               Column heading line 2 - Right Half Page 
                    .         .         . 
               Column heading line n - Right Half Page 
               Data Format and Position- Right Half Page
As many as nine lines of column headings are acceptable and as few as zero will work. It is recommended however that at least 1 column heading card is used for labeling the output, and that column headings are 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    Learning
  Left        2        Number    Difficulty    Title
  Left - Data 3         F...        F...D.     T....................!
 Right        4           Average Percent       Percent Members
 Right        5              Time Spent             Rating
 Right - Data 6                 F...D.              F...D. 

Please note the '!' character in the example. This character is called the LEFT-WIDTH delimiter. It signifies the desired width of the LEFT Half. PRTFAC 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 factor or title columns. This would complicate a proper setup of the column headings and data format cards. The LEFT WIDTH delimiter was created to permit the user to avoid this problem. It should be noted that 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 their data 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. The information on these cards will be printed darker on the output report than normal in order to highlight them as column headings. Two column heading parts will be joined together to form a 132 character line.


<heading> [!]

heading:  cc 01-80  Any column heading information desired for half of
                    the page.

Data Format Cards

This pair of cards is always required. The information described on them tells PRTFAC how the factors are to be printed on the output report. Each factor specified on the factor 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 factor request, the second with the second request, and so on. When the format descriptions are matched with their corresponding factor request, the data type of each is compared. If the data types do not match an error has occurred. The factor 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 PRTFAC run. Factors can be printed as floating point numbers with any decimal precision desired. Task titles may be printed in any size field specified. If the field is too small, the right most data will be chopped off. If it is too big, spaces will be added to the right to fill the field.

          Factor        Format Type    Examples

          L0000         F              F...  F.  F.....         
          T0000         F              F...  F.  F.....         
          Fxxxx         F              F...  F....D..  FD....   
          Fxxxx         A (Code Value) A...  A.......  A.....
          Fxxxx         S (Cumulative) S...  S.....D.  S.D...
          TITLE         T              T... T........ T  T.

A 'D' signifies the position where a decimal point is to occur. If no D is specified for an "F" type factor, the decimal will not appear. Periods are used as data-width place holders in the format. This means that given the second example for factors (Fxxxx), the print field would be 8 characters wide with 2 digits of decimal accuracy. Any characters other than 'F' or 'T' (optionally followed by periods and/or a 'D') will be treated as literals and will be printed on the first line of each task in the report. When code values are requested for "F" type factors, the values will be rounded to integers before looking up the code values.


<data format>

data format:   cc 01-80  Data type, width and position for each factor
                         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>
note:     cc 01-80  any text desired

These cards are terminated by an end-of-file or an '@eof' image.

Examples

@codap prtfac - ssss fs000 tt001
prtfac ssss 3   7 F0005 A
title Test run of PRTFAC, masked, sorted, no task statements
L0000 F0005 F0023 F0015 F0004 F0022 TITLE
                  Task           Predicted        Percent       !
     Line       Learning          Learning        Members
   Number      Difficulty        Difficulty      Performing
   F.....        F...D..           F...D..        F...D..
  Consequences        Task            
  of Inadequate       Delay             
   Performance      Tolerance    Task Title
     F....D.         F...D..     T................................
Note cards for the first page....
@eof
This run of PRTFAC will print the requested factors for the specified FACSET file. The tasks will be sorted in ascending order, based on the values in factor F0005, which in this example is labeled as "Task Learning Difficulty".

@codap prtfac i 7211 fs003 tt001
prtfac 7211 3 008
title AFSC 231X1 TRA Survey Data (Inventory Order)
TITLE F0001 F0002 F0005 F0004 F0003 F0006 F0007
	 D
	 T TSK    TNG      1ST    1ST    5-     7-    TSK      ATI
	 Y NBR    EMP      JOB    ENL    LVL    LVL   DIF
	 T....   F.D..    F..    F..    F..    F..   F.D..    F..




@EOF

This run prints seven factors on file fs003, study 7211, plus the first five characters of each task title (which is the duty letter and task number).

Back to document index