PMDF System Manager's Guide


Previous Next Contents Index

38.10 MS-DOS Gateway Utilities

Several DOS utilities are provided in the directory pmdf_root:[other.dos] (OpenVMS) or /pmdf/other/dos (UNIX) which can be used to diagnose problems or help transfer files.


DELAY

Suspend execution of a DOS batch file for a specified length of time.

Syntax

DELAY time-spec


Parameters

time-spec

Time specification as an unsigned number of seconds.

Description

The program waits for the requested amount of time then exits.

To simplify entry of the time specification, groups of digits can be scaled to common time units by inserting keywords as follows:


<n..n>weeks<n..n>days<n..n>hours<n..n>minutes<n..n>seconds 
where each represents one or more digits. No embedded white space is allowed. Each scale factor keyword can be abbreviated to its leading character. Case is ignored. The trailing "seconds" modifier is completely optional.


Examples

To wait for 2 hours and 30 minutes you can use either of the following two commands:


C:\ DELAY 2hours30minutes
C:\ DELAY 2h30m


FDUMP

Dump a file in ASCII, binary, hex, or mixed format.

Syntax

FDUMP input-file-spec

Command Qualifiers Defaults
-a None
-b None
-h None
-m -m
-o None
-s starting-offset None

Parameters

input-file-spec

Input file specification describing the file to be dumped.

Description

Write to stdout the contents of the input file in the selected format. The output format consists of one or more lines of printable characters. Each line has the starting offset (i.e., address within the octet stream) shown to the left followed by a colon. The number of file octets shown per line varies with the selected format.

The dump is prefaced with a header showing the name of the file being dumped, the date and time, and column headings. The column headings indicate the output mode.

If the specified file does not exist or if the command line contains an unknown option switch, a diagnostic message is instead written to stderr. If no filename follows the fdump keyword on the command line, a general message indicating proper program usage is written to stderr.


Command Qualifiers

-a

Set output format to all ASCII. Each output line shows 64 (decimal; 0x40 hex) octets. They are arranged in groups of 8 octets with a space between each group. An extra space is inserted after 32 (0x20) octets (i.e., in the middle of the line). If an octet is a printable ASCII character, it is shown unmodified. If non-printable, a decimal point is shown instead.

-b

Set output format to binary. Each output line shows 4 octets. Each octet is shown as the upper 4 bits, a space, and the lower 4 bits.

-h

Set output format to hexadecimal. Each output line shows 16 (0x10) octets. Each octet is separated from its neighbor by one space. An extra space is inserted after 8 octets (i.e., in the middle of the line).

-m (default)

Set output format to mixed hexadecimal and ASCII. This is the default output mode. Each output line shows 16 (0x10) octets. Following the address on the left, the octets are shown in hexadecimal. Each octet is separated from its neighbor by one space. An extra space is inserted after 8 octets (i.e., in the middle of the line). On the right side, the same octets are shown in ASCII. They are arranged in groups of 8 with a space between the two groups. If an octet is a printable ASCII character, it is shown unmodified. If non-printable, a decimal point is shown instead.

-o

Set output format to octal. Each output line shows 16 (0x10) octets. Each octet is separated from its neighbor by one space. An extra space is inserted after 8 octets (i.e., in the middle of the line).

-s starting-offset

If present, specifies a starting offset, in the file. Use NNN to enter an address in decimal and 0xNNN to enter it in hex. If this qualifier is not supplied, fdump begins with the first octet of the file.

Examples


F:\MHS\MAIL\GATES\PMDF\OUT> fdump -m $t100005
fdump of $t100005 on Tue Jan 18 12:11:01 1994 
 
