| Title: | -={ H A C K E R S }=- |
| Notice: | Write locked - see NOTED::HACKERS |
| Moderator: | DIEHRD::MORRIS |
| Created: | Thu Feb 20 1986 |
| Last Modified: | Mon Aug 03 1992 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 680 |
| Total number of notes: | 5456 |
Apparently there is a filename length restriction when you are using a task-specification string in task to task communication. I have run into this problem several times and would like to know if there is anyway to get around it. Let me illustrate: $ CREATE SHOW_ME.COM $ DEFINE SYS$OUTPUT SYS$NET $ TIME ^Z $ COPY/LOG SHOW_ME.COM NOBLE"":: %COPY-S-COPIED, $DISK2:[MARK.OFFICE.PLAY]SHOW_ME.COM;1 copied to NOBLE""::SYS$COMMON:[DECNET]SHOW_ME.COM;1 (1 block) $ TYPE NOBLE""::"0=SHOW_ME.COM" 6-JAN-1988 13:43:13 Now I would like to build a time stamp into the filename SHOW_ME.COM to ensure uniqueness - for example - SHOW_ME_88016_122140_39.COM. Trouble is, I can't use a filespec with a file name longer than 8 characters or a file type longer than 3 characters in between the quoted string. Furthermore, I can't use a device, directory, version number or logical name either. Any suggestions?
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 652.1 | 15 character limit(?) | CHOVAX::YOUNG | Back from the Shadows Again, | Thu Jan 07 1988 23:53 | 25 |
Yes there is a limit on "0=" task names. As I recal it is either
12 or 15 characters. Its in the guide to networking somewhere.
Still, thats not many characters, ".COM" is the default so you can
save 4 characters there. I would recomend something like:
"0=SHOW_ME_ymdhsss"
Where:
y = Decimal year number (ie. "1"-"9")
m = Hex representation of the month number (ie. "1"-"C")
d = Alphanumeric representation of the day number ("0"-"9","A"-"Z")
h = Alphanumeric repr. of the hour of the day ("0"-"9","A"-"Z")
sss = 3 character Hex repr. of the second in the hour.
Coding this should be a trip.
-- Barry
| |||||
| 652.2 | Reduced time stamp to 12 chars. | ARVOX::MARK | Mark Gillis, 273-3516, VRO3-3/B6 | Mon Jan 11 1988 16:36 | 57 |
Barry,
RE .1
Thanks for the info, it was very helpful and solved the problem. Here is
an extract of what I have done so far based on your ideas:
.
.
.
$ ! Makes unique time stamp that is easy to read and sorted in a directory
$ ! listing from oldest to newest.
$
$ time_stamp = F$EXTRACT( 2, 2, F$CVTIME(,,"YEAR") ) + -
F$CVTIME(,,"MONTH") + -
F$CVTIME(,,"DAY") + "_" + -
F$CVTIME(,,"HOUR") + -
F$CVTIME(,,"MINUTE") + -
F$CVTIME(,,"SECOND") + "_" + -
F$CVTIME(,,"HUNDREDTH")
.
.
.
$ !
$ ! Task names are limited to 12 characters and default to .COM filetype.
$ ! Reduce the time stamp from 16 to 12 characters by removing the 2
$ ! underscores and converting the 2-character month and hour fields to
$ ! 1-character letter fields.
$ !
$ time_stamp = time_stamp - "_" - "_" ! Remove underscores.
$ time_years = F$EXTRACT(0, 2, time_stamp) ! Extract year.
$ time_month = F$EXTRACT(2, 2, time_stamp) ! Extract month.
$ time_days = F$EXTRACT(4, 2, time_stamp) ! Extract days.
$ time_hours = F$EXTRACT(6, 2, time_stamp) ! Extract hours.
$ time_rest = F$EXTRACT(8, 6, time_stamp) ! Extract rest of it.
$ !
$ ! Convert number fields to letter fields using ASCII conversion.
$ !
$ month_alpha[0,8] = 64 + time_month ! 1 - 12 --> A - L.
$ hours_alpha[0,8] = 64 + time_hours ! 1 - 24 --> A - X.
$ !
$ ! Build new unique 12 character name.
$ !
$ task_name = time_years + month_alpha + time_days + -
hours_alpha + time_rest
$ !
$ ! Transfer the file to the remote node and execute the commands as
$ ! a network task.
$ !
$ COPY/LOG 'com_filename' 'node_name'""::'task_name'.COM
$ TYPE/OUTPUT='out_filename' 'node_name'""::"0=''task_name'"
$
.
.
.
Mark Gillis,
| |||||
| 652.3 | Logical names are O.K. | UTRTSC::VDBURG | Jur van der Burg - (van der BUG) | Mon Jan 18 1988 03:13 | 4 |
I've done some testing with a logical name, and it seems to work
ok. Make sure it will be defined when the remote network process
is created (for example in LOGIN.COM, or system wide). The logical
name can point to any long filename.
| |||||