Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

the copy.com don't run the next command

 
SOLVED
Go to solution
SCC_2
Frequent Advisor

the copy.com don't run the next command

Hello,
I wrote a simple backup.com file as following
$ backup dka200:[data]/modified/since = today dka100:[data]
$ purge dka100:[data]

$ @backup

after it process the first command that is it, and it don't process the next line.

What did I did wrong ?

run on vms5.5 on micro vax 3900.

p.s I have another backup.com file, backup 3 drive on disk, no problem.
Thanks!
SCC
16 REPLIES
Karl Rohwedder
Honored Contributor
Solution

Re: the copy.com don't run the next command

Did the 1st command produce any output? Perhaps an error (e.g. file is open) occurred and since you missed a SET NOON or ON ERROR THEN CONTINUE the DCL procedure would abort.

I would add a SET NOON at the beginning and try again.

regards Kalle
SCC_2
Frequent Advisor

Re: the copy.com don't run the next command

Thanks !
I add the set noon to start and good go now.
Scc
Antoniov.
Honored Contributor

Re: the copy.com don't run the next command

Hi,
set noon execute next line because ignore error condition. It's better you understand why there is this error to avoid partial copies.
I guess you forget /REPLACE qualifier. If a file in dka200:[data] was modified after previous backup, can't be copied again wiath /replace qualifier. Do you want really this?

Antonio Vigliotti
Antonio Maria Vigliotti
Jan van den Ende
Honored Contributor

Re: the copy.com don't run the next command

SCC,

Karl indicated the use of SET NOON or ON ERROR THEN CONTINUE.

It might be important to note the difference between those:

without those:
if an error occurs, EXIT the current command level
(this is what yuo have now: an error during the BACKUP command EXITs your .COM file)

SET NOON : if an error occurs, then do the next command
(in your case, the PURGE)

ON ERROR THEN CONTINUE
if an error occurs, then continue WITH THE RUNNING IMAGE. So, for some reason BACKUP fails to process one file, then the BACKUP command continues with processing the next file.

Example:

BACKUP has to process 1000 files, of which 10 can somehow not be done.

The files that can be done up to the first "error" are done in all cases.
Now
- no error handling: end-of-procedure, following commands in procedure are NOT executed.
- SET NOON: continu with next command in procedure, remaining files are NOT considered by BACKUP. Only ON error maximum.
- ON ERROR THEN CONTINUE: process next file. Ultimately, as many errors as "un-processable" files are reported (10 in our example)

hth

Proost.

Have one on me.

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

Re: the copy.com don't run the next command

SCC,

Regardless of which choice you make for processing an error condition, you should do two things:
- report the completion code ($STATUS) from the execution of BACKUP (personally, I prefer to convert it to hexadecimal, in which case you should prefix the number with a "0x" such as 0x0001, to avoid confusion); and
- check the error code. Some errors are relatively benign, others can be catastrophic, and some generally benign errors can be catastrophic in some cases (e.g., I have seen BACKUP errors of "File Locked" ignored for months, only to discover that no valid backups exist of the file).

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
SCC_2
Frequent Advisor

Re: the copy.com don't run the next command

Hello All,
I don't have any major error while I backup the files. When I do a test run, the only error was some of the files already there and can't not copy, since I run it more than onces. After I add the set noon it working fine.
Yes, last nite I was looking for some command and notice that I need to add the /replace to the above command. Looks to me the /replace will replace every files in dka100:[data] and it takes too long to doing that. If I only do it once per days is fine, But I am planning to do it every 4 hrs.
I might have to break up the files using their files name. Since I know examples
*.txt,*.;* and q*.* files is create today
And the *.trs files is update files. I will do more testing and go from there.
I also notice that, some files are mark as no backup, is there a way to backup them.
Thanks !
SCC
Jan van den Ende
Honored Contributor

Re: the copy.com don't run the next command

Scc,


I also notice that, some files are mark as no backup, is there a way to backup them.


There are two ways:

a. you can change the NObackup attribute:

$ SET FILE xxx /BACKUP

to channge it permanently (until change again, of course)

or b.

$ BACKUP xxx /IGNORE=NOBACKUP

to leave the file as is, but during the execute of this command, ignore the attribute.

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: the copy.com don't run the next command

btw,

files marked NObackup may SEEM to be backupped!

That is because the file HEADER info IS in your backup, so, upon restore, the FILE is recreated with correct headr info, but the CONTENTS are undefined, and DATA is not stored.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Doug Phillips
Trusted Contributor

Re: the copy.com don't run the next command

SCC,

Looking at your backup.com file, it seems that you want to end up with *only* the latest file in DKA100:[DATA] when you're finished. If so, you want to use /NEW_VERSION on your backup command, *not* /REPLACE. However, you must be sure that only one version of each file exists in dka200:[data]. If there's a chance that a file can have more than one version, do a PURGE DKA200:[DATA] before the command as well as PURGE DKA100:[DATA] afterward.

The error you're seeing is telling you that the file is *not* being replaced, so you do *not* have a backup of those DKA200 files upon completion.

