scansummary(1) scansummary(1)
NAME
scansummary - Creates transition impact summary report
SYNOPSIS
scansummary [options] file ...
scansummary [options] -f filelist
scansummary [options] -r rootdir
DESCRIPTION
The scansummary tool identifies the possible transition impacts in HP-UX
source file(s) when transitioning applications from a release of HP-UX to a
later release of HP-UX. The scansummary tool generates a report that lists
the total number of times each possible transition impact was found in the
source file(s), along with a short synopsis of the transition impact.
A transition impact is identified when a source file contains commands,
functions, structures, header files, or other keywords that have changed
from a previous release of HP-UX. A transition impact statement describes
the differences in behavior and identifies possible solutions to resolve
the differences.
Use scansummary to understand the scope of the transition. Among the sup-
ported source files are shell scripts, makefiles, and programs written in
C, C++, Fortran, and COBOL. After running scansummary to understand the
scope of the transition, run scandetail(1) to identify the exact lines of
code in the source files that triggered the transition impact. Both scan-
summary and scandetail use the same set of command-line options.
If you do not specify any options when running scansummary, it behaves as
follows by default:
o Executes silently
o Does not follow symbolic links across file systems
o Scans files of unknown type
o Scans for all transition impact classifications, identifier types,
impact types, and impact severities
o Sorts by impact severity and impact type
o Uses HTML format for the output report
o Names the output report stk_summary.html
o Titles the output report Summary Report
Command options are available to override the default behaviors.
You can create a .scanrc file in your home directory to apply common com-
mand options, rather than typing these options on the command line. Include
only the options that you want to use in every scan. List the command
options in the .scanrc file, one per line, as they would appear on the com-
mand line. An example .scanrc file is in /opt/STK/examples/sample_scanrc.
OUTPUT REPORT
There are two output formats (HTML, text) and three sorting options (class,
instances, type) that can be used to create a summary transition impact
report. The HTML format contains links that can be clicked on when the
report is viewed in a web browser. The text format displays the URL for
the link. The choice of output format depends on how you want to view the
report since the content is the same for both output formats.
The sorting options determine how the transition impacts found by the scan-
summary utility are organized. By default, the instances sorting option is
used. This option displays the impacts based on the total number of times
an impact is found in the source code. The class sorting option displays
the impacts organized by the impact classification and the type sorting
option displays the impacts by the impact type.
For both output formats and the three sorting options, the summary transi-
tion report contains the following sections:
o Report Identification
o Transition Impacts Found
o Identifier Type Legend
o Options Used
o See Also
The report identification section contains the name of the report, Software
Transition Kit information, the date the report was created, the report
format, and information on the files scanned. The organization of this sec-
tion is the same for both output formats and the three sorting options.
The organization of the information displayed in the transitions impacts
found section depends on the sorting option used to create the report. For
the instances sorting option, the information is displayed in one table
sorted by the total number of times an impact was found in the source code
and by the identifier name. For the class sorting option, the information
is displayed in multiple tables. There is one table for each impact clas-
sification and if an impact applies to multiple classifications, the impact
synopsis will be displayed in multiple tables. The type sorting option
displays the information in multiple tables based on the impact severity
and the impact type.
The identifier type legend maps the letter(s) used for the impact identif-
ier type to a short description of the identifier type. If the output for-
mat of the report is HTML, then you can click on the identifier type
letter(s) to display additional information. If the report is in the text
output format, then the URL for the additional information is displayed.
The options used section displays information on the command options used
to generate the report and the values of the Software Transition Kit
environment variables when the report was created.
In the HTML output format, the see also section contains links for informa-
tion on the Software Transition Kit, transition impacts, scanning tools,
and documentation. The text output format, displays the URLs for this
information.
COMMAND OPTIONS
You can use the following command options when running scansummary.
Input File Options
file Absolute or relative path name to a source file to scan. You can
specify more than one file on the command line.
-f filelist
Absolute or relative path name to a file that contains a list of
source files to scan, one per line. (That is, filelist is a name of a
file containing a list of file names.) You can specify more than one
file list on the command line.
-r rootdir
Absolute or relative path name to a directory. You can list more than
one root directory on the command line. The scansummary tool recur-
sively scans all files and subdirectories within the specified direc-
tory.
-R cdfs | hfs | nfs | vxfs | lofs
Only descend directories with file systems of the specified type. You
must also use the -r rootdir option to name the directory you want to
scan. Note: The hfs, vxfs, and lofs options only apply when running
scansummary on a system running the HP-UX operating system.
+u,-u
Scan ( +u ) or do not scan ( -u ) files of unknown type. The default
is to not scan files of an unknown type.
-y Follow directory symbolic links across file systems. The default is
not to follow symbolic links. You must also use the -r rootdir option
to name the directory where you want to begin to scan.
List Option
-d List all impact classifications, impact severities, impact types,
operating system transitions, and identifier types that are supported
by scansummary.
Filtering Options
You can filter the transition impacts that scansummary reports by using the
following options:
- Exclusion options to exclude from the scan specific identifier types or
impact classifications, severities, or types. For example, -CST
excludes the standards compliance impact classification from the scan.
Impacts in every other classification are reported.
+ Inclusion options to include in the scan only specific identifier types
or impact classifications, severities, or types. For example, +CST
includes only the standards complianc impact classification in the scan.
Impacts in other classifications are not reported.
For options that take arguments, you can type the option letter with each
argument, or you can type the option letter once with the arguments
separated by a comma (,). For example, the following two commands produce
the same results:
scansummary -CTH -CTH -CNW *.c
scansummary -CTH,TH,NW *.c
You can use the following filtering options when running scansummary:
+C,-C impact_classification
Includes ( +C ) or excludes ( -C ) one or more transition impact clas-
sifications. You cannot use the -C option and the +C option together.
The list of impact classifications and their corresponding switch
values follows:
Switch Impact Classification
32 32-64 Bit Interoperability Impacts - Source changes that
affect interoperability of new and existing 32-bit software
with 64-bit software.
64 64-Bit API Impacts - Source changes related to using 64-bit
APIs and libraries, if you are creating a 64-bit version of
your software.
CC C and C++ Language and Compiler Impacts - Source changes
related to C and C++ compiler and language changes.
BI Binary Compatibility Impacts - Source changes that affect
whether software can execute on a given release of HP-UX.
CAP Capacity Scaling and Limits Impacts - Source changes related
to system capacity issues.
CBL4 COBOL Compiler Impacts - Source changes related to COBOL
language and compiler differences.
CLU Cluster Impacts - Source changes related to software that
uses cluster technology.
CMD Commands and Utilities Impacts - Source changes related to
commands and utilities.
DA Date and Time Impacts - Source changes related to date tran-
sitions.
F90 Fortran Compiler Impacts - Source changes related to Fortran
language and compiler differences.
HDR Header File Impacts - Source changes related to header file
differences.
I18N Internationalization and Localization Impacts - Source
changes related to internationalization and/or localization.
IO I/O Impacts - Source changes related to Input/Output rou-
tines and functionality.
IPF Itanium(R) Architecture Impacts - Changes related to HP-UX
API differences for the Itanium(R) architecture.
KN Kernel Impacts - Source changes related to kernel routines.
LIB Library Impacts - Source changes related to library func-
tionality.
NW Networking Impacts - Source changes that only affect
software that uses networking features.
PA PA-RISC Architecture Impacts - Changes related to the PA-
RISC Architecture.
SEC Security Impacts - Source changes related to security
issues, including system administration.
SHL Shell Impacts - Source changes related to the use of dif-
ferent shells.
SIG Signals Impacts - Source changes related to signals and
their use.
ST Standards Compliance Impacts - Source changes related to
conformance to standards such as POSIX
TH Threads Impacts - Source changes that only affect software
that uses threads and thread-safe routines.
UN Unclassified/Miscellaneous Impacts - Source changes that are
outside all of the other classifications.
-F file
Excludes file from scan.
+I,-I synopsisID
Includes ( +I ) or excludes ( -I ) one or more synopsis identifiers.
You cannot use the -I option and the +I option together.
-L file:lineno
Excludes all output for lineno (line number) in file.
+S,-S impact_severity
Includes ( +S ) or excludes ( -S ) one or more impact severities. You
cannot use the -S option and the +S option together. The list of
impact severities and their corresponding switch values are as fol-
lows:
Switch Impact Severity
Cr Critical - The impact detected must be resolved to transi-
tion the source.
Nc Non critical - The impact detected may need to be resolved
to transition the source.
+T,-T impact_type
Includes ( +T ) or excludes ( -T ) one or more impact types. You can-
not use the -T option and the +T option together. The list of impact
types and their corresponding switch values are as follows:
Switch Critical Impact Type
Ch Changed - Usage or behavior is different; you must change
the source.
Ob Obsolete - No longer available in a current or future
release of HP-UX; you must change the source.
Un Unavailable - Not available on HP-UX; you must change the
source.
Switch Non Critical Impact Type
En Enhancement - Enhanced functionality you might want to con-
sider using.
Ns Non standard - Usage is discouraged because it either does
not conform to current standards, or it will not conform to
future standards.
Wn Warning - Usage might indicate a problem; check the source
to be sure.
+Y,-Y identifier_type
Includes ( +Y ) or excludes ( -Y ) one or more identifier types. You
cannot use the -Y option and the +Y option together. The list of iden-
tifier types and their corresponding switch values are as follows:
Switch Identifier Type
A Command Arguments - Impacts triggered by the use of command
arguments, command options, or environment variables.
C Commands and Utilities - Impacts triggered by commands or
utilities that can be executed in scripts, with system
calls, or with exec calls.
Cc COBOL Callable Routines - Impacts triggered by calls to
COBOL library routines.
Cf COBOL Intrinsic Functions - Impacts triggered by calls to
functions intrinsic to COBOL.
Ck COBOL Keywords - Impacts triggered by COBOL keywords, opera-
tors, or compiler directives.
Ff Fortran Functions - Impacts triggered by Fortran functions.
Fi Fortran Identifiers - Impacts triggered by Fortran specif-
iers or common blocks.
Fk Fortran Keywords - Impacts triggered by Fortran keywords,
operators, or compiler directives.
Fs Fortran Subroutines - Impacts triggered by Fortran subrou-
tines.
L Libraries - Impacts triggered by programming library names
or a compiler option to link to a library.
P Path Names - Impacts triggered by hardcoded path names.
F C/C++ Functions - Impacts triggered by C or C++ functions,
pointers to C or C++ functions, or #define macros with argu-
ments.
H C/C++ Header Files - Impacts triggered by C or C++ header
files.
I C/C++ Misc. Identifiers - Impacts triggered by miscellaneous
C or C++ identifiers (global variables, type names, enum
members, or #define macros).
K C/C++ Keywords - Impacts triggered by C or C++ keywords,
operators, or preprocessor directives.
M C/C++ Structure Members - Impacts triggered by a C or C++
structures, classes, or union members.
S C/C++ Structures - Impacts triggered by a C or C++ struc-
tures, classes, unions, or enum tags.
Release Options
-O source os [-destination os]
Specifies the operating system release from which you are transition-
ing. This prevents transition impacts from other releases being
included in the scansummary output report. If you want to transition
to a specific version of the HP-UX operating system, you can specify a
destination release. For a list of the possible operating system
releases, enter the scansummary command with the -d option.
Define/Undefine Options
The scansummary tool scans all lines of the specified source files. Unlike
the C preprocessor cpp(1), scansummary scans code enclosed within the C
preprocessor commands #ifdef, #ifndef, #if, #else, and #endif without
checking whether the symbols specified are defined or not. This is the
default action for scansummary.
The #define and #undef C preprocessor commands in the scanned files are
ignored by scansummary. To activate scansummary processing of #ifdef,
#ifndef, and #if, specify the -D, -U, or -N options on the command line or
in your .scanrc file.
-D sym
Define the symbol sym and activate processing of #ifdef, #ifndef, and
#if when sym is present.
-U sym
Undefine the symbol sym and activate the processing of #ifdef,
#ifndef, and #if when sym is present.
-N Undefines all #ifdef and #ifndef symbols except for those symbols
explicitly defined with the -D sym option. However, evaluation of gen-
eral #if expressions is not affected by use of the -N option.
For example, consider the following lines of code:
#ifdef foo
Line 1....
#else
Line 2....
#endif
The command scansummary -D foo causes scansummary to scan Line 1 and not
Line 2. The command scansummary -U foo causes scansummary to scan Line 2
and not Line 1. The command scansummary -N causes scansummary to scan Line
2 and not Line 1. The command scansummary will scan both Lines 1 and 2.
As another example, consider the following lines of code:
#ifdef foo1
Line 1....
#endif
#ifdef foo2
Line 2....
#endif
#ifdef foo3
Line 3....
#endif
The command scansummary -N does not scan Line 1, Line 2, or Line 3. The
command scansummary -N -D foo1 scans Line 1 but does not scan Lines 2 and
3. The command scansummary scans Lines 1, 2, and 3.
Output Options
-m message
Specifies the text to appear in the title of the output report. By
default, a scansummary output report is titled "Summary Report".
-o html | text
Outputs the report in HTML or text format. The default is to output
the report in HTML format.
-p prefix
Specifies a prefix that replaces stk in the default output file name (
stk_summary.html ). Use this option to change the name of the file or
the directory in which the output is placed, or to direct text format
output to a file.
-s instances | class | type
By default, scansummary sorts by impact severity and impact type which
is the same as using -s type. Use scansummary -s class to sort by
impact classification, or use scansummary -s instances to sort by the
number of instances.
-v Produces verbose output including progress indicator, count of current
files scanned, and current filename. The default is no verbose output.
EXAMPLES
Example 1
Scan the C++ files in filelist to identify transition impacts; exclude
enhancements, standards compliance, threads, and unclassified impacts; and
write a summary report in HTML format to report in HTML format to
/home/user2/scan_output/myfiles_summary.html:
scansummary -C ST,TH,UN -T En \
-p /home/user2/scan_output/myfiles -f filelist
Example 2
Scan only for kernel transition impacts in all files in the directory
top_code_dir and write summary report in HTML format to stk_summary.html:
scansummary +C KN -r top_code_dir
SEE ALSO
Commands: scandetail(1), scanwizard(1)