Dec 062017
 
Very good conversion utility. Performs multiple global replacements on multiple input files. With documentation.
File COPYR77.ZIP from The Programmer’s Corner in
Category Word Processors
Very good conversion utility. Performs multiple global replacements on multiple input files. With documentation.
File Name File Size Zip Size Zip Type
COPYR.COM 19217 5485 deflated
COPYR.DOC 38237 10822 deflated
DBASE.REP 116 72 deflated
ORDER.DOC 5999 2174 deflated
SAMPLE1.REP 42 42 stored
SAMPLE2.REP 1941 510 deflated
SAMPLE3.REP 2927 541 deflated
WORD103.REP 2705 471 deflated
WP42.REP 1196 282 deflated
WP50.REP 2767 628 deflated
WPQUOTE.REP 1004 245 deflated
XRITE.REP 227 89 deflated

Download File COPYR77.ZIP Here

Contents of the COPYR.DOC file















UTILITY GUIDE


Copy/Replace
(COPYR)



Version 7.7

Copyright(c) 1988, 1989, 1990, 1991 Joseph Baechtel
All Rights Reserved

7 May 1991






LICENSE


All versions of COPYR, including version 7.7, are not public
domain software, nor are they free software.

COPYR is copyright (c) 1988, 1989, 1990, 1991 by Joseph Baechtel.

Non-registered users are granted a limited license to use COPYR
on a trial basis for the purpose of determining whether COPYR is
suitable for their needs. Use of COPYR, except for this limited
purpose, requires registration. Use of non-registered copies of
COPYR by any person, business, corporation, governmental agency
or other entity institution is strictly forbidden.

Registration permits a user the license to use COPYR only on a
single computer; a registered user may use the program on a
different computer, but may not use the program on more than one
computer at the same time.

No user may modify COPYR in any way, including but not limited to
decompiling, disassembling or otherwise reverse engineering the
program.

All users are granted a limited license to copy COPYR only for
the trial use of others subject to the above limitations, and
also the following:

COPYR must be copied in unmodified form, complete with the
file containing this license information.

The full COPYR documentation must be included with the copy.

No fee, charge or other compensation may be accepted or
requested by any licensee.

COPYR may not be distributed in conjunction with any other
product.

Operators of electronic bulletin board systems (Sysops) may post
COPYR for downloading by their users only as long as the above
conditions are met.

Distributors of public domain or user supported software may
distribute copies of COPYR subject to the above conditions only
after obtaining written permission. Such permission usually is
granted; please write for details.

See the Ordering section for more information on registration,
corporate licensing and similar topics.



ORDERING INFORMATION

A COPYR registration licenses you to use the product on a regular
basis. Registration includes mailed notification of updates.

Individual registrations for COPYR come in three forms. The
first, registration only, costs $25 and assume you have already
received a copy of the program from whatever source. We do not
provide diskettes or manuals. The registration fee covers the
use of the program. For $35 we offer a combination
registration/diskette package. The diskette includes the latest
version of the program, its' documentation and some supporting
sample files. We also offer the works!, which adds a printed,
bound manual to the registration and diskette. Copies of the
works! are available for $50.

Please use the enclosed order form when placing an order.


Corporate and Quantity Purchases

All corporate, business, government or other commercial users of
COPYR must be registered. We offer quantity discounts starting
at the eleventh copy. Corporate or site licensing is also
available.

For single unit orders, use the enclosed order form. We accept
purchase orders in amounts over $100 only. All other orders
should be prepaid.

Orders in quantities of less than 25 units are handled as bulk
purchases. We can provide either registration/disk combo or the
works!. Purchases of over 25 units may be handled as quantity
purchases or as corporate licensing agreements. Licensing
agreements allow duplication and distribution of specific numbers
of copies within the licensed institution. Duplication of
multiple copies is not allowed except through execution of a
licensing agreement. Please write or call for details.

The quantity purchase discounts are as follows:

0-10 copies: no discount
11-25 copies: 15% discount
26-50 copies: 20% discount
51-100 copies: 25% discount

ALL PRICES AND DISCOUNTS ARE SUBJECT TO CHANGE WITHOUT NOTICE.
Discounts are not cumulative; they apply to single orders of like
products only. Unit prices are the same as for individual users.

