Operating System - OpenVMS
1753731 Members
4568 Online
108799 Solutions
New Discussion юеВ

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 16
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.