tcl.import.r83 Verb: Access/DOS

tcl.import.r83

Command tcl.import.r83 Verb: Access/DOS
Applicable release versions: R83 3.1
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

Complete pathnames must be used if the files are not on the current working directory.

"Pick.file.reference" is the name of the Pick destination file. Just as in the "copy" command, the "(" 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 DOS file is broken up into multiple items and a sequential number is appended to the end of each item-id. If the "L" option is used, a "list-class" (indirect) item is created and the "breakup" process is NOT performed.

The (F) option allows translating (replacing) characters. The operator is prompted for which characters to "flag". A x'00' character is placed in front 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.
"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): ". An answer of "Y" indicates all the entries are correct. An answer of "N" will wipe out all the entries and permit the user to start over.

The (M) option allows a file of multiple DOS records to 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, 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 (T) option translates specified characters to new characters.
The system will ask: "REPLACE: ". At this prompt, 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.
Syntax import {DOS.path}DOS.file {(options}
to:(Pick.file.reference {item-id}
Options D Enables the display of diagnostic functions while accessing the DOS filesystem.

F Flags and translates (single) characters. The "F" option is not compatible with the "T" or "X" options.

L Creates a "list" (indirect) item from the imported data. Not compatible with the "M" option.

M Creates multiple items. The "M" option is not compatible with the "L" option.

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

P Strips parity. Each byte's 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.

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 "T" option is not compatible with the "F" or "X" options.

X Creates a hexadecimal image of DOS file(s). Not compatible with the "F" or "T" options.
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.copydos.r83
tcl.import.dos
file.reference
dos.copypick.r83
dos.copypick
tcl.export
tcl.import.r83.link