WARNING: YOU MAY NOT USE COPYR WITHIN YOUR ORGANIZATION WITHOUT A
PRIOR PURCHASE OR LICENSE ARRANGEMENT.



COPYR SHIP TO: ___________________________________
105 Hedgewood Drive
Greenbelt, MD 20770 ___________________________________

___________________________________

___________________________________


TELEPHONE: (_________) _________ - ___________
_________________________________________________________________


QUANTITY DESCRIPTION UNIT PRICE TOTAL PRICE
_________________________________________________________________
Registration Only 25.00
_________________________________________________________________
Combo Registration/Disk 35.00
_________________________________________________________________
The Works! Reg./Disk/Man. 50.00
_________________________________________________________________

Sub Total _______________
_________________________________________________________________

MD Residents add 5% Sales Tax _______________
_________________________________________________________________

Total _______________
_________________________________________________________________



Check One:
______ 3 1/2 inch IBM format diskette

______ 5 1/4 inch IBM format diskette

_________________________________________________________________

Method of Payment ______ Check ______ Money Order ______ P/O
_________________________________________________________________

Purchase Orders over $100 are accepted from most companies,
governmental agencies and schools. The Terms are NET 30 Days.



This manual was completely updated to reflect the current state of the
program as of release 7.7.

Specifications subject to change without notice.

This document copyright(c) 1991 Joseph Baechtel. All rights reserved.

WORD PERFECT is a registered trademark of WordPerfect Corporation.

PC-MOS is a registered trademark of The Software Link, Incorporated.

MS-DOS is a registered trademark of Microsoft Corporation.

Microsoft Windows 3.0 is a registered trademark of Microsoft Corporation.

MAXAR 386 is a registered trademark of Hyosung Computer.

DELL 310 is a registered trademark of DELL COMPUTER CORPORATION.

IBM is a registered trademark of International Business Machine Corporation.

Printed in the United States of America.

WARRANTY

I make no warranty of any kind, express or implied, including without
limitation, any warranties of merchantability and/or fitness for a particular
purpose. I shall not be liable for any damages, whether direct, indirect,
special or consequential arising from a failure of this program to operate in
the manner desired by the user. I shall not be liable for any damage to data
or property which may be caused directly or indirectly by use of the program.

IN NO EVENT WILL I BE LIABLE TO YOU FOR ANY DAMAGES,
INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
YOUR USE OR INABILITY TO USE THE PROGRAM, OR FOR ANY
CLAIM BY ANY OTHER PARTY.




TABLE OF CONTENTS
Page
SECTION 1: INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

SECTION 2: PROGRAM DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . 2-1

PROGRAM INVOCATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Command File . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

COMMAND FILE EDIT PROCESSING . . . . . . . . . . . . . . . . . . . . . . . 2-1
Copy Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
String Replacement Commands . . . . . . . . . . . . . . . . . . . . 2-1

PROCESSING SEQUENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Copy Functions - Input Processing . . . . . . . . . . . . . . . . . 2-2
String Replacement Functions . . . . . . . . . . . . . . . . . . . 2-2
Output Format Commands . . . . . . . . . . . . . . . . . . . . . . 2-2
Output Record Size Commands . . . . . . . . . . . . . . . . . . . . 2-3
Copy Function - Output Record Processing . . . . . . . . . . . . . 2-3
Special Processing Commands . . . . . . . . . . . . . . . . . . . . 2-3

SECTION 3: THE COMMAND FILE . . . . . . . . . . . . . . . . . . . . . . . . 3-1

COMMAND FILE CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . 3-1

THE COPY COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
The File Processing Commands . . . . . . . . . . . . . . . . . . . 3-1
PASSTHRU . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
ALLOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
INFILES . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
SORTFILES . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
SEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
The Output Record Size Commands . . . . . . . . . . . . . . . . . . 3-2
OPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
The Record Break Commands . . . . . . . . . . . . . . . . . . . . . 3-2
IPBR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
SPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
NOCRLF . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
RS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
BS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
BLKSIZE . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
The Character Processing Commands . . . . . . . . . . . . . . . . . 3-3
SKIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
ILEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
PAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3




