07-09-2013 06:27 AM
I have file whose file attribute Global buffer count set as 3217014719. If want to create file using sys$qio with similar attribute getting error in IOSB as 20 (i.e. bad parameter value).
Please let me know how to create file with below properties.
GLSSRPT.FPC;3 File ID: (15317,1,0)
Size: 3686/3696 Owner: [SYSTEM]
Created: 3-JUN-2013 15:05:59.81
Revised: 3-JUN-2013 15:06:03.28 (1)
Expires: 13-JUN-2013 15:06:03.28
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: 9-JUL-2013 02:24:17.12
Attributes: 3-JUN-2013 15:06:03.28
Modified: 3-JUN-2013 15:06:03.28
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 3696, Extend: 0, Global buffer count: 3217014719, No version limit
Record format: Stream_LF, maximum 32767 bytes, longest 32767 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RWED, World:RE
Access Cntrl List: (AUDIT=SECURITY,ACCESS=DELETE+SUCCESS+FAILURE)
Client attributes: None
07-09-2013 07:01 AM - edited 07-09-2013 07:02 AM
>> I have file whose file attribute Global buffer count set as 3217014719.
ok, so you have a broken file or unsupported/overloaded usage of a file header field.
>> If want to create file using sys$qio with similar attribute getting error in IOSB as 20 (i.e. bad parameter value).
Why would anyone ever want to creaate a file with SYS$QIO(w) ? Please explain.
Anyway, the return could be correct. It really IS a bad parameter value.
More likely the whole QIO is bogus, Please provide program details if you want help with that.
>> Please let me know how to create file with below properties.
Please explain why you would want to, but I suspect you really don't want to.
Please explain the real problem you are trying to deal with ?!
You may want to provide platform and OpenVMS version details as the interpretation of the global buffer attribute has changed to allow for more then 32K values (the old 15 bit limit).
Hope this help some,
perl -e "printf qq(%x %b\n),3217014719,3217014719"
07-09-2013 07:01 AM
07-09-2013 07:27 AM
Thanks for the reply.
I have a backup application which already taken backup of this file with file attributes. While restoring file with same attributes (i.e.. Creating file with same attributes) I am facing this problem.
07-09-2013 07:52 AM
When opening a file with global buffers .ne. 0, RMS will try to create a global section to map blocks of that file into virtual memory. Can you currently correctly open that sequential file at all ? Would RMS try to create that many global buffers ? Global buffers are mostly a performance saver (should reduce disk-IOs if multiple processes access and read that same file).
If you want to, you could still use SET FILE/GLOBAL=100 to re-enable global buffering, if really necessary.
07-09-2013 08:01 AM
It's really debatable whether you want to restore a file with bogus attribues.
I'm mildly curious how the file came to be that way with getting a :
%SYSTEM-W-BADCHKSUM, bad file header checksum
Anyway... I suppose you could poke the FAT area in the header directly, if QIO does not allow it:
It can be done...
$ dir /full ram:hein.tmp : HEIN.TMP;1 File ID: (14,2,0) Size: 1/16 Owner: [HEIN] Created: 9-JUL-2013 10:54:46.87 Revised: 9-JUL-2013 10:54:52.03 (1) : File attributes: Allocation: 16, Extend: 0, Global buffer count: 3217014719, No version limit Record format: Variable length, maximum 0 bytes, longest 4 bytes
Of course I just cheated with a bit of DCL,
Since I don't think this is useful code, I hardcoded the 'odd value'
See below for the code used to alter a normal file to the one above.
MAKE_BAD_GBC.COM $loop: $if p1.eqs."" then inquire p1 "file name" $file = f$search(p1) $if file.eqs."" then exit 98962 $dev = f$getdvi(f$parse(p1,,,"device"),"DEVNAM") ! Do not conceal $id = f$elem(0,",",f$file(file,"fid")) - "(" $indexf_bitmap_vbn = (f$getdvi(dev,"cluster") * 4) + 1 $ibmapsize = (f$getdvi(dev,"maxfiles") + 4095) / 4096 $header_vbn = indexf_bitmap_vbn + ibmapsize + id -1 $vbn = "1234" $vbn[0,32]='header_vbn $open/read/write/share=write indexf 'dev'indexf.sys $read/key=&vbn indexf header ! Fails if vbn looks like quote :-( $!show symb header $x1 = f$cvui(510*8,16,header) ! Checksum $x2 = f$cvui(044*8,16,header) ! FAT$L_GBC32 $x3 = f$cvui(046*8,16,header) $x4 = x1 - x2 - x3 + %xBFBF+ %xBFBF $show symb x* $header[510*8,16] = x4 $header[044*8,16] = %xBFBF $header[046*8,16] = %xBFBF $write /update/symbol indexf header $close indexf ! All done with that