spdsclean Examples

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

Cleaning WORKPATH Files on Your Server

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

Cleaning Residual Temporary LIBNAME Domain Files

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

Cleaning Specific LIBNAME Domains

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

Cleaning Other LIBNAME Domain File Classes

The following spdsclean command cleans only the ACL files from LIBNAME domains that begin with UJOE that are defined in the specified LIBNAME file. Because this command specifies the +tmp option, the deletion of residual temporary files is suppressed. To log the LIBNAME domains that were cleaned and the ACL files that were 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 LIBNAME file, issue the following 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

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

Cleaning Log Files

The following spdsclean command cleans the .spdslog files that are more than 7 days old from the specified log path directory .
spdsclean -logdir /opt/spds45/log 
To keep log files that are older than 10 days from the date of creation, use the following command:
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

The following spdsclean command cleans WORKPATH files from the directory list specified by the -parmfile option, residual temporary files from domain directories in the LIBNAME file specified by -libnamefile, and .spdslog files that are older than 7 days from the specified log path directory.
spdsclean -parmfile /opt/spds45/site/spdsserv.parm
 -libnamefile /opt/spds45/site/libnames.parm
 -logdir /opt/spds45/log -verbose

Glossary of spdsclean Terms

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. Typically, 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 following 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.parm 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 by using the -libnamefile option with the spdsserv command.
residual lock file
When SPD Server accesses a data resource or table that is 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 do not cause problems when the files are accessed again 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 contain a leading dollar sign character ($) in the name, which prevents the residual temporary files from appearing in a PROC DATASETS directory listing. You should periodically remove old or abandoned residual temporary files that unexpected proxy process terminations created.
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 uses 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 it is running. SPD Server usually cleans up these temporary files when it exits. If SPD Server terminates abnormally, these temporary files might be left in the temporary directory. In UNIX operating environments, the temporary files usually appear in 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).