Operating System - OpenVMS
1748028 Members
5236 Online
108757 Solutions
New Discussion

I have file whose file attribute Global buffer count set as 3217014719.

 
allin-in-one
Frequent Advisor

I have file whose file attribute Global buffer count set as 3217014719.

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
Linkcount:  1
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

8 REPLIES 8
Hein van den Heuvel
Honored Contributor

Re: I have file whose file attribute Global buffer count set as 3217014719.

>> 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,

Hein

 

perl -e "printf qq(%x %b\n),3217014719,3217014719"
bfbfbfbf 10111111101111111011111110111111

 

 

 

abrsvc
Respected Contributor

Re: I have file whose file attribute Global buffer count set as 3217014719.

Somehow I don't believe that the buffercount is actually that value. Note that the 3217014719 is HEX BFBFBFBF. This looks to me more like an overwritten or corrupted data area rather than a true buffercount value.

Dan
allin-in-one
Frequent Advisor

Re: I have file whose file attribute Global buffer count set as 3217014719.

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. 

Volker Halle
Honored Contributor

Re: I have file whose file attribute Global buffer count set as 3217014719.

You may be able to reset/disable global buffers on this file with SET FILE/GLOBAL=0, if the file is still on disk.

 

Volker.

allin-in-one
Frequent Advisor

Re: I have file whose file attribute Global buffer count set as 3217014719.

What will be the implications of setting the Global buffer count as zero, even though it is non zero.

Volker Halle
Honored Contributor

Re: I have file whose file attribute Global buffer count set as 3217014719.

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.

 

Volker.

Hein van den Heuvel
Honored Contributor

Re: I have file whose file attribute Global buffer count set as 3217014719.

 

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:

See: http://h71000.www7.hp.com/doc/84final/ba554_90018/ch01s04.html

 

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.

Enjoy!

Hein

 

 

 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'[000000]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

 

 

 

 

 

allin-in-one
Frequent Advisor

Re: I have file whose file attribute Global buffer count set as 3217014719.

Once again thanks for all your help.