home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
dskxtr12.zip
/
dskxtrct.txt
< prev
next >
Wrap
Text File
|
1998-07-06
|
16KB
|
390 lines
DSKXTRCT and DSKCOMPR - Version 1.2 - 7/4/1998
Copyright 1997, 1998 by Alan B. Arnett
Contact: Alan.Arnett@ibm.net
Table of Contents
1. Description
2. Special Notes and Restrictions
3. General Notes
4. Program Operation and Usage
5. Future Considerations
6. Program history
7. Credits and Appreciations
8. Package contents
9. Copyright and Disclaimers
1. Description
The DSKXTRCT and DSKCOMPR programs work with DSK diskette image
files associated with the IBM programs, SAVEDSKF and LOADDSKF.
(See notes below for a brief explanation of the SAVEDSKF and
LOADDSKF utilities.)
DSKXTRCT extracts the original files from DSK files into a
subdirectory, avoiding the need to recreate diskettes. This is
useful if the desire is to copy the original files onto a hard
drive without creating intermediate diskettes. One of the major
purposes for DSKXTRCT is to create a hard drive subdirectory
directly from IBM fixpak DSK files that can be used to apply the
fixpak, bypassing the creation of diskettes.
DSKCOMPR compares the files in DSK files to a target subdirectory
or diskette. This is useful for verifying that LOADDSKF correctly
created the diskette. The compare of a DSK file to a diskette is
a case where DSKCOMPR fills a need not satisfied by LOADDSKF.
2. Special Notes and Restrictions
Duplicate CSF_DSK files (and other files) with DSKXTRCT: When
using DSKXTRCT to create a single directory from multiple DSK
files, duplicate files will not be replaced without the user's
permission, either by command line option or screen prompt. Be
aware that IBM fixpak diskette images frequently contain a file
identifying the diskette name and number. This file may be named
the same on each diskette image, as an example: "CSF_DISK". If
one of the command options to replace or skip all duplicates is
not used, the user will be prompted for each attempt to replace
this file. The user may respond to each duplicate file, or at
anytime, choose to replace or skip any further duplicate files.
Note that in the creation of a subdirectory for fixpak files,
DSKXTRCT emulates the process of creating diskettes and then
performing an XCOPY to a subdirectory with the '/s' parameter in
which all needed subdirectories would be created and any
duplicate files would be overwritten.
Duplicate CSF_DSK files (and other files) with DSKCOMPR: When
using DSKCOMPR to compare multiple DSK files to a single
directory, duplicate files that have been replaced or skipped
will show as errors. These mismatched files may not be a concern
if the DSK files are IBM fixpak files. See the above description
of "Duplicate CSF_DISK files with DSKXTRCT".
While DSKXTRCT can extract the DSK files to a diskette, this is
individual file level operation. Any diskette internal data such
as boot records, reserved fields or other nonstandard diskette
attributes not directly contained within a normal file will not
be handled. LOADDSKF is better/faster/safer for creating
diskettes. Once the diskette has been recreated, DSKCOMPR can be
used to verify that the individual files have been created
correctly.
A word about the year 2000. I have done some initial
investigation of the y2k issues surrounding the DSK file images
and the files contained within, and my initial sense is that
there will be no problem with the file dates, but I have not done
any testing to verify this. I plan to perform some testing, and
do what I can to be sure that the correct date and time are
propagated to the extracted files. The only y2k problem I can
foresee is in the section of code that retrieves the date from
the DSK directory entry and formats it for the system function
that sets an output file's modification date. For now, and until
I can do some testing and decide to implement any changes, y2k
compliance remains a potential restriction. There is no
guarantee or warranty that these programs will ever by y2k
compliant. Having added the previous sentences for the benefit
of any lawyers, do keep in mind that I use this program myself,
and I want it to handle dates correctly for me.
3. General Notes
DSKXTRCT was written to fulfill two needs. First, to eliminate
the need to create diskettes from IBM fixpak DSK files. With
DSKXTRCT, a subdirectory containing the original files can be
created directly from the DSK files and the SERVICE process then
can be changed to use this subdirectory. Second, to enable the
storage of product diskette backups on large storage media such
as ZIP or SYQUEST drives using the SAVEDSKF program and still
have access to the original files when needed without having to
recreate the diskettes.
DSKCOMPR was written as a companion program, as a result of bbs
exchanges/complaints about diskette errors that sometimes went
undetected when LOADDSKF recreated fixpak diskettes.
Neither DSKXTRCT nor DSKCOMPR can process a DSK file that has
been created by SAVEDSKF using the compression option. This
doesn't seem to be a serious restriction as all the DSK files
currently distributed by IBM are created in a non-compressed
format. This restriction should be kept in mind if the user
wants to use SAVEDSKF to create personal DSK files from
diskettes.
While DSKXTRCT and DSKCOMPR verify the checksum data stored in
the DSK file, the checksum is only a 32 bit sum of every 16 bits
in the DSK file and some double or triple bit errors may not be
detected. This is a limitation of the checksum stored on the DSK
file. Furthermore, there is only one checksum for the entire
diskette image, so there is no way to determine which files in
the DSK file are corrupted. The /CRCX flag allows the processing
of the DSK file to ignore the checksum error, but this is very
risky and is not recommended.
IBM utilities SAVEDSKF and LOADDSKF: IBM uses these two utilities
for handling correction and device driver diskettes made
available for the users of many of their products. SAVEDSKF reads
a diskette and creates a single file with all the information
needed to recreate an exact copy of the original diskette.
LOADDSKF is used to recreate a diskette from the DSK files. This
SAVEDSKF/LOADDSKF process allows an entire diskette image to be
transferred electronically and recreated by the recipient. These
utilities can be found on many web sites or bulletin boards
4. Program Operation and Usage
Both programs have similar command line parameters. The source
parameter is required for all operations, and the target
parameter is required for extract and compare operations, but not
for 'view file list' and 'checksum only'. The other parameters
are optional. 'View file list' and 'checksum only' disable the
extract and compare operations, but they may be specified
together. If file replace or skipping parameters are not
provided on the command line, the user will be prompted as
needed. Parameters may be specified in any order and are not case
sensitive.
Two general command syntax are provided for each program, the
first for normal operation, and the second for viewing a list of
files contained in the DSK files and/or performing checksum
verification of the DSK files.
DSKXTRCT /s:<mask> /t:<sdir> [/l:<file>] [m:<mode>] [/ra|/rn]
[/lr|/ls|/la] [/c] [/q] [/crc] [/crcx]
DSKXTRCT /s:<mask> /v [/l:<file>] [m:<mode>] [/lr|/ls|/la] [/c]
[/q] [/crc] [/crcx]
DSKCOMPR /s:<mask> /t:<sdir> [/l:<file>] [m:<mode>] [/lr|/ls|/la]
[/c] [/q] [/crc] [/crcx]
DSKCOMPR /s:<mask> /v [/l:<file>] [m:<mode>] [/lr|/ls|/la] [/c]
[/q] [/crc] [/crcx]
/s:<source file name or mask> - (required) the source file name
or mask of the DSK diskette image files to be extracted or
compared. If a mask is used, the specific directory supplied will
be searched and each DSK image file found will be processed, but
no subdirectory trees will be searched to find more mask files.
The mask needs to be restrictive enough to bypass non-DSK files,
as these will cause errors and possible program termination.
Example: "/s:c:\storage\os2warp4\xrm005\*.?dk"
/t:<target directory or drive> - (required for extract and
compare operations, but not for 'view file list' or 'checksum
testing' operations) the target directory or diskette drive for
processing. During extract processing, this subdirectory and any
additional subdirectories will be created if they do not already
exist. To extract files to the current directory, use "/t:.", but
note that any applicable subdirectory structure defined in the
DSK file will still be created.
Example: "/t:c:\temp\xrm005"
/l:<log file name> - (optional) overrides the default log file
name and may specify a full drive and path qualification. The
default log file names are dskxtrct.log and dskcompr.log and are
created in the current directory at the time the program is
invoked. Note this can cause an error if the program is invoked
while the current directory is set to a CD-ROM or a network drive
to which the user is unable to write.
Example: "/l:c:\temp\xrm005\mylog.log"
/m:<message level> - (optional) sets control for message output.
Message levels include:
NONE - suppress all messages except errors and warnings
STD - print normal messages (default)
FILES - print the names and file sizes of individual files
as they are created or compared.
Example: "/m:files"
/c - (optional) lists any comments contained in the DSK file.
/v - (optional) generates a list of file names and sizes instead
of creating or comparing files. The target parameter is
unnecessary when using this parameter and is ignored if provided.
This parameter provides the same operation in both DSKXTRCT and
DSKCOMPR.
/lr - (optional) replace the log file if a duplicate is found.
/la - (optional) append to the log file if a duplicate is found.
/ls - (optional) skip writing to the log file if a duplicate is
found.
/q - (optional) quiet mode, bypass writing messages to the
screen, if the log file is successfully being used. This
parameter has no effect if '/ls' is used or if 'skip' was
specified to a 'replace log file' prompt.
/ra - (optional) replace ALL duplicate files found by DSKXTRCT in
the target subdirectory.
/rn - (optional) replace NO duplicate files found by DSKXTRCT in
the target subdirectory.
/crc - (optional) perform only checksum testing bypassing extract
or compare. Note that checksum testing is done by default. This
parameter provides the option of performing only the checksum
testing. The target parameter is unnecessary when using this
parameter and is ignored if provided. This parameter provides
the same operation in both DSKXTRCT and DSKCOMPR.
/crcx - (optional) ignore any checksum errors during extract and
compare and process all DSK files even if a checksum error is
detected.
A return code is used at program completion to indicate the
results of processing and can be tested in command files
(messages should indicate the cause of any warnings or errors):
0 - successful completion.
4 - some minor error(s) occurred, ie, a subdirectory wasn't
found during compare.
8 - a serious but non-terminal error occurred, ie, a file
was not created or did not compare.
16 - a terminal error occurred, ie, an invalid parameter, or
a system error.
Examples of program execution:
dskxtrct /s:\fixpacks\xr_m005.?dk /t:\temp\xrm005 /ra
/m:file /lr
dskcompr /s:\fixpacks\xr_m005.1dk /t:a: /l:compare1.log
5. Future considerations
While I will entertain suggestions or comments on these programs,
I do not provide any assurances that I will enhance or correct
any of these programs in the future. This project is done as a
hobby and for fun. Having said that, the following list contains
points I am considering working on if and when the time and the
mood present themselves. But I do use these programs myself, and
do want to make some of the enhancements listed below. The list
is not ordered in any strict priority, but my favorite
enhancements are at the beginning. I will entertain suggestions
on the priority of these items and for other items, but again I
reserve the final right to decide what, if anything, gets done
and when. Let me know if you found these programs useful.
- combine DSKXTRCT and DSKCOMPR into one program.
- allow selection of extract and compare (immediately afterwards)
in the same invocation.
- allow an initial checksum pass of all input files, continuing
to extract and/or compare only if all files pass checksum
verification.
- add support for parameters to be input from a parameter file.
- build a GUI front end for program invocation.
- implement any needed Y2K support in handling file dates.
- add message id numbers to all messages and create in index of
messages in the documentation to fully explain the meaning of
each message.
- add internal logic control to better control program
termination under non-critical conditions and add options to
control the sensitivity of program termination to different error
levels.
- improve DSK file detection logic to allow skipping of non-DSK
files found by source file mask.
- add a /fixpak parameter to automate the handling of duplicate
"CSF_DISK" files and possibly override some of the defaults for
this specific condition.
- add file selection by name or mask of files to be extracted
from the DSK file.
- add to the 'replace/skip' file prompts the option to specify a
different file name or location.
- report skipped and/or replaced files separately from other FILE
level messages.
- add the option to make the default log file location the target
directory rather than the current directory. This can be done now
by specifying a fully qualified log file name.
- add the option to suppress creation of subdirectories defined
in the DSK file so all files are extracted into the target
directory.
- add support for compressed DSK files.
6. Program history
Version 1.2
- added checksum verification and messages to both programs.
- added return code to DSKCOMPR exit.
- added return code message to both programs.
Version 1.1
- corrected/refined code based on feedback from beta testing.
Version 1.0
- beta testing version.
7. Credits and appreciations
I want to express my appreciation to Frank McKenney for his
testing and for his extensive and valuable suggestions. Frank's
postings also gave me the idea for the compare program. I also
want to thank my brother Steve Arnett for his encouragement and
initial testing.
8. Package contents
This package contains 4 files:
DSKXTRCT.EXE - the extraction program
DSKCOMPR.EXE - the compare program
DSKXTRCT.TXT - this documentation file
SUMMARY.TXT - summary of program functionality.
9. Copyright and disclaimers
The DSKXTRCT and DSKCOMPR programs are freeware. The author
retains the copyright to these programs, but you are free to use
them with the only restrictions that you not reverse engineer
them. Furthermore, you are free to distribute them to anyone
else, as long as all files contained in the package are kept
intact and unmodified and any charge is only for copying and
distribution.
DSKXTRCT and DSKCOMPR are provided as is. No warranties or
guaranties, either expressed or implied, are provided that these
programs will function as intended.
The programs LOADDSKF and SAVEDSKF are copyrighted by IBM.
(PLEASE DO NOT DISTRIBUTE ANY BETA FILES YOU MAY FIND ON BULLETIN
BOARDS, CONTACT THE AUTHOR FOR THE LATEST PRODUCTION CODE.)