addr  hex                                                 ascii 
0000: 03 0A 32 34 32 53 65 6E  64 2D 74 6F 3A 20 6D 61    ..242Sen d-to: ma 
0010: 69 6C 65 72 20 40 20 70  6D 64 66 20 7B 73 6D 74    iler @ p mdf {smt 
0020: 70 3A 20 66 6F 6F 40 62  61 72 2E 63 6F 6D 7D 0A    p: foo@b ar.com}. 
0030: 32 32 48 6F 70 2D 63 6F  75 6E 74 3A 20 31 0A 32    22Hop-co unt: 1.2 
0040: 33 30 30 53 65 6E 64 65  72 3A 20 4C 45 45 20 40    300Sende r: LEE @ 
0050: 20 49 4E 4E 4F 53 4F 46  54 20 28 4C 65 65 20 4A      PROCES S (Lea J 
0060: 6F 6E 65 73 2C 20 4A 43  43 29 0A 32 30 30 30 4D    ones, JC C).2000M 
0070: 43 42 2D 6F 70 74 69 6F  6E 73 3A 20 59 4E 59 4E    CB-optio ns: YNYN 
0080: 41 4E 41 0A 32 32 30 30  4D 43 42 2D 74 79 70 65    ANA.2200 MCB-type 
0090: 3A 20 30 0A 32 31 30 30  44 61 74 65 2D 70 6F 73    : 0.2100 Date-pos 
00A0: 74 65 64 3A 20 31 38 2D  4A 61 6E 2D 39 34 20 31    ted: 18- Jan-94 1 
00B0: 32 3A 30 39 3A 34 31 0A  32 32 30 30 53 4D 46 2D    2:09:41. 2200SMF- 
00C0: 76 65 72 73 69 6F 6E 3A  20 37 30 0A 32 32 30 30    version:  70.2200 
00D0: 45 72 72 6F 72 2D 72 65  70 6F 72 74 3A 20 30 0A    Error-re port: 0. 
...   ...                      ...                        ... 
0280: 6E 66 6F 3A 20 30 0A 56  69 61 2D 68 6F 73 74 3A    nfo: 0.V ia-host: 
0290: 20 49 4E 4E 4F 53 4F 46  54 2E 49 4E 4E 4F 53 4F      PROCES S.PROCE 
02A0: 46 54 0A 0A 64 6F 6F 66  0D 0A 0D 0A                SS..doof .... 
 


MHSFORM

Convert a plain text message into the proper SMF-70 format to allow testing of Novell MHS.

Syntax

MHSFORM [input-file-spec [output-file-spec]]


Parameters

input-file-spec

Input file specification of an existing file to be read as input text. If not supplied on the command line, the program will prompt for it.

outfile-spec

Output file specification. This parameter can only be supplied on the command line if an input file specification is also supplied. If not supplied on the command line, the program will prompt for it.

Description

Convert a plain text message into the proper SMF format required by Novell MHS. This program allows testing a PMDF to MHS gateway without a working MHS system.

The input file is in common text mode created by any normal editor. Each line can be terminated by either a single line feed or a carriage return, line feed pair. On OpenVMS, the file can also be variable length with one line per record.

The output file is written in SMF. An SMF message consists of a header followed by an optional body. The first line is a header signature consisting of a single ASCII Ctrl/C (0x03 hex) character. Each line is terminated by a single linefeed. The end of the header portion is signified by the first empty (zero length) line.

When run, the program prompts for the input text file and then for the output SMF file, unless supplied on the command line.

To check PMDF, make a message on the system running PMDF, convert it to SMF syntax, put it in the right directory on the PMDF system, run the PMDF delivery job, and see if the message is delivered. To also check out the transfer PC process, make the message on the PC, convert it to SMF syntax, put it in the right DOS directory, run the transfer process, run the PMDF delivery job, and see if the mail arrives.

This program can be used run on either the PMDF host system or on under MS-DOS on an Intel 80x86 processor. The executables for PMDF host systems are kept in the PMDF executable directory (PMDF_EXE: on OpenVMS systems; /pmdf/bin on UNIX systems). The MS-DOS executable is mhsform.exe and on OpenVMS systems is stored in the PMDF_EXE:[other.dos] or /pmdf/other/dos on UNIX systems.

Under OpenVMS, you need to define a foreign symbol if you want to supply the file names as command line arguments when starting the program.)


Examples

On OpenVMS:


$ RUN PMDF_EXE:mhsform.exe
Copy text message into SMF syntax 
 
enter input text file name: sample-mhs-msg.txt 
 
enter output SMF file name: $t123456. 
 
read   40 lines from sample-mhs-msg.txt 
wrote  40 lines to $t123456. 
$ 


PMDFMOVE

Move files to a transfer directory for the PC to PMDF gateway.

