tcl.copydos.r83 Verb: Access/DOS

tcl.copydos.r83

Command tcl.copydos.r83 Verb: Access/DOS
Applicable release versions: R83 3.0, R83 2.2, R83 2.1, R83 2.0
Category DOS (25)
Description imports a DOS file into a Pick item.

"DOS.path" is the DOS drive and directory. If no directory is specified, the current working directory is assumed. Complete pathnames must be used if the files are not on the current working directory. The syntax for the "DOS.path" parameter is as follows:

drive:{subdirectory...}DOS.file

"DOS.file" is the explicit name of the source MS-DOS file. For example:

drive:subdirectory1subdirectory2DOS.file
drive:DOS.file

"file.reference" is the name of the Pick destination file. Just as in the "copy" command, the "(" (left parenthesis) is required before the Pick file reference.

"item-id" is the name of the destination item. If not specified, the DOS.file name is used.

If no Pick file name is specified at the "TO:" prompt, the DOS filename is used as the Pick item-id.

If the DOS file is larger than 25,000 bytes and the "M" option is NOT used, the process will break the DOS file into multiple Pick items and append a sequential number to the end of each item-id, i.e. "item-id0", "item-id1", etc. If the "L" option is used, a "list-class" (indirect) item is created and the "breakup" process is NOT performed.

Notes:

If neither the "R" nor the "S" options are specified, "S" is assumed.

If neither the "F" nor the "T" option is specified, then the copypick process automatically translates the DOS carriage return / linefeed character strings (x'0D') into a Pick attribute mark x'FE'), and deletes linefeeds and nulls (x'0A' and x'00'). This option allows data (such as graphics) to be stored in a Pick item without concern for any special characters, such as segment marks (x'FF').
Syntax copydos {DOS.path}DOS.file {(options}
to:(Pick.file.reference {item-id}
Options D Enables the display of diagnostic functions while accessing the DOS filesystem. Not available in v2.0.

d Enables the display of diagnostic functions while accessing the DOS filesystem, and routes the output to the printer. Not available in v2.0.

F Flags and translates (single) characters. The operator is prompted for which characters to "flag". A x'00' character is placed in front of each of the specified characters.

The system will ask: "REPLACE: ". Enter the ASCII value (in hex) of the character to scan for. An entry of <cr> will quit the flag/replace session.

The system will then ask: "WITH FLAGGED: ". If merely "flagging", then enter the ASCII value (in hex) of the character again. If "flagging and translating", then enter in the new "replacing" ASCII value (in hex).

The system will ask for up to 15 additional characters to flag/replace. If the same character is entered twice, only the most recent entry will be accepted.

The system will finally ask: "OKAY(Y/N): ". A answer of "Y" indicates all the entries are correct. An answer of "N" will wipe out all the entries and allow starting over.

The "F" option is not compatible with the "T" or "X" options.

L Creates a "list-class" (indirect) item from the imported data. Not compatible with the "M" option. Also, not available in v2.0.

M Creates multiple items. Multiple DOS records may be imported into a Pick file, with each record being imported into a Pick item. The DOS file may have identical-length records, or it may have each record spanning a specified number of lines.

The system will ask: "ENTER LENGTH OF RECORD (OR Dn): ". If the DOS file is made up of identical-length records, enter the length (in bytes) of the record. The system will create a Pick item for each group of bytes it reads.

If the fields within the DOS records are separated by attribute marks (x'FE'), then the Pick item will have that many attributes. If the fields within the DOS record are not separated by attribute marks, then the Pick item will contain only one attribute.

It is possible to specify that the fields within each DOS record are separated (delimited) by a comma, and then to (t)ranslate the commas into attribute marks. If the DOS file is composed of records which are made up of a (consistent) number of lines, then the the letter "D" can be entered, followed by the number ("n") of lines in each DOS record. The system will create a Pick item for every "n" lines it reads. Each line is considered an attribute, so the new item will have "n" attributes. The item-ids are generated by concatenating the Pick item-id given in the "TO: " question with a sequence number, i.e. <id>1, <id>2, <id>3, etc.

The "M" option is not compatible with the "L" option.

O Overwrites the Pick item(s), if duplicate(s) exist.

P Strips parity. The bytes' most significant bit is set to zero, so the resulting value is between 0 and 127 (x'00' - x'7F'). Flagged characters are not stripped. Not available in v2.0.

R Indicates that DOS data is in "random" file mode. Not compatible with the "S" option.

S Indicates that DOS data is in "sequential" file mode. This is the default. Not compatible with the "R" option.

T Translates specified characters to new characters.

The system will ask: "REPLACE: ". Enter the ASCII value (in hex) of the character to scan for. An entry of <cr> will quit the replace session.

The system will then ask: "WITH: ". Enter the new "replacing" ASCII value (in hex). The system will ask for up to 15 additional characters to replace. If the same character is entered twice, only the most recent entry is used.

The system will finally ask: "OKAY(Y/N): ". An answer of "Y" indicates all the entries are correct. An answer of "N" will wipe out all the entries and start over.

The "T" option is not compatible with the "F" or "X" options.

X Creates hexadecimal image of DOS file(s). Not compatible with the "F" or "T" options. Also, not available in v2.0.
Example
IMPORT C:DOSFILE (SMT
TO: (PROCLIB PICK.SIDE

ENTER LENGTH OF RECORD (OR Dn): D5

REPLACE: 0D   WITH: FE
REPLACE: 0A   WITH: 0A
REPLACE: 2C   WITH: 2A
REPLACE:
OKAY(Y/N) Y
Purpose
Related tcl.dos.bridge.r83
tcl.import.r83
tcl.import.dos
tcl.import
dos.copypick.r83
file.reference
item-id
tcl.copydos.r83.link