TABLE OF CONTENTS (cond.)
Page
THE REPLACE COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
The Character Replace Commands . . . . . . . . . . . . . . . . . . 3-4
REP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
REREP . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
The Output Data File Format Commands . . . . . . . . . . . . . . . 3-4
NLN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
NDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
IGNORE . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
EXTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
TRANS=A . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
TRANS=E . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
HEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
EOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
NUMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

APPENDIX A: PROGRAM REQUIREMENTS -- SPECIFICATIONS . . . . . . . . . . . . A-1

APPENDIX B: SAMPLE COMMAND FILE . . . . . . . . . . . . . . . . . . . . . . B-1

APPENDIX C: HELPFUL HINTS AND NOTES ON PROGRAM USE . . . . . . . . . . . . C-1




SECTION 1: INTRODUCTION

The Copy/Replace Utility Program is a general purpose PC based utility capable
of performing several wide-ranging functions. The basic division of the
functions is as the program name implies, both the ability to Copy input data
files and to Replace information within the files.

The utility is used primarily for the conversion of textual input data files.
The user controls the final output through the use of a Command File containing
a range of parameters dictating the desired output.

The functions performed by the Copy/Replace Utility may include:

o Processing multiple input files.

o Selective processing of input records.

o Selective processing of character segments in the input records.

o Selective ignoring of character segments in the data file.

o Selective extraction of character segments from within the data.

o Input data files translated from ASCII to EBCDIC, or from EBCDIC to
ASCII.

o Conversion of non-printable hex characters into their printable forms.

o Replacement of "unique" character strings in the data file, even
across record or file boundaries.

o Concatenation of the input records.

o Output record size either larger or smaller than input record size.

o Forced new records (lines) based upon "unique" character strings.

o Forced new datasets (output files) based upon "unique" character
strings or number of output records in file.

o User selectable line numbering of output file.

o Pass thru of a file with contains information which should remain
un-altered (useful in creating output files that can be directly
loaded into certain word processing packages -- ie. WORD PERFECT).

The Copy/Replace Utility can perform many useful conversion tasks. When the
user has well defined input and output requirements the limitations of the
program are few.




SECTION 2: PROGRAM DESCRIPTION

The following description of the program processing is very general in nature.
The intent is to present a basic flow of the execution of the parameters
supplied by the user in the Command File. The processing of the input data
file is actually performed as two separate program functions, the Copy function
and the Replace function.

PROGRAM INVOCATION

The syntax for invoking the Copy/Replace Utility is as follows:

COPYR

Where is a valid PC filespec which may contain a disk drive
identifier, a path name, and the file name/ext. The file name may contain the
global characters "?" and "*". For the proper use of these global characters,
the user should consult their DOS user's manual. ***** NOTE: THE PROGRAM WILL
PROCESS A MAXIMUM OF ONE HUNDRED (100) INPUT FILES--SEE THE "INFILES="
PARAMETER DESCRIPTION IN SECTION 3. *****

Where is a valid specific PC filespec which may contain a disk
drive identifier, a path name, and the file name/ext. The file output name may
not contain any global characters.

Where is a valid specific PC filespec which may contain a disk
drive identifier, a path name, and the file name/ext. The command file name
may not contain any global characters. ***** NOTE: USE OF THE COMMAND FILE IS
OPTIONAL. IF NOT SPECIFIED BY THE USER, THE PROGRAM WILL DEFAULT MANY OF ITS'
PROCESSING SWITCHES AS DESCRIBED FOR EACH SWITCH, IN SECTION 3. *****

COMMAND FILE EDIT PROCESSING

The Command File is "edited" for correct syntax of the commands found in the
file.

Copy Commands

The various Copy Commands are stored for execution. The actual processing
sequence is discussed later.

String Replacement Commands

The commands designated as Replacement Commands are segregated for processing
purposes.

PROCESSING SEQUENCE

This description is designed to present the execution sequence of the various
Copy and Replace Commands. Each command described will execute only if the
user has specified that command in the Command File. Defaults are as described
in Section 3. Both the Copy and Replace functions operate on a character by
character basis.




