Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Distributed Print Service User's Guide: HP 9000 Computers > Chapter 3 Command Reference

Using an Attributes File

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You may want to pre-define specific attribute value pairs in permanent files and access them when you need those specific values within a command.

When creating a file containing attribute and value pairings, you may want to use space between the end of each attribute name and the equal sign so the equal signs and values are aligned. (See the sample attribute file in the section below.) This makes your files easier to read and maintain.

If you do not specify a full path name for your attributes file, HPDPS uses the path name from the environment variable PDPATH to locate the attributes file.

If PDPATH is undefined or contains a null string, HPDPS looks in your current working directory for the attributes file. For example, if PDPATH contained /home/smith/, the following command would read file /home/smith/my_attributes to obtain the attributes file:

pdpr -X my_attributes File1

Reading in the Attributes File

You can read in an attribute file in the following ways:

  • Use the -x flag and specify the command-attribute attributes:

    pdset -x "attributes=AttrFilePP1" PhysPrt2
  • Use the -X flag to specify an attributes file name:

    pdset -X AttrFilePP1 PhysPrt2
  • Use both to read an attribute file into a command.

NOTE: The -X and -x flags are additive so that all attributes and values are used. If the same object-attribute is specified more than once in a command with multiple uses of the -x, -X command flags or the attributes command-attribute, or a combination of them, the value read last takes precedence.

Both of the previous examples referenced the following sample attributes file:

 # Physical Printer Attributes File
# AttrFilePP1
document-formats-supported =ascii pcl
maximum-copies-supported =3
document-types-supported =printable
printer-memory =32

This attributes file is equivalent to the following command:

pdset -c printer -x "document-formats-supported=ascii pcl \
maximum-copies-supported=3 document-types-supported=printable \
printer-memory=32" PhysPrt2
  • Command-attributes, and any settable or specifiable object-attributes, including the command-attribute attributes can be listed in an attributes file. Thus, an attributes file can invoke other attributes files.

    If an attributes file calls itself, an error is reported.

  • You can only use a file that contains both specifiable and settable attributes with the pdcreate or pdpr commands.

    If a specifiable attribute is listed in an attributes file and the file is used with the pdset or pdmod commands, the attribute is rejected and an error message is issued.

    See “Setting Object-Attributes ” earlier for more information on specifiable and settable attributes.

  • Comment lines can exist in attribute files. The comment starts with a # and ends at the end of the line. This was illustrated in the above sample attribute file.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.