Syntax

PMDFMOVE from-spec[,...] to-path

Command Qualifiers Defaults
/BEFORE=date-time None
/DELETE /DELETE
/HELP None
/LOG /NOLOG
/SINCE=date-time None
/VERSION None

Parameters

from-spec

File specification describing the file or files to be moved. Wild cards are allowed. If the specification begins with an at-sign, @, then it is taken to be the name of a file containing a list of files to move.

to-path

Target drive or directory path (or both) indicating where to move the files.

Description

The file move is done by copying each source file into the target directory and, if the copy is successful, deleting the source file. The copying process will not overwrite an existing file of the same name in the target directory. Each file to be moved is expected to have normal attributes (i.e., not hidden, not system, and not read-only).

The source and destination are normally on different devices. This is because PMDFMOVE is usually executing on a transfer PC. It acts as a gateway between a system running PMDF and a PC file server. However, this is not required. The only actual restriction is that the source and destination not be the same directory.

When the from-spec parameter begins with an at-sign, @, the name following the at-sign is interpreted as the name of a "list file" containing a list of the files to move. The name of this file can not contain wild cards. Each line of the file should give the name of a single file to move. The /BEFORE and /SINCE qualifiers can not be used in conjunction with a list file.

To simplify its inclusion in a constantly running batch job, PMDFMOVE sets an exit status code whenever it completes running. This exit status code can be tested with the "IF ERRORLEVEL nn GOTO" construct in a batch file; exit values at or above 32 enumerate serious conditions. The possible exit values are:
Exit code Description
0 Normal, successful completion with no errors or exceptions.
1--31 Exit values from 1 to 31 are the bit-wise logical or of five 1-bit flags. Each flag signals an exception which was not serious enough to immediately terminate the program. These flag bits are as follows: bit 0 (value 1) indicates that one or more source files could not be deleted after being copied; bit 1 (value 2) indicates that one or more source files could not be copied to their destination; all other bits are reserved for future use. An error message is emitted when each exception is encountered so that there is some hope of finding all the causes.
33 Failure due to insufficient resources. For example, insufficient dynamic memory (malloc() failure), or an error while starting a new wild card file search (_dos_findfirst). These errors can be transient due to some other process freeing resources; subsequent retries of the same command can succeed.
44 PMDFMOVE detected some form of incorrect usage, such as an unknown qualifier or a badly formed absolute or delta time. The command line must be fixed before reissuing the command.
99 PMDFMOVE ended normally but without doing any useful work, such as after showing usage information in response to the /HELP qualifier.


Command Qualifiers

/BEFORE[=date-time]

Move files which were last written on or before the specified date and time. The optional date and time specification can take one of the following formats: If the date-time specification is omitted, then all files last written before the current day will be moved (/BEFORE=TODAY).

/DELETE (default)

/NODELETE

By default, source files are deleted after being copied to their destination directory. Specify /NODELETE to inhibit this behavior. When /NODELETE is specified, the PMDFMOVE command acts as a copy command.

/LOG

/NOLOG (default)

When /LOG is specified, a status message reporting each file move will be output to stdout.

/SINCE[=date-time]

Move files which were last written on or after the specified date and time. The optional date and time specification can take one of the following formats: If the date-time specification is omitted, then all files last written after the start of the current day will be moved (/SINCE=TODAY).

/VERSION

Display program version and date.

Examples


N:\MROCHEK> pmdfmove m:oparcel\*. n:iparcel /before=-0:0:30 /log
%pmdfmove: copying M:\OPARCEL\$T123456 to N:\MROCHEK\IPARCEL\$T123456 
%pmdfmove: deleting M:\OPARCEL\$T123456 
%pmdfmove: copying M:\OPARCEL\$T100005 to N:\MROCHEK\IPARCEL\$T100005 
%pmdfmove: deleting M:\OPARCEL\$T100005 
 
N:\MROCHEK> 


PMDFXFER

Template .BAT file to use as an example when setting up a transfer PC to move messages automatically between a PC mail system and PMDF.

Syntax

PMDFXFER

Command Qualifiers Defaults
None. None.

Parameters

None.

Description

