Operating System - OpenVMS
1828483 Members
2790 Online
109978 Solutions
New Discussion

Re: Unable to Increase the size of DAT file

 
Kumar_Sanjay
Regular Advisor

Unable to Increase the size of DAT file

I created few files for the database.

$ MCR sysgen CREATE/SIZE=1000 $1$DGA5123:[APPDEV.RND]INDH.DAT
$ set file/backup $1$DGA51111:[APPDEV.RND]INDH.DAT

dir Directory $1$DGA5123:[APPDEV.RND]

INDH.DAT;1 1000/1020 21-AUG-2007 08:07:48.97

Now I want to Increse the size of this dat file and I tried with
$ Set file/exten=8000 $1$DGA5123:[APPDEV.RND]INDH.DAT

but after that if i do the dir...it is showing same as old.
Can please someone help.
15 REPLIES 15
Duncan Morris
Honored Contributor

Re: Unable to Increase the size of DAT file

Hi,

the SET FILE/EXTEN command is used to set the extend quantity default for the file.

You should use SYSGEN CREATE to extend your file.

DEVT02> MCR sysgen CREATE/SIZE=1000 x.y
%SYSGEN-I-CREATED, DISK$USERS:[MORRISD]X.Y;1 created
DEVT02> dir/siz=all x.y

Directory DISK$USERS:[MORRISD]

X.Y;1 1000/1035

Total of 1 file, 1000/1035 blocks.
DEVT02> MCR sysgen CREATE/SIZE=8000 x.y
%SYSGEN-I-EXTENDED, DISK$USERS:[MORRISD]X.Y;1 extended
DEVT02> dir/siz=all x.y

Directory DISK$USERS:[MORRISD]

X.Y;1 8000/8004

Total of 1 file, 8000/8004 blocks.
DEVT02>

Regards,

Duncan
Jan van den Ende
Honored Contributor

Re: Unable to Increase the size of DAT file

Hi,

For (nearly) all file activity, the VMS filesystem (RMS) will automagically extend the file when needed (exceptions, as eg relative files) need o.a. special FDSs when creating the file).
The amount witt which such extension happens, can be influenced with SET FILE /EXTEND=..
A file. like that created with your command, will need NO special actions to extend, other than writing to it when it has no more capacity.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jan van den Ende
Honored Contributor

Re: Unable to Increase the size of DAT file

and, if you want to see the effect of SET FILE/EXTEND, do a DIR/FULL INDH.DAT.

Look for the text Exted Quantity.

Do a SET FILE/EXTEND- with some other value, repeat the DIR, and notice the differenc.

btw,
what is your intent with SET FILE/BACKUP ?

Any created file automatically has that attribute set, unless (by FDL) it has been explicitly switched off, or after creation a SET FILE /NOBACKUP has been issued.
It controls how the BACKUP command deal with the content of the file.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Robert Gezelter
Honored Contributor

Re: Unable to Increase the size of DAT file

CA1467620,

As has been previously noted, the file can be extended.

The post implies that the file was believed to be marked NOBACKUP. Why? As Jan has noted, BACKUP is the default.

- Bob Gezelter, http://www.rlgsc.com
Jon Pinkley
Honored Contributor

Re: Unable to Increase the size of DAT file

Bob,

The reason it is marked /nobackup (and most likely /nomove) is because it was created with SYSGEN, which normally is used to create PAGE and SWAP files.
it depends
Jan van den Ende
Honored Contributor

Re: Unable to Increase the size of DAT file

Jon,

You are right. I stand corrected. I just read CREATE, and overlooked SYSGEN.
That also means my ramblings about FDL are out of place.
But then again, it never occurred to me to create data files with SYSGEN.
Only goes to show one is never too old to learn new means to use utilities...
I leave it open to discussion wether is _IS_ a specific use, or an abuse. I would be curious about legitimate uses of SYSGEN CREATE apart from the obvious system files.

Hein???

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Kumar_Sanjay
Regular Advisor

Re: Unable to Increase the size of DAT file

This is the application requirement that you must create the file using SYSGEN for Database.
Also the second command â set file/backupâ is also requirement of application.

