Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VMS script??

Status
Not open for further replies.

craigey

Technical User
Apr 18, 2002
510
0
0
GB
Hi all,

Is this an appropriate forum to ask for some help with a VMS script that I'm trying to write???

Cheers
 
Ok, this is all I've got for the moment. I've included an explanation so that hopefully you get the idea.

Code:
$!					set some symbols
$!
$ dir1 :== SET DEF DSA200:[ARCHIVE]
$ dir2 :== SET DEF SYS$SYSDEVICE:[PM]
$!
$! 					output the batch queue 
$!					entries to a temp file
$ dir2
$ bq/by=p/out=tmp.lis
$!
$! 					Then open the tmp.lis file and get the 
$! 					archive names that are waiting to run
$!
$!open file here
$!get names here
$!
$!
$! 					Then create a file called 
$!					arc.tmp in archive$request
$!
$!create file here
$!
$!                               Then open the arc.tmp file and
$!                                put the archive names in to the file
$!
$!open arc.tmp here
$!put archive names in file here
$!delete the before and after		
$! archive name here
$!
$!					Correct the archive names by adding
$!					a ,01 after each archive name
$!
$!add ,01 after archive names here
$!
$!
$ dir1					go back to pm_dir		
$!
$!
$!					open the tmp.lis file and get the
$!                                      batch id no's for the archives waiting
$!
$!open file here
$!get batch id no's here
$!delete everything before
$! and after batch id no's here
$!
$!
$!                                      Then create a file called
$!                                      batchid.tmp
$!
$!create file here
$!
$!                                      Then open the batchid.tmp file and
$!                                      put the batch id no's in to the file
$!
$!open batchid.tmp here
$!put batch id no's in file here
$!
$!
$!					DELETE THE ENTRIES HERE
$!					using del/ent=
$!					need to loop through the numbers in the
$!					batchid.tmp file and delete each entry
$!					until all entrieshave been deleted
$!
$!
$!
$!
$!					submit the backup, before
$!					resubmitting the archives
$!
$! submit DSA100:[PM]BACKUP.COM; /KEEP /LOG=-
DSA100:[PM.LOG]backup.LOG; /NOTIFY /NOPRINT /PRIORITY=100
$!										
$!
$ dir2                                  go back to archive
$!
$!
$!					Rename arc.tmp to archive.request
$!					to get the archives resubmitted
$!
$ rename arc.tmp archive.request  
$!

thanks for your help in advance
 
Hi,
this week, I have not documentation with me, Monday 16 sept
I can be more precise.

see commands OPEN (or CREATE?) WRITE READ CLOSE

you have to set up loops ( using if and goto )
and in the read see the qualifier EON_OF_FILE, to
jump out of the loop.

bye.
 
Thanks for the info.

Any ideas on how this should be implemented on what I've already got.

I know that you can use lexicals to strip away the information displayed before the archive name etc, but am unsure as to how to put it all together!
 
Hi

Have you managed to write your command file, as I have not seen any other responses. I have a lot of experience with DCL scripts and using lexical functions. I also have knowledge of C, FMS, RMS etc.
 
brainssa
To be honest I think the code is a non-starter. It was a good idea, but I don't know if it's really going to be that usefull, but if you have anything to contribute I would still appreciate it.

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top