Novell is now a part of Micro Focus

Automating NetWare Server Events

Novell Cool Solutions: Tip
By Tay Kratzer

Digg This - Slashdot This

Posted: 9 Nov 2000

Here we have a kick, er, butt tip from our special guru on the hill, Tay Kratzer, about how to automate events on a NetWare server. It's straight from the horse's mouth, so enjoy.

AUDIENCE: NetWare and GroupWise administrators.

THE HOOK: Perhaps you've wanted to kick off a process on a NetWare server during the weekend, but you didn't want to spend your time on the weekend to kick off the process.

HOW TO USE THIS DOCUMENT: There's a lot of explanation in this document for those that like explanation. For those of you that just want to configure things, without reading the documentation, look for the "- ACTION # X" lines in this document.

PURPOSE: The following is a full explanation of how my customer and I designed an automated routine to have the GroupWise POA completely re-index a GroupWise post office every week. The goal is to show precisely the solution we used, but with you're own creativity you should be able to create other automated solutions to use on a NetWare server.


ISSUE: The GroupWise POA leaves all kinds of garbage files in the PO\OFUSER\INDEX directory.

Currently the only way to clean up these files is to issue a CTRL-Q on the GroupWise POA. The regular QuickFinder Indexing process that you can scheduled on the POA, does not do the same thing as the CTRL-Q keystroke from the GroupWise POA's NetWare console screen. My customer has found that doing a CRTL-Q on their GroupWise POA has helped them net an average of 400 megs of disk space. This only happens the first time they run the CTRL-Q because it was never run before this.

See the TID number 2956138 for more information on this concept of using CTRL-Q.

QUESTION: How can we automate the CTRL-Q routine?

SOLUTION: Use Novell's NCSCRIPT, COPY and CRON NLMs to create an automated solution that hits CTRL-Q on the GroupWise POA every Saturday at 9:00 P.M.


The NCSCRIPT.NLM was created by Novell Consulting. Amongst other things, this clever NLM allows you to pass keystrokes to any screen on a NetWare server that has a user interface. When NCSCRIPT is first loaded it makes a simple queuing structure in a directory it creates off the root of the SYS: volume called "DISTRIB". Script files can be placed in the SYS:DISTRIB\JOB directory, and NCSRIPT will pull that directory for script jobs either when it is loaded, or if NCSCRIPT is already loaded it polls the DISTRIB\JOB directory every 5 seconds.

The NCSCRIPT.NLM can be obtained from the following location:

The documentation that comes with this NLM is very good. So you can read up on the following script that becomes my "QFPOAJOB" file in this scenario:


This script will have to modified so that it's appropriate for the POA that you are running on your server. For example if post office is called ACMEPO and post office is below a domain is called CORP then your QFPOAJOB file would read like this:


In our scenario we will save this ASCII text file to the SYS:DISTRIB directory. The file must NOT have a file name extension to it. For example the file cannot be named QFPOAJOB.TXT. It must only be called QFPOAJOB. This script file tells NCSCRIPT to go to the screen called "GroupWise POA - ACMEPO.CORP" and hit the combination keystroke of "Ctrl-Q".

- ACTION # 1: Place the NCSCRIPT.NLM in the SYS:SYSTEM directory.

- ACTION # 2: Load NCSCRIPT one time, then unload it, this will create the SYS:DISTRIB directory and queue subdiectories

- ACTION # 3: Create the QFPOAJOB file in the SYS:DISTRIB directory. You can just copy and paste the script created above and save it to an ASCII file. Then customize it appropriately.


The COPY.NLM was created by Novell a few years back. It allows you to copy files while at the NetWare console. The COPY.NLM has now been replaced by the TOOLBOX.NLM. My customer and I chose to load the COPY.NLM because it is simpler to use then TOOLBOX.NLM. We obtained the COPY.NLM at

- ACTION # 4: Place the COPY.NLM in the SYS:SYSTEM directory.

The COPY.NLM will be used to copy the QFPOAJOB file from the SYS:DISTRIB directory to the SYS:\DISTRIB\JOB directory.


The CRON.NLM is an NLM that reads an ASCII text file called "CRONTAB" that you create in the SYS:ETC directory. The CRONTAB file tells the CRON.NLM when to run a NetWare console process, such as a NetWare *.NCF batch file. The formatting for the CRONTAB, and the CRON.NLM can be obtained at the following URL:

To have the CRON.NLM run the QFPOA.NCF every Saturday at 9:00 P.M. the SYS:ETC\CRONTAB file looked like this:

00 21 * * 6 QFPOA.NCF

NOTE: Make sure the CRONTAB file does not have an extension to it. For example it cannot be called CRONTAB.TXT. We will discuss what's in the QFPOA.NCF just a little bit later.

- ACTION # 5: Put "LOAD CRON.NLM" (don't include the quotes) in the AUTOEXEC.NCF file of your file server

- ACTION # 6: Put the CRON.NLM in the SYS:SYSTEM directory

- ACTION # 7: Create your CRONTAB file and place it in the SYS:ETC directory



We now know that the CRON.NLM will load the QFPOA.NCF file every Saturday nigh at 9:00 P.M. Now we got to make the QFPOA do the following:

1. Use the COPY.NLM to copy the QFPOAJOB file to SYS:DISTRIB\SCRIPTS\JOB directory for NCSCRIPT to process.

2. Load NCSCRIPT so that it performs the CTRL-Q function on the POA

3. Unload both the COPY.NLM and the NCSCRIPT.NLM so they are not resident in memory

Let's look at what the QFPOA.NCF has in side of it:


# This unloads the COPY.NLM
# so that in case it's already loaded
# there are no errors when this NCF tries to load it again


# This unloads the NCSCRIPT.NLM
# so that in case it's already loaded
# there are no errors when this NCF tries to load it again


# This uses the COPY.NLM to copy the
# file called QFPOAJOB to NCSCRIPT'S
# incoming job queue


# This unloads COPY.NLM, after a 10 second wait
# The question mark tell the NetWare 4.11 and 5.x
# OS to pause 10 seconds (by default)


# This loads NCSCRIPT and tells
# NCSRIPT not to purge it's \JOB queue
# which NCSCRIPT usually does on startup
# NCSCRIPT will first process the QFPOAJOB script
# and then it will purge the QFPOAJOB file


# This unloads causes a 10 second delay for
# NCSCRIPT to load and process it's job


# This unloads NCSCRIPT after 10 seconds
# In total we have given NCSCRIPT 20 seconds
# which is more than enough time (This is NetWare you know, it's fast!)



- ACTION # 9: Create the QFPOA.NCF file and place it in the SYS:SYSTEM directory


The CRON.NLM will run the QFPOA.NCF file every Saturday at 9:00 P.M. The COPY.NLM will copy the NCSCRIPT job file, just before NCSCRIPT loads. The NCSCRIPT.NLM will select the CTRL-Q keystrokes on the POA, and the POA will totally re-index the post office, and delete un-needed files in the PO\OFUSER\INDEX directory.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates