Spdsclean Examples

For the following examples, assume that the InstallDir/ for your SPD Server is the directory /opt/spds45.

Cleaning WORKPATH Files on Your Server

This spdsclean command cleans all of the files in the WORKPATH directory list designated by /opt/spds45/site/spdsserv.parm.
spdsclean -parmfile /opt/spds45/site/spdsserv.parm 
If you want spdsclean to log the files it deletes, add the -verbose option to the command.
spdsclean -parmfile /opt/spds45/site/spdsserv.parm -verbose 

Cleaning Residual Temporary LIBNAME Domain Files

This spdsclean command cleans all of the residual temporary files from all of the LIBNAME domains that are defined in the -libnamefile specified.
spdsclean -libnamefile /opt/spds45/site/libnames.parm 
If you want spdsclean to log the files it deletes, just add the -verbose option to the command.
spdsclean -libnamefile /opt/spds45/site/libnames.parm -verbose 

Cleaning Specific LIBNAME Domains

This spdsclean command cleans all residual temporary files from the LIBNAME domain TRIAL99.
spdsclean -libnamefile /opt/spds45/site/libnames.parm -domains trial99 
Suppose that you want to add domain UJOE04 to be cleaned also. The following command will do this:
spdsclean -libnamefile /opt/spds45/site/libnames.parm -domains trial99, ujoe04
Suppose you want to clean all TRIAL9x domains and all domains that begin with UJOE from the specified -libnamefile. The following command will do this:
spdsclean -libnamefile /opt/spds45/site/libnames.parm -domains trial9?, ujoe* 
To log the domains processed and the files deleted from each, just add the -verbose option to any of these spdsclean commands.

Cleaning Other LIBNAME Domain File Classes

This spdsclean command only cleans the ACL files from LIBNAME domains that begin with ' UJOE' that are defined in the specified -libnamefile. Because of the +tmp option, deleting residual temporary files is suppressed. To log the LIBNAME domains cleaned and the ACL files deleted, add the -verbose option.
spdsclean -libnamefile /opt/spds45/site/libnames.parm +tmp -acl -domains ujoe* 
To clean domain state files from domains TRIAL9x for the specified -libnamefile. submit the following spdsclean command:
spdsclean -libnamefile /opt/spds45/site/libnames.parm
 -domains trial9? -lib11 +tmp 
To log the LIBNAME domains that were cleaned and the files that were deleted, add the -verbose option.

Cleaning WORKPATH and LIBNAME Combinations

This spdsclean command cleans all of the WORKPATH files from the directory list specified in -parmfile and cleans residual temporary files from domain directories specified in -libnamefile.
spdsclean -parmfile /opt/spds45/site/spdsserv.parm
 -libnamefile /opt/spds45/site/libnames.parm -verbose 
Logging occurs for the WORKPATH and LIBNAME domain directories and for the files that were deleted from each.

Cleaning Log Files

This spdsclean command cleans the .spdslog files from the specified -logdir directory that are more than seven days old.
spdsclean -logdir /opt/spds45/log 
Suppose you want to keep log files older than 10 days from the date of execution. The following spdsclean command will do this:
spdsclean -logdir /opt/spds45/log -logage 10 
If you want to see the files that were deleted, add the-verbose option to the spdsclean command.

Cleaning WORKPATH, LIBNAME Domain, and Log Files

This spdsclean command cleans WORKPATH files from the directory list in -parmfile, residual temporary files from domain directories in -libnamefile, and cleans .spdslog files that are older than seven days from the -logdir directory.
spdsclean -parmfile /opt/spds45/site/spdsserv.parm
 -libnamefile /opt/spds45/site/libnames.parm
 -logdir /opt/spds45/log -verbose  

Spdsclean Glossary

ACL Files
When you create SPD Server Access Control Lists (ACLs), hidden ACL files are created in the primary directory of the LIBNAME domain. The hidden files are named .spres11* and .sppro11*. The hidden ACL files retain the state of the ACLs that were defined for the LIBNAME domain resources. Normally, you should not delete ACL files.
Domain State File
The domain state file is also known as .spdslib11. The domain state file retains the set of directory paths that are configured for the LIBNAME domain. The directory path information is stored as an ordered list for each of the SPD Server domain storage classes.
  • METAPATH=
  • DATAPATH=
  • INDEXPATH=
As you make LIBNAME assignments over the life of the domain, the new directories are appended to the end of the ordered lists for METAPATH=, DATAPATH=, and INDEXPATH= storage classes. The order of directories listed in the .spdslib11 file defines the order of data cycling and overflow sequencing for each of the respective classes.
Libnames.param File
The libnames.parm file defines the SPD Server LIBNAME domains for the SPD Server environment. The libnames.parm file is a collection of LIBNAME statements. Each LIBNAME statement defines a storage domain that SPD Server uses with clients. You modify the libnames.parm file using the -libnamefile option with the spdsserv command.
Residual Lock File
When SPD Server accesses a data resource or table within a LIBNAME domain, it creates a lock file. The local operating environment uses the locking mechanism to ensure that proper member-level locking is observed by all SPD Server processes that access the named data resource. If a LIBNAME proxy process terminates unexpectedly, the residual lock files remain in the LIBNAME domain. Residual lock files cause no problem upon subsequent accesses because the lock belongs to the operating environment. The lock is cleared when the process terminates and does not depend on the presence of the file itself. However, unused residual lock files can accumulate and create clutter in your primary domain directory.
Residual Temporary File
SPD Server creates temporary files when you create a new resource in a LIBNAME domain. If the SPD Server LIBNAME proxy process terminates unexpectedly while you are creating a new file, the residual temporary files remain in the LIBNAME domain directories. These temporary files are named with a leading '$' character, which prevent the residual temporary files from appearing in a PROC DATASETS directory listing. You should periodically remove old or abandoned residual temporary files that were created by unexpected proxy process terminations.
Spdsserv.parm File
The spdsserv.parm file defines the SPD Server operating parameters. The WORKPATH= statement in this file lists the directories that SPD Server will use for transient or working disk storage. To specify the spdsserv.parm file, use the spdsserv command with the -parmfile option.
System-Specific Temporary Files
SPD Server uses pre-assigned directories (which vary by operating environment) that are designated for temporary files. The pre-assigned directories hold files, logs, and other temporary entities that SPD Server creates while running. SPD Server normally cleans up these temporary files when exiting. If SPD Server terminates abnormally, these temporary files might be left in the temporary directory. In UNIX operating environments, the temporary files would usually appear in the directories such as /tmp or /var/tmp. In Windows operating environments, the temporary files are usually stored in C:/TEMP (or wherever the user profile is configured to store temporary files).