| Previous | Contents | Index | 
Formatting files control the choice and format of information presented with  the show
 and group
 commands.  These  formatting files are located in the /pmdf/www/popstore/
directory.  To display different choices of information or to change the  formatting of the information, do not edit the Process Software supplied  formatting  files --- your changes will be lost when you next upgrade PMDF.  Instead,  create new formatting files and use them instead.  Once you have created a new  formatting file, you can configure the utility to always use it, as  described in Section 6.15.1.  Or, you can use it  occassionally such as to generate a monthly report.  Such occassional usage is  effected with the -format
 switch as described in Section 6.15.2.
6.15.1 Changing default display formats
You can change this utility's default display formats through the use of an  option file.  The file is a PMDF-style option file named  /pmdf/table/popstore_formats
. Each option setting in the file takes the form
| option-name=option-value | 
option-name
 is the name of an option to  set and option-value
 is the value to set for  that option.  The recognized option names and their default values are shown  below         
| Option name | Default value | Used with | 
|---|---|---|
| FORWARD_FORMAT | popmgr_forward.txt | show -forwardings | 
| GROUP_FORMAT | popmgr_groups.txt | group -list | 
| MSG_FORMAT | popmgr_message.txt | show -messages | 
| MSG_BRIEF_FORMAT | popmgr_message_brief.txt | show -messages -brief | 
| PROFILE_FORMAT | popmgr_profile.txt | show | 
| PROFILE_BRIEF_FORMAT | popmgr_profile_brief.txt | show -brief | 
As an example, suppose you want to change the show
command's output.  You could then copy the popmgr_profile.txt
 file to, say,  site/profile.txt
 and then edit the new  file.
3 Then, create the  /pmdf/table/popstore_formats
 file and in it place the line
| PROFILE_FORMAT=site/profile.txt | 
show
 output will by default use your new formatting file. Note that if you 
 make this change while running the utility, you will need to exit it 
 and restart it in order for the change to be seen.
6.15.2 Report generation
Customized reports can be generated using the  -format_file
 switch of the show
command.  With that switch, a formatting file can be specified.  The file will  then be used to format the information to be displayed.  For example, The  syntax of formatting files is described in Section 4.3.4.  suppose that the file /pmdf/www/popstore/usage.txt
contains the lines
| 
%first{                                             Quota} 
%first{                                   Owner      Used} 
%first{--------------------------------------------------} 
%owner{%40s}  %quota_used_k{%8.2f} 
%last{--------------------------------------------------} 
 | 
| 
# pmdf popstore show -format_file=usage.txt
                                             Quota 
                                   Owner      Used 
-------------------------------------------------- 
                           John      Doe     24.02 
                           Anne   Clarke      8.56 
                           Andy   Harris     36.72 
                    Default user profile      0.00 
                           Karen   Russo    133.98 
                          Deanne   Fagan     73.22 
-------------------------------------------------- 
# 
 | 
Note that for security reasons, the formatting files must be kept in the  directory tree /pmdf/www/popstore/
.  This is enforced so  as to prevent users with popstore management privileges from using the  -format_file
 switch as a means of displaying protected files from other directories.
See Chapter 9 for further discussion of generating reports.
| 3  Recall that these files are stored 
        in the  | 
| Previous | Next | Contents | Index |