This is an MS-DOS batch control file. It is not intended to be used "as is". It is an example to assist the person configuring a support and/or transfer PC in creating a batch file to automate the gateway process. It should, at a minimum, be customized for the local network environment before use.

This file demonstrates using the Lotus cc:Mail Import/Export utilities to move messages into and out of a cc:Mail post office. It also demonstrates using the Novell MHS Connection Manager in single pass mode to transfer messages into and out of gateway directories.

The file transfer portion is based on the shared disk model. It uses the PMDFMOVE utility to actually transfer files. Error conditions, to the extent allowed by MS-DOS, are caught and handled.


VDIR

An enhanced MS-DOS directory command.

Syntax

VDIR [file-spec[,...]]

Command Qualifiers Defaults
/ATTRIBUTE None
/BEFORE=date-time None
/DATE /DATE
/HEADING /HEADING
/HELP None
/OUTPUT=out-file-spec None
/OVER=byte-count None
/PATH None
/PMDF None
/PRINTER None
/PROTECTION None
/SINCE=date-time None
/SIZE /SIZE
/TOTAL_ONLY None
/TRAILING /TRAILING
/TYPE=file-type See text
/UNDER=byte-count None
/VERSION None

Parameters

file-spec[,...]

Optional list of one or more MS-DOS files, including an optional path component. In the file specification, the file name or extension or both, can include * and ? wild card characters. If no file specification is provided, it defaults to "*.*" in the current directory.

Description

Each file specification is examined before use. If neither a file name nor extension is present, "*.*" is appended to the path. If the name is present but the extension is missing, as signified by no period, ".*" is appended. For example, "foo" results in "foo.*" while "foo." remains unchanged. If only the extension is present, a leading "*" is not inserted (unlike OpenVMS where ".bar" would specify "*.bar").

To indicate that you want information about the files in a subdirectory, end the path specification with a backslash character, \. Without a trailing backslash, VDIR will show information about the subdirectory itself. For example, c:\sources is handled as c:\sources.* while c:\sources\ expands to c:\sources\*.* .

Multiple file specifications can appear on the command line. Separate them with commas, plus signs, or white space (blank or tab characters). Each specification is independent. The path, file name, and extension fields do not "carry over" from one to the next (unlike OpenVMS).

All command qualifiers are optional. The effect of each qualifier is global (i.e., none of the qualifiers are positional). The command line is evaluated from left to right. So if related qualifiers are used, like /SIZE and /NOSIZE, the rightmost one will be retained. The default values for each qualifier were selected to result in output similar to the normal MS-DOS DIR command.

Each qualifier and any associated keywords can be abbreviated as desired so long as enough characters remain to make each abbreviation unambiguous (unique). An abbreviation which is too short and matches more than one qualifier will not necessarily generate an error, but will result in (an unspecified) one of the matching qualifiers taking effect. All text comparisons are case insensitive. You can use either an equal sign, =, or a colon, :, to separate a qualifier from any associated value or keyword it might accept (e.g., /SINCE=TODAY or /SINCE:TODAY).

When VDIR exits, it returns an exit value to communicate status information back to the invoker. Currently, these are:
Exit code Description
0 Normal completion.
33 Failure due to insufficient resources. For example, insufficient dynamic memory (malloc() failure), or an error while starting a new wild card file search (_dos_findfirst). These errors can be transient due to some other process freeing resources; subsequent retries of the same command can succeed at a later time.
44 The command parser detected an error in the command line. It will emit a message indicating the problem before halting. Fix the command line before retrying the program.
99 VDIR ended normally but without doing any useful work, such as after showing usage information in response to the /HELP qualifier.

The exit value can control the flow through an MS-DOS batch file using the "IF ERRORLEVEL nn GOTO" construct.

This program was developed so as to allow the selection of files older than a specified date and time, which could assist PC to PMDF gateway software in deciding whether or not a file should be transferred.


Command Qualifiers

/ATTRIBUTE

Shows the file attributes in textual format. Each attribute bit value is indicated by one place in a six position field. The first letter from Archive, Directory, Hidden, Read-only, System, or Volume-label is used if that bit is set or a hyphen, -, if clear. By default, file attributes are not displayed. /PROTECTION is a synonym for /ATTRIBUTE.

