Titus Information Systems, Inc.

Standard Library
Stand-alone Programs

Many developers, especially touch-typists, prefer to work, at least some of the time, from a command prompt.  Unfortunately, the native command suite is severely limited in many aspects.  The following stand-alone programs will assist the developer by providing functionality not otherwise available:

AsoAttr – Set File Attributes
This program will set the attributes of the specified file(s) based on the specified switches.  This program operates only in WIN32 command prompt mode and requires TISLIBP.DLL.  The first command-line parameter is the file path name, and may include wild cards.  The following switches are recognized after the file name:
-Mod, -Modify, or
-ModifyDate
This switch must be followed by the new date to which the specified files should have the "last modified" date set.  The recommended format for the date is mm/dd/yyyy.
-Cre, -Create, or
-CreateDate
This switch must be followed by the new date to which the specified files should have the "created" date set.  The recommended format for the date is mm/dd/yyyy.
-Acc, -Access, or
-AccessDate
This switch must be followed by the new date to which the specified files should have the "last accessed" date set.  The recommended format for the date is mm/dd/yyyy.
-RO, -Read, or
-ReadOnly
This switch must be followed by "Set" or "Clear".  The Read Only attribute for the specified files will be set accordingly.
-Hid or -Hidden This switch must be followed by "Set" or "Clear".  The Hidden attribute for the specified files will be set accordingly.
-Arc or -Archive This switch must be followed by "Set" or "Clear".  The Archive attribute for the specified files will be set accordingly.
-Sys or -System This switch must be followed by "Set" or "Clear".  The System attribute for the specified files will be set accordingly.
AsoDate – Date Calculation
This program performs date calculations based on the specified switches.  This program operates in either WIN32 command prompt mode, which requires TISLIBP.DLL, or in DOS real mode, which does not require TISLIBP.DLL.  In DOS real mode, switches are required, and a listing of switches will be displayed if none are entered.  In WIN32 command prompt mode, specifying no switches will cause a GUI dialog box to be displayed.  The following switches are recognized:
-DAYS Calculate difference in days
-JULIAN Calculate absolute Julian date
-FORMAT Format date for printing
-MILITARY Convert date to military format
-CONVERT Convert from annual Julian
-IMPORT Import formatted date to internal
-TODAY Display current date; standard format
-CURRENT Display current date; military format
-AGE Calculate age from current date
-ARRAY Perform DATEDF calculations
-GENERATE Perform DATEGN Calculations
-ENCODE Convert COBOL to absolute Julian
-DECODE Convert absolute Julian to COBOL
-REPLACE Convert internal format to COBOL
-ENDMON Compute end of month
AsoTime – Time Calculations
This program performs time calculations based on the specified switches.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.  If no switches are entered, a listing of switches will be displayed.  The following switches are recognized:
-CHECK Check specified time for validity
-CURRENT Display the current time
-WAIT Wait until the specified time
-PAUSE Pause for specified number of seconds
-START Start timing for specified user
-SUSPEND Suspend timing for specified user
-RESUME Resume timing for specified user
-REPORT Report timing for specified user
-STOP Stop/Report/Clear timing for user
CN – Change File Name
This program changes file names.  It is the same as the DOS REN command except for two differences.  First, wild cards are not processed for either the original file name or the new file name.  Second, a full path name may be specified for the new file name as well as the original file name.  If the paths are different, the file will be moved to the new location.  This will be done by adjusting the directories so that the file will not have to be copied.  This same functionality is available with My Computer and Windows Explorer, but not with the DOS REN command.  Note that neither file path name may include a disk drive.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
DELETE – Delete Files and Folders
This program deletes files.  It will also delete a folder even though the folder is not empty.  It supports wild cards both for files and folders.  Any files encountered to be deleted that have Read Only, System, or Hidden attributes set, will have those attributes cleared so that they can be deleted.  Please be advised that this program can be extremely dangerous!  For example, if you change to the root directory and type DELETE *.*, this program will remove every file not presently in use from your hard disk.  This program operates in either WIN32 command prompt mode, which requires TISLIBP.DLL, or in DOS real mode, which does not require TISLIBP.DLL.
DLSP – Delete Multiple Spaces
This program deletes multiple spaces from each line of the specified input file and creates a new output file.  It is invoked with two file names, the input file and the output file to be created.  The user may force multiple spaces (up to nine) by putting the vertical bar character '|' followed by the number of spaces to be left in that position.  The string is always left justified (a beginning space may be forced with the vertical bar).  The algorithm will be in two passes: the first will remove all multiple spaces ignoring the vertical bars; the second will (from right to left) add spaces depending on the vertical bar commands.  In the event the vertical bar makes the string too large for the buffer, the last vertical bar encountered will be replaced and the forcing discontinued at that point.  By starting a string with enough '|9's, the user may right justify the text.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
DVER – Display Program Version
This program displays the version and copyright message on the console.  It is called with one optional parameter, the application name.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
EBAS – EBCDIC to ASCII Conversion
This program converts all characters in the specified file from ASCII to EBCDIC (if the switch -EBCDIC is given) or from EBCDIC to ASCII (if the switch (-ASCII) is given).  The name of the file to be converted must be specified before the conversion switch.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
FILESTAT – Display File Statistics
This program counts the characters in and displays statistics about the specified file.  This program operates in either WIN32 command prompt mode, which requires TISLIBP.DLL, or in DOS real mode, which does not require TISLIBP.DLL.  In DOS real mode, the file name alone must be specified.  In WIN32 command prompt mode, specifying no file name or switches will cause a GUI dialog box to be displayed.  Also, in WIN32 command prompt mode, the "-SIZE n" switch may be specified after the file name.  If so, the program sets the return code to one (1) if the size of the file is less than that specified.  This may be used in a .BAT file with the IF ERRORLEVEL command.  If the file name alone is specified and with the GUI dialog box, the following statistics are displayed:
Total characters in the file
Nulls (hex 0) Carriage Returns Line Feeds
Form Feeds Deletes (hex 7F) Other control characters
Spaces Numbers (0-9) Upper-case letters (A-Z)
Lower-case letters (a-z) Other printable characters Graphics (hex 80-FF)
FIXC – Fix Control Characters
This program reads a file and replaces all control characters (non-printables) with a space.  The first command-line parameter is the path name of the file to be converted.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.  The following switches are recognized:
-CRLF CR/LF characters are NOT replaced
-QUOTE CR/LF characters are replaced with spaces when inside quotes
-TAB All tabs are replaced with commas
-COMMA All commas are replaced with hats
-HAT All hats are replaced with spaces
-DOLLAR All dollar signs are replaced with zeros
-NULL All nulls are replaced with spaces
FREESPAC – Display Free Space
This program displays the amount of low DOS available memory.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
GETENVAR – Get Environment Variable
This program gets the value of an environment variable.  If a file name is given, the value is written to that file.  If the /QUIET switch is not given, the value is displayed.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
GLUE – Concatenate Binary Files
This program puts back together a file split apart by the TEAR program.  Specify the original file name as a command line parameter, and the file will be created by this program from the pieces.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
JUSRIGHT – Right Justify
This program right justifies the data in the specified left-most columns of each line of the specified text file.  Specify two command line parameters: the text file name and the number of columns upon which to process.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
LOCS – Convert to Lower Case
This program reads a text file and converts the alphabetic characters to lower case depending on the option specified.  Specify two command line parameters: the text file name and the conversion switch described below.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.  The following switches are recognized:
-ALL Convert all upper case letters to lower case
-SENTENCE Convert all upper case letters to lower case except the first one after a period.
-WORD Convert all upper case letters to lower case except the one immediately following a blank.
-WORDLOW Convert all upper case letters to lower case except the one immediately following a blank or a lower case letter
-NONUPPER Convert all upper case letters to lower case except the one immediately following a non-upper-case letter unless the word begins with 'MC'.
-NONUPNUM Convert all upper case letters to lower case except the one immediately following a non-upper-case letter and a non-number.
-ADDRESS Convert all upper case letters to lower case except the one immediately following a non-upper-case letter unless the next two characters are "ST", "ND", "RD", or "TH".
MEMALLOC – Display Memory Allocation
This program displays the current memory allocation strategy.  There are no command line parameters.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
MEMSTAR – Display RT-LINK Memory Usage
This program performs calculations relating to the memory usage on the RT-LINK map file.  There are no command line parameters.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
RegMan – Registry Maintenance
This program reads, creates, or sets keys in the system Registry.  It is especially useful in command prompt batch files.  The program operates only in WIN32 command prompt mode and requires TISLIBP.DLL.  The command line parameters are as follows:
-ReadMachine Path Key Name Read a key value from HKEY_LOCAL_MACHINE into an Environment Variable
-ReadUser Path Key Name Read a key value from HKEY_CURRENT_USER into an Environment Variable
-CreateMachine Path Key Create an empty key in HKEY_LOCAL_MACHINE
-CreateUser Path Key Create an empty key in HKEY_CURRENT_USER
-SetMachine Path Key Value Set a key value in HKEY_LOCAL_MACHINE
-SetUser Path Key Value Set a key value in HKEY_CURRENT_USER
REPCON – Continue Interrupted Printing
This program reads a large report text file, searches for the desired text, and writes the remainder to another file.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
SDIS – Standard Display
This program reads a text file and displays it on the screen one page at a time.  Specify the file path as the first command line parameter followed by the optional switches.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.  When the program starts, the first 24 lines of the text file will be displayed with each line trimmed to 80 characters.  The display may then be "moved" throughout the text file by depressing various keyboard keys.  There are three switches.  Specifying the switch NT (No Trim) will cause lines longer than 80 characters to be wrapped onto subsequent lines when the text file is displayed.  Specifying the switch NS (No Stop) will cause the display to scroll continuously in a manner similar to the DOS "TYPE" command; however, the display may be stopped at any point by depressing any keyboard key.  Specifying the switch FI (Final page) will cause the display to start at the end of the text file instead of the beginning.  Once the program has started execution, the following instruction line will be displayed on the bottom line of the display:
F1:QUIT F2:EXIT F3:LIST F4:FINL F5:STRT F6:BCK F7:PRVH F8:HLF F9:NXT 1-9:v ALT:^
These instructions help the user to remember the keyboard keys that cause the display to "move" throughout the text file.  They are described as follows:
F1:QUIT
Depress the F1 or the "Q" key at any time to "quit" the textual display and exit to the DOS command prompt.  The ESC (escape) key may also be used for this.
F2:EXIT
Depress the F2 or the "E" key to scroll the remainder of the text in the file continuously and then "exit" to the DOS command prompt.  This is the same functionality as when the NS (No Stop) switch is specified on the command line.  If any keyboard key is depressed during the continuous scroll of the text, the scrolling will be interrupted, and other keys may be used to "move" the display again.  This key is the same as depressing F3:LIST followed by F1:QUIT.
F3:LIST
Depress the F3 or the "L" key to "list" the remainder of the text in the file continuously and stop at the end of the file.  If any keyboard key is depressed during the continuous scroll of the text, the scrolling will be interrupted, and other keys may be used to "move" the display again.
F4:FINL
Depress the F4 or the "F" key to display the "final" page of the text in the file and stop at that point.  The "End" key may also be used for this.  This is the same as depressing F3:LIST except that the display does not show any of the text while the program moves to the end of the file.
F5:STRT
Depress the F5 or the "S" key to start the display over from the beginning of the file.  The "Home" key may also be used for this.
F6:BCK
Depress the F6 or the "B" key to "back up" the display to the previous page.  The "Page Up" key may also be used for this.
F7:PRVH
Depress the F7 or the "P" key to scroll the display backward to the "previous" half page.
F8:HLF
Depress the F8 or the "H" key to scroll the display forward one "half" page.
F9:NXT
Depress the F9 or the "N" key to scroll the display forward to the "next" page.  The "Page Down" and "Enter" keys may also be used for this.
1-9:v
Depress a number key, 1 through 9, to scroll the display forward by that number of lines.  The "Down Arrow" key may also be used to scroll the display forward by one line.
ALT:^
While holding down the ALT key, depress a number key, 1 through 9, to scroll the display backward by that number of lines.  The "Up Arrow" key may also be used to scroll the display backward by one line.
STATION – Display Workstation Name
This program displays the name of the current workstation.  It uses the same subroutines as are used by the application software to generate unique temporary file names.  First, the STATION environment variable is checked.  If it does not exist, a Novell client API call is used.  If that fails, a DOS-compatible network API call is used.  If that also fails, the station name is set to spaces.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
TEAR – Split Binary Files into Pieces
This program spits a file apart into pieces of a specified size.  The primary purpose of this is to send a file using email that exceeds the maximum size of an attachment.  It can also be used to put pieces of a large file on several diskettes.  Specify the name of the file to be split apart as a command line parameter.  The program will ask for the maximum file size and create a sufficient number of files of that size.  These file may be submitted to the GLUE program, which will put them back together.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
UPCS – Convert to Upper Case
This program reads a text file and converts all the alphabetic characters to upper case.  Specify the path name of the file to be converted as a command line parameters.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
USENET – Ask User a Question
This program asks the user, "Should the Network be Started?"  The user must respond with a Y for "yes" or an N for "no".  The UN environment variable must be set to X prior to invoking the program, and this program changes the environment variable UN to either a Y or an N.  In this way, the AUTOEXEC.BAT batch file can query the user as to whether or not to skip the network startup command lines.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
XCHAR – Display Depressed Keyboard Key
This program displays the depressed keyboard key and its decimal value equivalent.  It is used for diagnosing keyboard problems.  This program operates in either WIN32 command prompt mode or in DOS real mode, neither of which require TISLIBP.DLL.
XPRT – Translate and Print File
This program reads, translates, and prints a file.  Its primary purpose is to paginate a lengthy text file, usually a compiler or assembler source file, for printing on a laser printer.  The print image is generated by putting the five-digit line number on the left side of the page and listing the line of text next to it.  A heading is generated at the top of each page, and 58 lines of the text file are listed before another "form feed" character is generated.  If there are non-printable characters in the file, they will be translated into a two-digit hexadecimal equivalent following the tilde (~) character.  The path name of the file to be listed must be specified as the first command line parameter, and the LPT port of the printer must be the second.  There are several switches that may optionally appear on the command line.  If the NT (No Trim) switch is specified, lines of text longer than 73 characters will be wrapped onto the next line.  If the WI (Wide) switch is specified, lines of text will be truncated or wrapped at 125 characters for a 132-column printer or a laser printer in landscape mode.  If the NE (No Eject) switch is specified, there will be no "form feed" character at the beginning of the first page, which will prevent the laser printer from ejecting a blank page.  If the EJ (Final Eject) switch is specified, a "form feed" character will be placed at the end of the print image so the final page will be ejected from the laser printer.


[ Standard Library | Conversion Functions | Utility Functions | COBOL Functions ]
[ Windows NT Library | COBOL Library | COBOL Interface | Command Prompt Abbreviations | Purchase Instructions ]

[ Home | Areas of Expertise | "We Do Windows" | Clients and Projects | Software Samples | Package Software Available ]
[ Contact Information | Business Software Philosophy | Church Software Philosophy ]
All contents of this web site are Copyright © Titus Information Systems, Inc., Phoenix, Arizona, U.S.A.