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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch files

Status
Not open for further replies.

snakeblitsen

Programmer
Aug 13, 2004
53
GB
Hi, I do lots of moves and changes. Could someone get me started on how to prepare the commands before-hand in a file,then run them. For example, just a small one to start with -- take 2 extensions out of pickup groups, swap equipments and put them back in the pickup groups.
Either fiol or winfiol

gpgme:dir=4199,grp=123;
gpgme:dir=4198,grp=456;
exeqc:dir=4199,equ=1-2-20-00; (spare equ)
exeqc:dir=4198,equ=2-1-20-00; (4199's old equ)
exeqc:dir=4199,equ=3-1-20-00; (4198's old equ)
gpgmi:dir=4199,grp=123;
gpgmi:dir=4198,grp=456;

Is it a reliable way for large moves?
Cheers
 
What you have created above looks fine, but if it were me i would be looking to put prints in (GPDAP:DIR=XXXX; etc) before each change or end command so that if things go a bit wrong, then you have a back up. I often throw in regular CADAP prints aswell.

When you have a completed file, save in notepad and deliver through WINFIOL or other terminal tool. Winfiol also has parameters that you can adjust to "auto respond" in instances where you have to confirm transactions - i would leave this on manual until you are a bit more confident on how this can pan out.

Finally EXEQC will work, but you might want to block all of these extensions before you kick off - Also for large moves you might want to break the files up into smaller more manageable chunks.. theres nothing worse than having your first line of code fail, and screw the remaining 240 odd lines up.... Take my word for it :)

If you are concerened about follow me's, diverts etc also use the SUSIP on extensions before changing them.



[red]Striker : My orders came through. My squadron ships out tomorrow, we're bombing the storage depots at Daiquiri at 18:00 hours. We're coming in from the North, below their radar.[/red]
[blue]Elaine : When will you be back?[/blue]
[red]Striker : I can't tell you that? It's classified.[/red]
 
Thanks, I am going to start in little batches till I get good at it. All other advice noted.
Cheers
 
if your using winfiol then you can set it up so that if a command in a batch file fails it then halts the rest of the file. You can then have the option of resuming or aborting, if you resume it takes up from where it left off, if you abort then you enter any commands you need to get it back on track then kick it off from where it failed.

commands that need a confirmation can be handled easily by using excel to generate the batch file.

Set up the list of commands that need a confirm. In the column to the left of these number the rows 1,3,5 etc.
Then set up a number of Y; rows equal to the number of commands that need one and number their row's 2,4,6 etc. then just tell excel to sort that section buy the column you have set up the row numbers in.

you then end up with an automatic confirmation for each command.... but be very careful to make sure your cutting off the right extension or whatever!!

getting the commands into winfiol is also simple.... just select the section of commands to send in, copy it and paste it into the command window of winfiol. Select the lines and hit send lines.... sit back with a nice cup of coffee and watch the 10,000 line file go :)

if you want more help or an example file then e-mail me

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
umm,it IS supposed to do that, right??
 
I do a lot of adds, moves and deletions too. On large actions, I create a commandfile with all related commands.
I start with getting the current data out of the DNA-SQL database and import it to an MS-Access database.
Next I create a table with the new data per extension.
Then I use several queries in specific order to create the commandlines and add them to a seperate table. An export of this table creates a commandfile for Fiol.
Using above routine I've created commandfiles of more than 4000 commandlines.
It takes some time to get good at it, but it has saved me a lot of time!
 
Hi guys, I did a 32 hmac and it went without any problems --thanks to your advice.
Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top