- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to set file attributes?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2007 11:21 PM
06-12-2007 11:21 PM
How to set file attributes?
$ dir/full dis119.d1 gives
Directory DKA0:[QAGROUP.INPUT.R50.DIS]
dis119.d1;1 File ID: (22384,2,0)
Size: 72/80 Owner: [1,1]
Created: 2-JUN-1992 13:54:52.00
Revised: 2-JUN-1992 13:54:52.00 (0)
Expires:
Backup:
Effective:
Recording:
Accessed:
Attributes:
Modified:
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 80, Extend: 0, Global buffer count: 0
No version limit
Record format: Stream_LF, maximum 0 bytes, longest 0 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RWED, World:
Access Cntrl List: None
Client attributes: None
Total of 1 file, 72/80 blocks.
$ dir/full dis119.d3 gives this
Directory DKA0:[QAGROUP.INPUT.R50.DIS]
dis119.d3;1 File ID: (22386,2,0)
Size: 189/192 Owner: [1,1]
Created: 2-JUN-1992 15:22:36.00
Revised: 2-JUN-1992 15:22:36.00 (0)
Expires:
Backup:
Effective:
Recording:
Accessed:
Attributes:
Modified:
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 192, Extend: 0, Global buffer count: 0
No version limit
Record format: Variable length, maximum 0 bytes, longest 554 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RWED, World:
Access Cntrl List: None
Client attributes: None
Total of 1 file, 189/192 blocks.
The file attributes for these two files are different. all these files are transfered from a windows machine.
How can make the file attributes of DIS119.D3 similar to DIS119.D1?
$ set file/attribute=() dis119.d3 -- i dont know what are the parameters that should go inside the brackets?
Appreciate if anyone could comment on this!!
/Manesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2007 11:34 PM
06-12-2007 11:34 PM
Re: How to set file attributes?
SET FILE/ATTR=(RFM:STMLF) should do it.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2007 11:57 PM
06-12-2007 11:57 PM
Re: How to set file attributes?
To verify DUMP/BLOCK=COUNT=1 the d3 file.
If the first 16-bit word is less than 554, or to put it differently if the second 8-bit byte is 0 or 1 then it is likely a real Variable length file, and it must be converted, not altered.
Ditto dump the d1 file and you should NOT see bytes with 00 nor 01 yet several with 0A (linefeed)
To convert on 8.3 use:
$CONVERT/FDL="RECORD; FORMAT STREAM_LF" old.d3 new.d3
On pre-8.3 use
$CONVERT/FDL=SYS$INPUT: old.d3 new.d3
RECORD; FORMAT STREAM_LF
$
If you keep having problems then re-reply with the output for those two blocks dumped as text attacment.
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007 07:18 PM
06-13-2007 07:18 PM
Re: How to set file attributes?
I'm using OpenVMS v8.2-1 ia64. i tried the command u mentioned. But i have some doubt on this.
what is the OLD.d1 & NEW.d1 means? i'm confused between these two. do i have to convert from dis119.d1 to dis119.d3
OR
from dis119.d3 to a new file dis119_1.d3?
this is wat is did.
$ convert /fdl=sys$input: dis119.d1 dis119.d3 RECORD; FORMAT STREAM_LF (this didn't worked. i had to remove RECORD; FORMAT STREAM_LF)
This one worked..
$ convert /fdl=sys$input: dis119.d1 dis119.d3
Am i in the right direction??
Manesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007 07:19 PM
06-13-2007 07:19 PM
Re: How to set file attributes?
Manesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007 09:47 PM
06-13-2007 09:47 PM
Re: How to set file attributes?
a) Hein is trying to get you to convert your current format of the file dis119.d3 to a new version of the file. He used "old" and "new" as shorthand.
b) On your convert, the "/FDL=SYS$INPUT:" indicates that the FDL will be read from the input device (either your terminal or a command procedure).
so you want
$convert /fdl=sys$input: dis119.d3 dis119_1.d3
on ONE line, followed by
RECORD; FORMAT STREAM_LF
on the NEXT line of input
This will convert your existing dis119.d3 to a new file dis119_1.d3 which should now be in the correct format.
Be aware that your
$ convert /fdl=sys$input: dis119.d1 dis119.d3
will have replaced your original dis119.d3 file already! You need to get back to the original version before doing the convert to dis119_1.d3
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007 11:47 PM
06-13-2007 11:47 PM
Re: How to set file attributes?
Thanks! You are a patient and thorough man. :-).
Manesh,
Carefully read Duncan's clarifications on my post. He is correct.
The alternative, which is admittely more common is to create a file, for example 'stream_lf.fdl' to help the convert:
$create stream_lf.fdl
record
format stream_lf
$convert/fdl=stream_lf old new/stat
I studied the data and you do need that convert. The d1 file is however, against my expectations, binary and not really a stream_lf file, just labelled as such. To there are low values, just haphazardly.
The d3 file starts with 0x58 as a first record length. Next 0x7, 0x7, you can verify this with DUMP/REC=COUNT=5
Those 7 bytes record come from interpreting the raw binary data:
00000000 0000800A 00000000 0000800A
See that 0A ? That is treated as a line-feed aka line terminator, creating effectiv ely a 7 byte record where the application probably really is using a raw 8 byte structure of sorts.
Anyway, try the convert and be be happy!
The D3 file may have been create by (erroneously!) editting a d1 file, or erroneously transferring in record mode. This type of files must be transferred (FTP) in BIN / RAW mode, not in ASCII/TEXT mode.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 11:50 AM
06-14-2007 11:50 AM
Re: How to set file attributes?
From the overkill department, but something I always wanted to code up, and I had some time on a plane ride to fill.
Possibly comes in handy on other occasions...
Here are two perl scripts to evaluate (narrow) OpenVMS DUMP/BLOCK output.
The first one reconstructs the data as if it was a variable length record file. The second as stream_lf file. In the output examples you'll see that the d3 file is a variable length record file version of the d1 file data.
- easy enough to fix to wide
- easy enough to look for first reasonable record start.
- easy enough to pick differnt terminator
no reason/incentive to do any of those :-)
Cheers,
Hein.
----- variable_length_dump_to_text.pl -----
use strict;
#use warnings;
# Sample data
# 0000001A 0000FFFD 00080040 000E0001 ....@...ÿ....... 000000
# 00000260 00000001 00000001 00000014 ............`... 000010
my ($n,$l,$length,$j,@x);
my $i = 0;
while (<>) {
s/\s//g;
next unless /^[0-9A-Z]{32}/;
for $j (1..16) {
$x[$i++] = hex(substr($_,32-$j*2,2));
}
}
$j = 0;
while ($j < $i) {
$_ = "";
$length = $x[$j++] + 256*$x[$j++];
$l = $length;
while ($l--) {
$_ .= chr($x[$j++]);
}
s/\W/./g;
$j = 2*int(($j+1)/2);
printf ("%4d:%4d %s\n", $n++, $length, $_);
}
-------------- stream_lf_dump_to_text.pl ----
use strict;
#use warnings;
# Sample data
# 00000011 CA81DDA4 00000000 00000000 ........?Y.Ã .... 000030
# 00000000 00008009 00004843 554F8004 ..OUCH.......... 000040
# 00000000 0000800A 00000000 0000800A ................ 000050
my ($j, $n, $length);
my $i = 0;
my $line = "";
while (<>) {
s/\s//g;
next unless /^[0-9A-Z]{32}/;
for $j (1..16) {
my $char = chr(hex(substr($_,32-$j*2,2)));
if ($char eq "\n") {
printf ("%4d:%4d %s\n", $n++, $length, $line);
$line = "";
$length = 0;
} else {
$char = "." if ($char =~ /\W/);
$line .= $char;
$length++;
}
}
}
printf (" end:%4d %s\n", $length, $line);
--------------------------------
C:\Temp>perl variable_length_dump_to_text.pl dump2.txt
0: 88 ................................4Q...T...P...........................Q..................
1: 7 .......
2: 7 .......
3: 7 .......
4: 7 .......
5: 7 .......
6: 7 .......
7: 15 .............A.
8: 79 ............P....Debbie....RP....fanny...jayme...kitty...Maya......HP....Sheila
9: 7 .......
C:\Temp>perl stream_lf_dump_to_text.pl dump.txt
0: 80 ..................................................................OUCH..........
1: 7 .......
2: 7 .......
3: 7 .......
4: 7 .......
5: 7 .......
6: 7 .......
7: 7 .......
8: 7 .......
9: 175 .........Name............TERMS...........MODELS....................0...............H.......R...............l.......v.....S
OURCE..DATA....NOTES.................................
10: 7 .......