Operating System - OpenVMS
1820266 Members
2921 Online
109622 Solutions
New Discussion юеВ

Re: How to create a dummy file in OpenVMS ?

 
SOLVED
Go to solution
shashi kanth
Super Advisor

How to create a dummy file in OpenVMS ?

I am sorry for asking this simple question as i am very new to OpenVMS.

How to create a dummy file in OpenVMS?

With Unix/Linux, i can do this by using "touch" command ?

what will be in OpenVMS ?


Thanks.

-- shashi
13 REPLIES 13
Richard Whalen
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

$ open/write logical_name file_spec
$ close logical_name
Gregg Parmentier
Frequent Advisor

Re: How to create a dummy file in OpenVMS ?


Follwing up on Richard's post, logical_name can be anything you want, the word you use here is irrelevant to the file you create. file_spec is the file name you want to create.
Volker Halle
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

or

$ CREATE filename
CTRL-Z (if used interactively)
$ ! next DCL command (if used in DCL procedure)

Volker.
Jim_McKinney
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

$ dir/siz t.t
%DIRECT-W-NOFILES, no files found
$ copy/log nl: t.t
%COPY-S-COPIED, NL: copied to DISK$DSM01:[MCKINNEY]T.T;1 (0 records)
$ dir/siz t.t

Directory DISK$DSM01:[MCKINNEY]

T.T;1 0

Total of 1 file, 0 blocks.
$
Gregg Parmentier
Frequent Advisor
Solution

Re: How to create a dummy file in OpenVMS ?


Oh, one more followup, if you don't specifiy a file extension in your file_spec, VMS will make it file_spec.DAT
shashi kanth
Super Advisor

Re: How to create a dummy file in OpenVMS ?

Gregg and Richard.

So, here, if i didn't mention any extension, it is creating a file with .dat extension. I don't want that. My intention is, i am doing oracle database installation on OpenVMS, the documentation asked me to create a dummy "oratab" file.
Volker Halle
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

$ create oratab


Volker.
Hein van den Heuvel
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

I actually dislike the (VFC) files created by simple DCL, but it has the advantage of not starting an image, and thus is the quickest thing you can do.

Personnaly I use $COPY NL: dummy.txt

And on an OpenVMS 8.3 system I might use

$CREATE/FDL="blah blah" dummy.txt

That way you can control teh exact attributes of the dummy file to meet your needs.

Replace the 'blah blah' with an FDL specification like "RECORD; FORMAT FIXED; SIZE 80"

A more useful example might be:

$ cre/fdl="date; expiration 1-jan-2008" dummy.txt
$ dir/full dummy.txt
:
Created: 5-OCT-2007 10:37:29.88
Expires: 1-JAN-2008 10:37:29.88


But what problem are you really trying to solve? How come you think you need a dummy file? They are really rarely needed!

Regards,
Hein.

Steven Schweda
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

Define "dummy". Empty?


> $ CREATE filename
> CTRL-Z (if used interactively)
> $ ! next DCL command (if used in DCL procedure)

> $ copy/log nl: t.t

Or, if you wanted a file which had attributes
other than "Record format: Variable length",
then something more elaborate may be needed.
For example:

CREATE /FDL = STREAM_LF.FDL filename
[...]

where:

ALP $ TYPE STREAM_LF.FDL
RECORD
Carriage_Control carriage_return
Format stream_lf
ALP $

Whether this is worth the extra effort
depends on what you intend to do with this
file after you've created it. (If you're
planning to ship it off to a UNIX system
somewhere, then it might easily be.)
Hein van den Heuvel
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

Ah! Many replies slipped in while I was refreshing my coffee and before hitting submit. Sorry for the duplication. I now see you already explained why.

(There are clearly no performance thoughts for this once-per-year-hopefully event. :-)

The easiest thing still is:

$COPY NL: ORATAB./LOG

Be sure to check the Relevant Oracle Doc though. For 10g:

http://download.oracle.com/docs/html/B13681_01/pre_inst.htm#CIHIHABC


Cheers,
Hein.
Jon Pinkley
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

Not exactly like unix touch, but it does modify the "revision date" and create a file if it does not exist.

In you login.com

$ touch :== append/new nla0:

usage:

$ touch file
it depends
Dean McGorrill
Valued Contributor

Re: How to create a dummy file in OpenVMS ?

jon there was a touch program. allowed one you change a files creation date. anyhow
create xxx.yyy and ^Z is what I use for
making null files.
Hoff
Honored Contributor

Re: How to create a dummy file in OpenVMS ?

So-called dummy files are usually used for a primitive form of run-time interlocking, and may or may not map into clustering and OpenVMS norms.

OpenVMS also uses locking, though typically either at the file level with file locking, or applications use locking with direct calls to the distributed lock manager.

So-called dummy files are seldom used in anything other than a quick port of a Unix tool.

FWIW, there are other and rather less flattering names for the concept known as the "dummy file", but -- in deference to our genteel readers -- I'll refrain from further elaboration.

As Hein asked: what are you up to?