Jan van den Ende
Honored Contributor

Re: Unable to Increase the size of DAT file

CA1467620,

Now you got me interested. What is the database management system?

And like Jon explained, SET FILE/BACKUP _IS_ quite the thing to do after SYSGEN CREATE.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Robert Gezelter
Honored Contributor

Re: Unable to Increase the size of DAT file

Jon,

I beg to differ. At least on 7.3-2, a simple experiment using SYSGEN CREATE does not set the NOBACKUP flag (log attached; same behavior seen on 6.2).

I to expected SYSGEN create to set the NOBACKUP bit. I do not have time at this instant to track down who actually sets the bit in the case of the page file. An earlier version of the attached test seems to indicate (but I have not verified) that the bit is propagated when later versions are created).

- Bob Gezelter, http://www.rlgsc.com
Hein van den Heuvel
Honored Contributor

Re: Unable to Increase the size of DAT file

Bob, as soon as one specifies a size, sysgen creates a file with: "Backups disabled, MoveFile disabled,
Record format: Undefined, maximum 0 bytes, longest 0 bytes

CA1467620,

As Duncan shows, you can use SYSGEN create/SIZE= to extent an existing file to a new size.

SET FILE/EXTEND merely sets a file attribute which will be use should the file ever be extended by the a application.

There is no standard OpenVMS tool to force an extent, as supported task. Sysgen *will* change the file attributes.

All,
It is relatively rare to see an application rely on SYSGEN CREATE to provide or extent a datafile. Anything it sets up would be an undocumented side-effect and could change without warning (but is unlikely to change).
Sysgen does a simple extent and happens not to write to the existing blocks, but as far as I am concerned it would be allowed to.

The most simple way to create a file with a given size is COPY/ALLO= NL: x.x[/CONT]

If you care about certain (record) attributes then I would suggest:
$CREATE/FDL="FILE; ALLO ; RECORD; FORMAT UNDEF" x.x

Still , if you happen to need a no-move, no-backup, undefined record file, then using mcr sysgen for empty DB management is cute!
If it should be marked backup, then 2-out-of-3 is not a bad score when there is no standard alternative.

CA1467620,
What is the application?
Typically an application should ask RMS, or use a QIO to extent its file without explicit (operator) intervention. Not doing so is cumbersone and errorprone.

fwiw,
Hein.
Kris Clippeleyr
Honored Contributor

Re: Unable to Increase the size of DAT file

Re: Bob

I too beg to differ.
With MCR SYSGEN CREATE a (new) file is set NOBACKUP. See attachment.

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Robert Gezelter
Honored Contributor

Re: Unable to Increase the size of DAT file

Kris,

As Hein has noted, apparently the behavior is more complex than it would at first appear.

I note that the HELP text does not document the setting of the NOBACKUP flag. I would comment that since the behavior is undocumented, I would recommend caution on relying on these settings going forward.

It looks particularly "strange" that the attributes change when a size is specified.

If I was defining a procedure that relied on these settings, I would set them manually, rather than rely on the collection of defaults produced by SYSGEN. The use of an FDL in such situations is a highly suggested practice.

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: Unable to Increase the size of DAT file

I agree with Hein. I'd be pushing back on the software supplier to stop relying on SYSGEN to create their files. The correct way to create a file with specific attributes (including size and extend quantity) is with CREATE/FDL.

The discussion and apparent confusion here over the exact characteristics of a SYSGEN CREATEd file just illustrate why it's not a good idea to depend on undocumented behaviour. Consider:

Customer: Help! SYSGEN CREATE isn't doing precisely the same undocumented behaviour as it did in the last version.
HP Support/Engineering: Tough luck! Use a documented and supported mechanism

vs:

Customer: Help! CREATE/FDL isn't behaving as documented.
HP Support/Engineering: Yikes! Hold everything while we urgently investigate and fix this critical component of OpenVMS
A crucible of informative mistakes
Kumar_Sanjay
Regular Advisor

Re: Unable to Increase the size of DAT file

Thanks everyone for great help.

Kumar_Sanjay
Regular Advisor

Re: Unable to Increase the size of DAT file

Thanks