/BEFORE[=date-time]

Select files which were last written on or before the specified date and time. The optional date and time specification can take one of the following formats: If the date-time specification is omitted, then all files last written before the current day will be selected.

/DATE (default)

/NODATE

Display each file's date and time of last write (modification). Specify /NODATE to suppress this display.

/HEADING (default)

/NOHEADING

Precedes output with a simple heading showing the device and directory path to the selected files. Specify /NOHEADING to suppress this output.

/HELP

Display version information and usage summary, and then exit.

/OUTPUT[=out-file-spec]

Redirects the output from stdout to the specified output file. If the output file specification is omitted, then the file name VDIR.LST is used. If the special file name PRN is specified, then the output will be directed to the printer port, PRN.

/OVER=byte-count

Select files larger than the specified size in bytes. By default, all files are selected regardless of their size.

/PATH

Preceed each file name with its full path. Default is to show only the file name, a period, and then extension (i.e., no path).

/PMDF

Sets all display format switches to correct values for use in a PC to PMDF gateway transfer function. Currently it is equivalent to a simple list of files prefixed with their paths. Do not try to duplicate the effect of the /PMDF qualifier with individual qualifiers. The /PMDF qualifier will always keep VDIR's output format aligned to the gateway's needs.

/PRINTER

Direct the output to the printer port. Specifying /PRINTER has the same effect as specifying /OUTPUT=PRN.

/PROTECTION

/PROTECTION is a synonym for /ATTRIBUTE; refer to the description of /ATTRIBUTE.

/SINCE[=date-time]

Select files which were last written on or after the specified date and time. The optional date and time specification can take one of the following formats: If the date-time specification is omitted, then all files last written after the start of the current day will be selected.

/SIZE (default)

/NOSIZE

Show file size in bytes and disk blocks used in units of K (1 K = 1024 bytes). Resolution is 0.5 K; disk allocation (sectors actually used) is shown. Actual space consumed can be higher depending on the cluster factor. Specify /NOSIZE to suppress the display of size information.

/TOTAL_ONLY

Suppresses per file display; shows totals only. When /TOTAL_ONLY is specified, /SIZE and /TRAILING are assumed. Default is to show file by file detail.

/TRAILING (default)

/NOTRAILING

Follows output with a totals line showing number of files, number of bytes, and amount of disk in units of K bytes (1024 bytes) with one sector (512 byte) resolution (default). Specify /NOTRAILING to suppress this output.

/TYPE[=file-type]

Select files based on their attributes. file-type can be one of If no file type is specified, then FILES will be assumed. When /TYPE is not specified, the default is to select all real files, including hidden & system, and subdirectories, (i.e., the action of MS-DOS's DIR command plus hidden and system files).

/UNDER=byte-count

Select files smaller than the specified size in bytes. By default, all files are selected regardless of their sizes.

/VERSION

Display program version and date. Output is directed to stderr.

Notes


Examples


C:\> vdir config\conf*
 
 Directory of C:\CONFIG\
 
CONFIG.ENW       203 (  0.5K)  06-03-93 20:19:34 
CONFIG.EPW       249 (  0.5K)  06-03-93 18:37:40 
CONFIG.FTP       246 (  0.5K)  01-19-93 13:45:46 
CONFIG.LCL       148 (  0.5K)  01-06-93 15:04:34 
CONFIG.NW        204 (  0.5K)  11-23-93 17:55:06 
CONFIG.PW        250 (  0.5K)  10-12-93 19:13:46 
CONFIG.PWN       246 (  0.5K)  01-19-93 13:46:02 
CONFIG.UFM       200 (  0.5K)  03-29-93 18:21:56 
CONFIG.WFW       331 (  0.5K)  05-02-93 18:45:22 
 
   9 files with 2077 bytes (in 4.5 K) 
 
C:\> vdir config\ /sin=10-1-93 /prot
 
 Directory of C:\CONFIG\
 
CONFIG.NW        204 (  0.5K)  11-23-93 17:55:06  -----a 
CONFIG.PW        250 (  0.5K)  10-12-93 19:13:46  -----a 
 
   2 files with 454 bytes (in 1 K) 
 
C:\> 


Previous Next Contents Index