CDATE A new command has been developed to calculate a date in the past or a date in the future by a selected number of days, weeks, months or years. The command is CDATE and it can be used when you are outside of a program at your DCL prompt. To have this command available you must put the following line in your LOGIN.COM file and relogin. $ set command date_cmd/replace The command is as follows: CDATE Calculates a date prior to or after the specified start date. Format: CDATE [/qualifiers] Period Date The default qualifiers are ADD and WEEKS and need not be included. This will determine an date in the future by the number of weeks specified with the Period value. Parameters Period Specifies the quantity of (Days, Weeks, Months or Years). Date Specifies the date to calculate from. The value must be an absolute time or a combination time. DCL converts truncated time values, combination time values, and keywords for time values (such as TODAY, TOMORROW OR YESTERDAY) to absolute time format. DCL fills blank fields from the current system date. Command_qualifiers /FUNCTION /FUNCTION=parameters parameters ADD (DEFAULT) Calculate date new in the future. SUBTRACT Calculate date new in the past. /TYPE /TYPE=parameters The type of period specified. parameters Days Weeks Months Years Examples: CDATE 26 TODAY CDATE 26 25-MAR-1993 CDATE 26 25-MAR CDATE/FUNCTION=ADD/TYPE=WEEKS 26 25-MAR-1993 These commands will calculate the date that is 26 weeks in the future of todays date. CDATE/FUNCTION=SUBTRACT/TYPE=DAYS 26 25-MAR-1993 This command will calculate a date that is 26 days in the Past. NOTE: There is 10,000 day limit on the dates that can be calculated. CDATE.BAS;31 CDATE function source code CDATE.EXE;7 CDATE function executable file CDATE.HLB;1 CDATE function help library DATE_CMD.CLD;13 CDATE function command defined DATE_HELP.HLP;3 CDATE function help text ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** GRAPHIC These com file are a rewrite of the GRAPHIC.COM to remove the nonprintable characters and to make characters for VT200, VT300 and VT400 series terminals. Replace the - with * in the template files to design your characters. GRAPHVT2.COM;2 Develope VT200 series terminal characters GRAPHVT3.COM;6 Develope VT300 series terminal characters GRAPHVT4.COM;7 Develope VT400 series terminal characters VT220.TMP;1 Template for VT200 series terminal characters VT320.TMP;1 Template for VT300 series terminal characters VT420.TMP;1 Template for VT400 series terminal characters ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** DISP_WORDS This is just a quote or sayings displayer. To add a saying, add it to sayings.lis on one line. You can split a long sayings by inserting the character | in the saying at the point you want it to split. DISP_WORDS.BAS;3 Source code DISP_WORDS.EXE;2 Displays sayings SAYINGS.CNT;1 Keeps track of the last saying SAYINGS.LIS;33 List of sayings ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** CALC_DATE This subroutine is used by several date related functions and commands. It has been compiled and put into a library called sub_library.olb. To use this library module use the following command when you link your object files. $ LINK file, SUB_LIBRARY/LIBRARY This SUB program will calculate the new date from an old date by the amount indicated in the FUNCTN$ string. variables passed: DATE_IN$ - the starting date syntax - DD-MMM-YYYY D - day M - month Y - year DATE_OUT$ - the date after the given function is performed syntax - DD-MMM-YYYY D - day M - month Y - year FUNCTN$ - the function indicates + or -/how much/day,week,month or year syntax - snnnnp s - sign, + for add or - for subtract n - number, must be less that 10000 p - d = day, w = week, m = month, y = year DATE_ERROR - error in input syntax syntax - n 0 - no error 1 - date syntax error 2 - function syntax error Examples: CALL LIB$DATE_TIME(NOW$) ! get todays date in DD-MMM-YYYY HH:MM:SS:00.00 NOW$ = LEFT$(NOW$,11) ! only need the first 11 characters PER$ = "-26D" ! subtract 26 days CALL CALC_DATE(NOW$,PER$,PAST_DATE$,DATE_ERR) IF DATE_ERR = 0 THEN PRINT PAST_DATE$;" is 26 Days prior to ";NOW$ END IF ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** CONV_BINARY This subroutine can be used to perform basic binary math functions. It has been compiled and put into a library called sub_library.olb. To use this library module use the following command when you link your object files. $ LINK file, SUB_LIBRARY/LIBRARY This SUB program will convert a binary string as per a function value and code. The new value and a status code will be outputted. IN_VALUE$ - binary input string of 1s and 0s of up to 32 characters in length OUT_VALUE$ - binary output string FUNC_VALUE$ - decimal or binary input string as required per the function code FUNC_CODE$ - function code input string (see below) STAT_CODE% - integer value of conversion status code (TRUE and FALSE is defined in DEF_VARIABLES.BAS as -1 and 0) FUNCTION CODES: AND - ANDs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11011" out_value$ = "10001" stat_code = TRUE NAND - NANDs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11011" out_value$ = "01110" stat_code = TRUE OR - ORs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11011" out_value$ = "11111" stat_code = TRUE NOR - NORs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11011" out_value$ = "00000" stat_code = TRUE XOR - XORs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11001" out_value$ = "10011" stat_code = TRUE XNOR - XNORs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11001" out_value$ = "01100" stat_code = TRUE ADD - ADDs in_value with func_value output to out_value$ stat_code TRUE if conversion ok in_value = "10101" func_value = "11001" out_value$ = "101110" stat_code = TRUE SUB - SUBs func_value from in_value output to out_value$ stat_code TRUE if conversion ok in_value = "11101" func_value = "10001" out_value$ = "01100" stat_code = TRUE INV - INVERTs in_value all bits per length output to out_value$ stat_code TRUE if conversion ok in_value = "11101" out_value$ = "00010" stat_code = TRUE ROL - ROLLs LEFT in_value all bits per length output to out_value$ stat_code TRUE if conversion ok in_value = "11101" out_value$ = "11011" stat_code = TRUE ROR - ROLLs RIGHT in_value all bits per length output to out_value$ stat_code TRUE if conversion ok in_value = "11101" out_value$ = "11110" stat_code = TRUE SHFTL - SHIFTs LEFT in_value all bits 0 for left bit output to out_value$ stat_code TRUE if conversion ok in_value = "11101" out_value$ = "11010" stat_code = TRUE SHFTR - SHIFTs RIGHT in_value all bits 0 for right bit output to out_value$ stat_code TRUE if conversion ok in_value = "11101" out_value$ = "01110" stat_code = TRUE BSET - SETs BIT in in_value per func_value output to out_value$ stat_code TRUE if conversion ok in_value = "11101" func_value = "2" out_value$ = "11111" stat_code = TRUE BCLR - CLEARs BIT in in_value per func_value output to out_value$ stat_code TRUE if conversion ok in_value = "11101" func_value = "4" out_value$ = "10101" stat_code = TRUE BTST - TESTs BIT in in_value per func_value stat_code TRUE if 1 FALSE if 0 in_value = "11101" func_value = "4" stat_code = TRUE BRET - RETURNs BIT from in_value per func_value output to out_value$ stat_code TRUE if conversion ok in_value = "11101" func_value = "4" out_value$ = "1" stat_code = TRUE ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** CONV_NUMBERS This SUB program will convert a hex, dec, bin or oct number and provide the dec in integer format and hex, bin and oct in text format. The stat_flag% determines which inputed value is converted and returns the conversion status code. stat_flag% INPUT 1 - Convert Decimal Input 2 - Convert Binary Input 3 - Convert Hex Input 4 - Convert Octal Input Example: dec_value% = 22 stat_flag% = 1 CALL conv_numbers(dec_value%,bin_value$,hex_value$,oct_value$,stat_flag%) dec_value% = 22 bin_value$ = "00010110" hex_value$ = "16" oct_value$ = "26" stat_flag% = TRUE ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** DESIGN The program DESIGN is a terminal lock and design generator for the VT320. If you define MY$PASSWORD prior to running DESIGN, and you choose to use a password, the value of MY$PASSWORD will be used for your locking password. DESIGN.BAS;48 DESIGN.EXE;36 ******************************************************************************** //////////////////////////////////////////////////////////////////////////////// ******************************************************************************** All object and executable files were compliled and linked with Basic 3.5 under VMS 5.5. If you have any questions, or sugestions I can be reached at the below address or I can be reached Monday through Friday between 7AM to 3:30PM central standard time at telephone # (316) 676-6979. All files are provided 'AS IS', I and/or the company I work for assumes no responsibility for their content or function. Victor L. Blosser P.O. Box 85 Mail Stop 960-B40 Wichita, Ks 67201 ********************************************************************************