Copy Functions - Input Processing

The input file is read and the record SELect parameter is checked. Records not
within the select range are bypassed for further processing and the program
continues to read the input file.

Records found within the processing range are TRANSlated if necessary. The
Character Processing Commands SKIP and ILEN are processed (in this sequence).

When the character being examined is the last character of the input record,
the IPBR command is considered. This command dictates that the input record
retain all CR/LF characters. When IPBR has not been specified. The program
will strip the CR/LF characters from between the input records (concatenation).
Please note that if a space is desired between the end of one record and the
start of another record, the user must specify SPACE in the Command File.

String Replacement Functions

The Replace functions are performed following the Input Processing functions of
the Copy portion of the program. After processing the Replace functions, the
Copy functions of the program will resume.

The input record is processed on a character by character basis. Comparison is
made to an internal table representing the Replace Commands processed by the
Command Edit function.

Characters satisfying an old string for the REPlacement are changed to the new
string and processing of the record continues at the next input character
beyond the old string.

If the REREP (re-replace) Command is used, the input character pointer remains
pointing to the first position of the Replacement just made. This allows the
re-processing of Replacement strings within other Replacement strings.

The NLN string, when encountered in the input data stream, will force the
output of a Carriage Return/Line Feed (CR/LF) followed by the NLN string. The
input character(pointer is positioned at the next character beyond the NLN
string, to prevent NLN routine looping.

Output Format Commands

If a NDS marker or the record number specified by the NDS Command is
encountered, the current output file is closed and a new one is opened.

If the PASSTHRU Command is selected, the file specified is passed directly thru
to the output file (un-altered) before processing any of the input files
occurs. This feature is useful for creating output files which require some
form of initialization data by the program that uses them. An example of this
is the printer definition information contained at the beginning of a WORD
PERFECT document.

If the ALLOUT Command is selected, the PASSTHRU file contents will be appended
to the beginning of each output file created.




Output Record Size Commands

If the output record MAXimum has been reached, the record will be sent to the
Output Record Processing. The record will break at the space preceding the
MAXimum value.

The OPTimum record size command is actually processed subsequent to the MAXimum
record size command. If the record size is either greater than or equal to the
optimum size the program will advance to the next space and send the record to
Output Record Processing.

Non-printable hex characters are also considered as break points for the output
record in lieu of a space.

If no space is encountered in the output record before the MAXimum record size
is reached, the program will break the output record at the MAXimum record size.

Copy Functions - Output Record Processing

Every output record write will process the RS= (record separator) Command. The
MINimum Command is also processed.

A mask of the output record is built based upon the parameters supplied in
MAXimum output record size, OPTimum output record size and the PAD character.

If the user specifies a BLKSIZE (block size) Command in the Command File, the
Output Record Processing will block the output records until the BLKSIZE is
reached. At which time Output Record Processing will replace the last RS=
sequence with the BS= (block separator) Command sequence, if specified in the
Command File.

Special Processing Commands

If the SORTFILES Command is selected, the input file names specified by the
INFILES Command (or the use of global wildcard characters in the file name) are
sorted in ascending alphabetical sequence before any input files are processed.
This gets around the limitation of processing files in directory sequence when
using wildcard characters within file names.

The user may optionally choose to have the output file include line numbers.
Some editor require line numbers in data files so that they may be used. Use
of the NUMBERS Command will place a five (5) digit line number, followed by a
space, at the start of each record. It is the users responsibility to take
into account these extra six (6) digits when considering the specification of
the MIN, OPT, MAX and BLKSIZE parameters in the command file.

The user also has control over the generation of the EOF (End Of File) marker
at the conclusion of processing thru the use of the EOF Command.




SECTION 3: THE COMMAND FILE

The Command File is a file which contains all the COPYR commands required to
process an input file being copied or manipulated. Most COPYR applications
require the use of a Command File.

COMMAND FILE CHARACTERISTICS

Any command requiring a parameter, will contain no spaces between the command
mnemonic, an equal sign and the parameter supplied.

Copy commands should be the first elements of the Command File, immediately
followed by the Replace commands. This is done for readability only.

THE COPY COMMANDS

The copy commands deal primarily with both the input and output file structures.

The File Processing Commands

PASSTHRU=
Where is a valid PC filespec which may contain a disk drive
identifier, a path name, and the file name/ext.

This command will pass, directly thru to the output file, the data in
the file specified (un-altered) before any input file(s) are processed.

ALLOUT
This command will append the PASSTHRU file contents to the beginning of
each output file created.

INFILES=
Where is a valid PC filespec which may contain a disk drive
identifier, a path name, and the file name/ext. The file name may contain the
global characters "?" and "*". For the proper use of these global characters,
the user should consult their DOS user's manual. ***** NOTE: THE PROGRAM WILL
PROCESS A MAXIMUM OF ONE HUNDRED (100) INPUT FILES. *****

This command allows the user to specify additional input files for
processing. The additional file(s) will be concatenated to the previous input
file specified in the program invocation command line. However, only one
output file will be created. ***** NOTE: USING GLOBAL WILDCARD CHARACTERS
WITHIN THE FILENAME WILL RESULT IN THE INPUT FILES BEING PROCESSED IN DIRECTORY
SEQUENCE. IE.- THE ORDER IN WHICH THEY WERE CREATED IN THE DIRECTORY, UNLESS
THE SORTFILES COMMAND IS SPECIFIED. *****

SORTFILES
Requests that the input file names (specified by the INFILES Command or
the use of wildcard characters within the file name) be sorted in ascending
alphabetical sequence before processing.




SEL=nnnn/nnnn Default = 1/32,767
Requests processing of only a portion of an input file, or selective processing.
The "equal" sign is followed by starting and ending record numbers defining the
portion of the input file which is to be processed by COPYR. ***** NOTE: ONLY
ONE SEL COMMAND CAN BE SPECIFIED IN A COMMAND FILE. *****

The Output Record Size Commands

OPT=nnnn (3-32,000) Default = 75
Optimum number of characters positions in a single output record.
Specifies the character position after which the record breaks on a space. The
optimum record size command merely defines a break point, not the total record
length.

MAX=nnnn (3-32,000) Default = 80
This command specifies the maximum length of the output record before
which the record breaks on a space. Therefore, when MAX is specified as 100
character positions, an input record of 160 characters would form two output
records, the first record 99 characters or less in length, and the second 61
characters or more, depending upon where the last space before character
position 100 is located.

MIN=nnnn (3-32,000) Default = 3
Minimum record size. Records with lengths less than the value specified
by MIN are filled with spaces or a user specified PAD character.

The Record Break Commands

IPBR
Specifies that the CR/LF characters at the end of each input record are
to be processed (not stripped off) which will cause the output records to break
at the same point as the corresponding input records. (Records in = Records
out).

SPACE
Causes a space to be included between concatenated input records when
IPBR is not in effect.

NOCRLF
Specifies that the record terminator sequences (CR/LF, CR, or LF) pass
directly thru to the output file instead of the normal processing mode which
replaces them with the RS character(s). See RS below.

This feature is useful in maintaining the integrity of the line terminating
sequences used by many of the popular word processing packages.

RS=" " Default = CRLF
RS=' ' Default = 0D0A
Causes the specified character(s) (maximum of two) to be placed in the
last position of each output record, thus defining a "carriage return" "line
feed" character sequence.




BS=" " Default = NONE
BS=' ' Default = NONE
Causes the specified character(s) (maximum of two) to be placed in the
last position of each output block, thus defining a "block delineation"
character sequence.

BLKSIZE=nnnn (3-32,000) Default = 3
Specifies the block length of the output block (multiple output records).
BLKSIZE must be a multiple of MAXimum record size.

The Character Processing Commands

SKIP=nnnn (0-32,000) Default = 0
Specifies the number of character positions to be skipped from the beginning of
each input record.

ILEN=nnnn (1-65,535) Default = 32,767
Indicates the number of character positions to be processed in each input
record.

PAD=" " Default = SPACE
PAD=' ' Default = 20
Defines the character to be used to pad out a record to the minimum length
specified by the MIN output record size command. If a pad character is not
specified, the system supplies a single space as a default.

THE REPLACE COMMANDS

The commands in this group initiate character replacements, or changes in the
format of the output data file.

The system recognizes the following string notations:

A literal character string is represented to the system by double quotes (" ")
surrounding the string. A string of characters in hexadecimal notation is
represented to the system by single quotes (' ') surrounding the string. A
NULL string ("") is represented to the system by two double quotes with no
intervening space. A null string is used to REP a given string to nothing
(throwing it away).

Character and hex notation strings may be combined in the REP / NLN / NDS /
IGNORE / EXTRACT commands. The are combined by placing the double quotes (" ")
and the single quotes (' ') together without an intervening space or carriage
return (CR) between them. A comma may be used to separate them for
readability. The following example should make this more understandable:

REP "Character portion",'0D' WITH "Now no CR"

In this example, this REP command will replace all occurrences of the character
string "Character portion" followed by a carriage return (CR) with the
character string "Now no CR" and remove the carriage return from the input data
stream. The line or record following this one would be butted up against this
one due to the effect of removing the carriage return. This should make
replacement of mixed string types within the data stream very simple.




The Character Replace Commands

REP "old string" WITH "new string"
This command tells the system to replace the "old string" of characters
currently in the input data file with a "new character string". The word WITH
shown above, is optional.

REREP
This command tells the system to leave the input character stream pointer
unchanged after a REPlacement is made (normal REPlacement processing advances
the pointer to the next position following the REPlacement string just
processed). This allows the re-processing of REPlacement strings within other
REPlacement strings. ***** WARNING --USE EXTREME CAUTION WHEN USING THIS
COMMAND. IMPROPER USE OF THE REPLACEMENT COMMANDS MAY CAUSE UNCONTROLLED
LOOPING OF THE CHARACTER REPLACE PROCESSING ROUTINES. *****

***** NOTE: A MAXIMUM OF 256 REP/NLN/NDS/IGNORE/EXTRACT COMMANDS CAN BE
SPECIFIED IN A COMMAND FILE. *****

***** NOTE: THE REP/NLN/NDS/IGNORE/EXTRACT STRINGS HAVE A MAXIMUM LENGTH OF
125 CHARACTERS. *****

The Output Data File Format Commands

NLN "string"
NLN 'string'
Will begin a new line when the system encounters the specified
character(s) within the quotes following NLN.

NDS "string"
NDS 'string'
NDS=nnnn (1-65,535)
Will begin a new dataset (output file) when the system encounters the
specified character(s) within the quotes following NDS, or the specified output
record number following the (=) sign. Output file names are generated by the
program by using the file name specified by the user and changing the extent
(.ext) to a three (3) digit incremental number (starting at .002). ***** NOTE
-- It is recommended that the user specified output file name extent be
specified as (.001) in order to keep the generated output files grouped
properly.

IGNORE="ignore string" "consider string"
IGNORE='ignore string' 'consider string'
Specifies a string that, when encountered in the input character stream,
will bypass for further processing all characters in the input data stream
until the second string specified is encountered.

EXTRACT="consider string" "ignore string"
EXTRACT='consider string' 'ignore string'
Specifies that all data in the input data stream will be bypassed for
further processing (ignored) until the first string specified is encountered.
Data encountered between the two strings will be considered for further
processing. After the second string specified is encountered in the input
character stream, data will once again be bypassed until the next EXTRACT
string is encountered.




TRANS=A
Specifies that the input data file is to be translated from EBCDIC into
ASCII representation.

TRANS=E
Specifies that the input data file is to be translated from ASCII into
EBCDIC representation.

HEX
Specifies that any non-printable, hexadecimal characters, are not to be
replaced with their printable forms surrounded by delimiters (). The
non-printable characters are 00-09, 0B-0C, 0E-1F and 7F-FF.

EOF
Specifies that there should not be an EOF character (hex 1A) placed at
the end of the output file. This optional switch is included to create files
for use with programs where an EOF character is not desirable, such as some
word processing systems.

NUMBER
Specifies that the output file should include line numbers generated by
the program. These numbers are five (5) digits in length followed by a space,
and are placed at the beginning of each output record. The user must consider
these extra six (6) characters when specifying the MIN, OPT, MAX and BLKSIZE
Commands.




APPENDIX A: PROGRAM REQUIREMENTS -- SPECIFICATIONS

PROGRAM REQUIREMENTS:

o IBM PC, PC/XT, AT, 386 or Compatible

o 256K Main Memory

o 1 Floppy Disk, or Hard Disk Drive

o MS-DOS 3.1 or Higher (Also Tested Under PC-MOS 4.0 and
Microsoft Windows 3.0)

o ANSI.SYS Screen Driver Installed in CONFIG.SYS
(DEVICE=ANSI.SYS)



SPECIFICATIONS:

o IBM PC, 256K Memory, 8086, Floppy Input/Floppy Output = Approx.
408 Characters Per Second

o IBM PC/XT, 640K Memory, 4.77MHz, 8088, Hard Disk Input / Hard
Disk Output = Approx. 537 Characters Per Second

o IBM PC/XT, 640K Memory, 4.77MHz, NEC V20, Hard Disk Input /
Hard Disk Output = Approx. 721 Characters Per Second

o Maxar 386, 4M Memory, 16MHz, 80386, Hard Disk Input / Hard Disk
Output = Approx. 2400 Characters Per Second

o Dell 310, 4M Memory, 20MHz, 80386, Hard Disk Input / Hard Disk
Output = Approx. 3600 Characters Per Second




APPENDIX B: SAMPLE COMMAND FILE


IPBR
OPT=75
MAX=80
REP "This is the before rep" WITH "This is the after rep"
REP "Change all *" WITH "To :"
REP "a" WITH "A"
REP 'FF' WITH ""


The first sample line above, instructs the program to break the input data
stream at the same place as the input records are broken.

The second sample line above, instructs the program to begin looking for a
space in the input record after the 75th character position, at which it is to
break to a new output record.

The third sample line above, instructs the program to produce output records
with lengths no greater than 80 characters. Remember, this record length
includes the RS= (Record Separator) character(s).

The fourth sample line above, instructs the program to replace all occurrences
of the string "This is the before rep" in the input data stream with the string
"This is the after rep".

The fifth sample line above, instructs the program to replace all occurrences
of the string "Change all *" in the input data stream with the string "To :".

The sixth sample line above, instructs the program to convert all lower case
letter "a"s to the upper case letter "A"s.

The seventh sample line above, instructs the program to remove all occurrences
of the hexadecimal character 'FF' from the input data stream. The null string
(""), two double quotes together will not go to the output file, effectively
removing any unwanted character sequences.




APPENDIX C: HELPFUL HINTS AND NOTES ON PROGRAM USE


When converting a file type for the first time, it is recommended that
you run it thru the program without a command file for the first pass. This
will convert all non-printable hex values into their printable forms. Once
this has been done the information obtained can be used to help construct the
command file needed for final conversion of the file. Using this method a
conversion can be accomplished in a very short period of time.

Since strings used as NLN and NDS Commands are not eligible for
REPlacement processing, if the user wishes to have them treated as such, they
must be setup as REP's. To simulate a NLN string place a CR/LF sequence prior
to the second half of the REP Command string. This will convert the input
string to the new string placing it at the start of a new line. NDS Commands
can be simulated by placing a hex 'FF', followed by the string "NDS", followed
by another hex 'FF' prior to the second half of the REP Command string. This
five (5) digit marker sequence will achieve the desired results.

ei. REP "This" WITH 'FF'"NDS"'FF'"That"

When converting between two different file types it can be helpful to take a
similar file, of the destination file type, and process it thru the program.
This will give you valuable information as to the codes used to aid you in the
conversion process.

In some difficult conversion situations you may find a two pass
conversion approach will achieve the desired results where one will not.

You will find that with a little imagination and careful planning, the
program will take much of the work out of the conversion process. It is not
unusual, that with the proper command file, the program can achieve a 100%
conversion rate.

The input file remains untouched by the conversion process. Therefore
you may always recover from an un-successful conversion attempt. This should
help eliminate any fears of the first time user concerning the use of the
program on their data.



 December 6, 2017  Add comments

Leave a Reply