Consider this: If you use /REPLACE and the version in dka100 is higher than the one from dka200, then the file new is copied but then deleted by the purge.
SCC_2
Frequent Advisor

Re: the copy.com don't run the next command

Hello Doug,
I can't use /new on my backup command. Because that directory have a lots of data inside, I will run out of disk spaces before the backup is complete.
I will do more testing to see what fit me the most. The worst case is I delete all files in dka100: first then copy all dka200: over.
SCC
Doug Phillips
Trusted Contributor

Re: the copy.com don't run the next command

>>
Because that directory have a lots of data inside, I will run out of disk spaces before the backup is complete.
<<

Ahh, the PURGE made me think that you expected two versions to end up on DKA100.

>>
The worst case is I delete all files in dka100: first then copy all dka200: over.
<<

As long as you're getting them backed up to tape or someplace else first, that might be the best way. Otherwise, if the files in both directories can be absolutely kept at the same version numbers, the /replace should work. If the files on dka200 are sure to not be in-use when you do the copy, you could do a rename to ;1 beforehand.

Without knowing the nature of the files, it's hard to say what's best.
SCC_2
Frequent Advisor

Re: the copy.com don't run the next command

Hello Doug,
Yes, your idea will work fine for this. Coping all data from other disks to dka100: is just an extra protection to us. Just in case if I have to pull out data from yesterday I can get it from dka100:
I do have another image backup backing up all drives at night on tape.
Thanks !
SCC
Antoniov.
Honored Contributor

Re: the copy.com don't run the next command

Hi,
I'm dubt about using of /NEW qualifier. Even if after of backup you execute PURGE command, you must have enough space on disk to keep two backup.
There no advantages of using /NEW; just /REPLACE makes a copy and keep same version of file. If you have text or log files it's simpler hold same version.

Antonio Vigliotti
Antonio Maria Vigliotti
Jan van den Ende
Honored Contributor

Re: the copy.com don't run the next command

SCC,
DOUG,

I am with Antonio on this one!

If _ALL_ these conditions are true:

- a file with EXACTLY the same name AND version exists in both directories
- you have DELETE access to the files in the target directory
- the files in the input directory AND in the target directory are NOT currently locked
- each file in the input directory and the corresponding file in the target directory have THE SAME attributes
- the BACKUP command has the /REPLACEqualifier specified

then

upon execution,

the DATA in the target file(s) will be REPLACED by the data in the source file(s).

So, if you can make sure of the SAME version numbers for the corresponding files, there is NO need for extra diskspace.

On the other hand, if you specify /NEW, then,
if any version of the target file exists, and the version of the source file is not greater, the version of the new output file will be one grater than the existing one.

Some(simplified) examples of /NEW

SOURCE:AB.CD;5
SOURCE:EF.GH;2
SOURCE:IJ.KL;7
SOURCE:MN.OP;17

TARGET:AB.CD;5
TARGET:EF.GH;8
TARGET:IJ.KL;3

Result of BACKUP/NEW:
TARGET:AB.CD;5
TARGET:AB.CD;6
TARGET:EF.GH;8
TARGET:EF.GH;9
TARGET:IJ.KL;3
TARGET:IJ.KL;7
TARGET:MN.OP;17

Result of BACKUP/REPLACE:
TARGET:AB.CD;5
TARGET:EF.GH;2
TARGET:EF.GH;8
TARGET:IJ.KL;3
TARGET:IJ.KL;7
TARGET:MN.OP;17

Mind the differences for AB.CD and EF.GH


hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
SCC_2
Frequent Advisor

Re: the copy.com don't run the next command

As a matter of fact, this is very easy for me to find out how the data was create new or update from other file.

Everyday we download a lot of data information from the PC to the Vax, they all
end at *.txt, or *.;*, and I can copy this over anytimes I want no problem.

When we create a quotation to a customer the program will create a new quotation number
start at q******.###, (****** is the quote number, and ### is the date count since 01-jan, example today is .223 which mean 223 date since 01 jan 05).
The rest of the files end at *.trs, which this type of files will got updated but the version number will not change, unless I init the files. So what I am trying to do right now is to copy all files since = today, exclude *.trs, and then another command /replace all *.trs will solve my problem. Since the *.trs file is the major one and this files is big.

SCC
Doug Phillips
Trusted Contributor

Re: the copy.com don't run the next command

SCC,
Reading your explanation of how the files are created, I think you are on the right track. I'll bet you probably have your directories set to version limit = 1, too, which will make things cleaner.

Antonio & Jan,
You are right about /new vs. /replace, and Jan, your comment about version numbers is *most* important (I think I mentioned it in my post, too).

One *major* caveat with backup/replace and backup (no switch) is if the source file has a lower version than the target. Your EF.GH example shows this clearly. Your conditions and examples are (as usual) right on.

I'll mention, too, that using /new when a source file has multiple versions will invert the version so that the oldest file has the highest version number. This is also not usually a good thing;-)

Given sufficient disk space, though, I do prefer to do a /new followed by a purge when running tasks like this unattended. Don't know, maybe just paranoia or maybe too many times being burned by something unexpected. My comfort level makes it hard for me to use /overlay, too:^(