#!/usr/bin/sh
##########################################################################
# COPYRIGHT:
#    5765-273 (C) COPYRIGHT IBM CORPORATION 1995.
#    OCO SOURCE MATERIALS - IBM CONFIDENTIAL
#    (IBM CONFIDENTIAL RESTRICTED WHEN AGGREGATED
#    WITH ALL OCO SOURCE MODULES OF THIS PRODUCT)
#    THE SOURCE CODE FOR THIS PROGRAM IS NOT PUBLISHED OR
#    OTHERWISE DIVESTED OF ITS TRADE SECRETS, IRRESPECTIVE OF
#    WHAT HAS BEEN DEPOSITED WITH THE U.S. COPYRIGHT OFFICE.
#
#####################################################################
#
#  Create commonly-used Industry standard media
#
#  NOTE:  The 1st parm is the supervisor name to create the
#         medium objects on
#
#####################################################################

if [[ "$PDBASE" = "" && -r /etc/rc.config.d/pd ]]
then
   . /etc/rc.config.d/pd
   export PATH=$PATH:/opt/pd/bin:/opt/pd/lbin
   export NLSPATH=/opt/pd/lib/nls/msg/%L/%N
   export PDBASE=/var/opt/pd

   # Default the DPS locale to C.

   if [[ -z "$LC_MESSAGES" && -z "$LC_ALL" && -z "$LANG" ]]
   then
      export LANG="C"
   fi
fi

# Check for 1st parm (Supervisor name)
if test "$1" = ""
then
   pddmsg 430 "pdcrmed"
   exit 1
fi
suv=$1


######################################################################
###############  The following are commonly used media ###############
######################################################################


################################################
###############   ISO-A4-WHITE   ###############
################################################

MED_NAME=$suv:iso-a4-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A4 white medium with size 210mm by 297mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a4                                            \
   -medium-dimensions = 210:297                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi


##################################################
###############   ISO-A4-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:iso-a4-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A4 colored medium with size 210mm by 297mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-a4                                            \
   -medium-dimensions = 210:297                                     \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

######################################################
###############   ISO-A4-TRANSPARENT   ###############
######################################################

MED_NAME=$suv:iso-a4-transparent
pdcreate -c medium -x"                                                    \
   -descriptor = 'ISO A4 transparent medium with size 210mm by 297mm'     \
   -medium-type = transparency                                            \
   -medium-size = iso-a4                                                  \
   -medium-dimensions = 210:297                                           \
   -medium-color = transparent                                            \
   -medium-sides = 2                                                      \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A3-WHITE   ###############
################################################

MED_NAME=$suv:iso-a3-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A3 white medium with size 297mm by 420mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a3                                            \
   -medium-dimensions = 297:420                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   ISO-A3-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:iso-a3-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A3 colored medium with size 297mm by 420mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-a3                                            \
   -medium-dimensions = 297:420                                     \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A5-WHITE   ###############
################################################

MED_NAME=$suv:iso-a5-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A5 white medium with size 148mm by 210mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a5                                            \
   -medium-dimensions = 148:210                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   ISO-A5-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:iso-a5-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A5 colored medium with size 148mm by 210mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-a5                                            \
   -medium-dimensions = 148:210                                     \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi


################################################
###############   ISO-B4-WHITE   ###############
################################################

MED_NAME=$suv:iso-b4-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B4 white medium with size 250mm by 353mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-b4                                            \
   -medium-dimensions = 250:353                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   ISO-B4-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:iso-b4-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B4 colored medium with size 250mm by 353mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-b4                                            \
   -medium-dimensions = 250:353                                     \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B5-WHITE   ###############
################################################

MED_NAME=$suv:iso-b5-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B5 white medium with size 176mm by 250mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-b5                                            \
   -medium-dimensions = 176:250                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   ISO-B5-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:iso-b5-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B5 colored medium with size 176mm by 250mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-b5                                            \
   -medium-dimensions = 176:250                                     \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B4-WHITE   ###############
################################################

MED_NAME=$suv:jis-b4-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS-B4 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b4                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   JIS-B4-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:jis-b4-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS-B4 colored medium with size ???mm by ???mm'   \
   -medium-type = stationery                                        \
   -medium-size = jis-b4                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B5-WHITE   ###############
################################################

MED_NAME=$suv:jis-b5-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS-B5 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b5                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   JIS-B5-COLORED   ###############
##################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...

MED_NAME=$suv:jis-b5-colored
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS-B5 colored medium with size ???mm by ???mm'   \
   -medium-type = stationery                                        \
   -medium-size = jis-b5                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi


######################################################################
###############  The following are commonly used media ###############
###############           in North America             ###############
######################################################################

###################################################
###############   NA_LETTER_WHITE   ###############
###################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

# --- Now created by startsuv ---
#MED_NAME=$suv:na-letter-white
#pdcreate -c medium -x"                                                            \
#   -descriptor = 'North American letter white medium with size 8.5in by 11in'     \
#   -medium-type = stationery                                                      \
#   -medium-size = na-letter                                                       \
#   -medium-dimensions = 215.9:279.4                                               \
#   -medium-color = white                                                          \
#   -medium-sides = 2                                                              \
#   " $MED_NAME
#if [ $? -eq 0 ] ; then
#   pddmsg 548 $MED_NAME
#fi

#####################################################
###############   NA_LETTER_COLORED   ###############
#####################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-letter-colored
pdcreate -c medium -x"                                                               \
   -descriptor = 'North American letter colored medium with size 8.5in by 11in'      \
   -medium-type = stationery                                                         \
   -medium-size = na-letter                                                          \
   -medium-dimensions = 215.9:279.4                                                  \
   -medium-sides = 2                                                                 \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#########################################################
###############   NA_LETTER_TRANSPARENT   ###############
#########################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-letter-transparent
pdcreate -c medium -x"                                                                  \
   -descriptor = 'North American letter transparent medium with size 8.5in by 11in'     \
   -medium-type = transparency                                                          \
   -medium-size = na-letter                                                             \
   -medium-dimensions = 215.9:279.4                                                     \
   -medium-color = transparent                                                          \
   -medium-sides = 2                                                                    \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

##################################################
###############   NA_LEGAL_WHITE   ###############
##################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

# --- Now created by startsuv ---
#MED_NAME=$suv:na-legal-white
#pdcreate -c medium -x"                                                            \
#   -descriptor = 'North American legal white medium with size 8.5in by 14in'      \
#   -medium-type = stationery                                                      \
#   -medium-size = na-legal                                                        \
#   -medium-dimensions = 215.9:355.6                                               \
#   -medium-color = white                                                          \
#   -medium-sides = 2                                                              \
#   " $MED_NAME
#if [ $? -eq 0 ] ; then
#   pddmsg 548 $MED_NAME
#fi

####################################################
###############   NA_LEGAL_COLORED   ###############
####################################################
# NOTE: There is no standard medium-color OID to match to "colored",
#       so I am leaving it blank for now...
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-legal-colored
pdcreate -c medium -x"                                                               \
   -descriptor = 'North American legal colored medium with size 8.5in by 14in'       \
   -medium-type = stationery                                                         \
   -medium-size = na-legal                                                           \
   -medium-dimensions = 215.9:355.6                                                  \
   -medium-sides = 2                                                                 \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi



##########################################################################
###############  The following are commonly used envelopes ###############
##########################################################################

###################################################
###############   ISO_B5_ENVELOPE   ###############
###################################################

MED_NAME=$suv:iso-b5-envelope
pdcreate -c medium -x"                                                     \
   -descriptor = 'ISO B5 envelope medium with size 176mm by 250mm'         \
   -medium-type = envelope                                                 \
   -medium-size = iso-b5                                                   \
   -medium-dimensions = 176:250                                            \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

###################################################
###############   ISO_B4_ENVELOPE   ###############
###################################################

MED_NAME=$suv:iso-b4-envelope
pdcreate -c medium -x"                                                     \
   -descriptor = 'ISO B4 envelope medium with size 250mm by 353mm'         \
   -medium-type = envelope                                                 \
   -medium-size = iso-b4                                                   \
   -medium-dimensions = 250:353                                            \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

###################################################
###############   ISO_C4_ENVELOPE   ###############
###################################################

MED_NAME=$suv:iso-c4-envelope
pdcreate -c medium -x"                                                     \
   -descriptor = 'ISO C4 envelope medium with size 229mm by 324mm'         \
   -medium-type = envelope                                                 \
   -medium-size = iso-c4                                                   \
   -medium-dimensions = 229:324                                            \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

###################################################
###############   ISO_C5_ENVELOPE   ###############
###################################################

MED_NAME=$suv:iso-c5-envelope
pdcreate -c medium -x"                                                     \
   -descriptor = 'ISO C5 envelope medium with size 162mm by 229mm'         \
   -medium-type = envelope                                                 \
   -medium-size = iso-c5                                                   \
   -medium-dimensions = 162:229                                            \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################################
###############   ISO_DESIGNATED_LONG_ENVELOPE   ###############
################################################################

MED_NAME=$suv:iso-designated-long-envelope
pdcreate -c medium -x"                                                                  \
   -descriptor = 'ISO Designated-LONG envelope medium with size 110mm by 220mm'         \
   -medium-type = envelope                                                              \
   -medium-size = iso-designated-long                                                   \
   -medium-dimensions = 110:220                                                         \
   -medium-sides = 1                                                                    \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################################
###############   NA_10x13_ENVELOPE   ###############
#####################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-10x13-envelope
pdcreate -c medium -x"                                                                 \
   -descriptor = 'North American 10x13 envelope medium with size 10in by 13in'         \
   -medium-type = envelope                                                             \
   -medium-size = na-10x13-envelope                                                    \
   -medium-dimensions = 254:330.2                                                      \
   -medium-sides = 1                                                                   \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################################
###############   NA_9x12_ENVELOPE   ###############
#####################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-9x12-envelope
pdcreate -c medium -x"                                                               \
   -descriptor = 'North American 9x12 envelope medium with size 9in by 12in'         \
   -medium-type = envelope                                                           \
   -medium-size = na-9x12-envelope                                                   \
   -medium-dimensions = 228.6:304.8                                                  \
   -medium-sides = 1                                                                 \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#########################################################
###############   NA_NUMBER_10_ENVELOPE   ###############
#########################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-number-10-envelope
pdcreate -c medium -x"                                                                            \
   -descriptor = 'North American number 10 business envelope medium with size 4.125in by 9.5in'   \
   -medium-type = envelope                                                                        \
   -medium-size = na-number-10-envelope                                                           \
   -medium-dimensions = 104.775:241.3                                                             \
   -medium-sides = 1                                                                              \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

###################################################
###############   NA_7x9_ENVELOPE   ###############
###################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-7x9-envelope
pdcreate -c medium -x"                                                             \
   -descriptor = 'North American 7x9 envelope medium with size 7in by 9in'         \
   -medium-type = envelope                                                         \
   -medium-size = na-7x9-envelope                                                  \
   -medium-dimensions = 177.8:228.6                                                \
   -medium-sides = 1                                                               \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

####################################################
###############   NA_9x11_ENVELOPE   ###############
####################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-9x11-envelope
pdcreate -c medium -x"                                                             \
   -descriptor = 'North American 9x11 envelope medium with size 9in by 11in'       \
   -medium-type = envelope                                                         \
   -medium-size = na-9x11-envelope                                                 \
   -medium-dimensions = 228.6:279.4                                                \
   -medium-sides = 1                                                               \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################################
###############   NA_10x14_ENVELOPE   ###############
#####################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-10x14-envelope
pdcreate -c medium -x"                                                             \
   -descriptor = 'North American 10x14 envelope medium with size 10in by 14in'     \
   -medium-type = envelope                                                         \
   -medium-size = na-10x14-envelope                                                \
   -medium-dimensions = 254:355.6                                                  \
   -medium-sides = 1                                                               \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#########################################################
###############   NA_NUMBER_9_ENVELOPE   ###############
#########################################################
# NOTE:  DPA did NOT define that actual size of this envelope, thus
#        medium-dimensions is blank...

MED_NAME=$suv:na-number-9-envelope
pdcreate -c medium -x"                                                                         \
   -descriptor = 'North American number 9 business envelope medium with size ???in by ???in'   \
   -medium-type = envelope                                                                     \
   -medium-size = na-number-9-envelope                                                         \
   -medium-sides = 1                                                                           \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

###################################################
###############   NA_6x9_ENVELOPE   ###############
###################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-6x9-envelope
pdcreate -c medium -x"                                                         \
   -descriptor = 'North American 6x9 envelope medium with size 6in by 9in'     \
   -medium-type = envelope                                                     \
   -medium-size = na-6x9-envelope                                              \
   -medium-dimensions = 152.4:228.6                                            \
   -medium-sides = 1                                                           \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################################
###############   NA_10x15_ENVELOPE   ###############
#####################################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:na-10x15-envelope
pdcreate -c medium -x"                                                             \
   -descriptor = 'North American 10x15 envelope medium with size 10in by 15in'     \
   -medium-type = envelope                                                         \
   -medium-size = na-10x15-envelope                                                \
   -medium-dimensions = 254:381                                                    \
   -medium-sides = 1                                                               \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi


######################################################################
###############  The following are commonly used media  ##############
###############               (white ONLY)              ##############
######################################################################


################################################
###############   ISO-A0-WHITE   ###############
################################################

MED_NAME=$suv:iso-a0-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A0 white medium with size 841mm by 1189mm'    \
   -medium-type = stationery                                        \
   -medium-size = iso-a0                                            \
   -medium-dimensions = 841:1189                                    \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A1-WHITE   ###############
################################################

MED_NAME=$suv:iso-a1-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A1 white medium with size 594mm by 841mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a1                                            \
   -medium-dimensions = 594:841                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A2-WHITE   ###############
################################################

MED_NAME=$suv:iso-a2-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A2 white medium with size 420mm by 594mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a2                                            \
   -medium-dimensions = 420:594                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A6-WHITE   ###############
################################################

MED_NAME=$suv:iso-a6-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A6 white medium with size 105mm by 148mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-a6                                            \
   -medium-dimensions = 105:148                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A7-WHITE   ###############
################################################

MED_NAME=$suv:iso-a7-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A7 white medium with size 74mm by 105mm'      \
   -medium-type = stationery                                        \
   -medium-size = iso-a7                                            \
   -medium-dimensions = 74:105                                      \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A8-WHITE   ###############
################################################

MED_NAME=$suv:iso-a8-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A8 white medium with size 52mm by 74mm'       \
   -medium-type = stationery                                        \
   -medium-size = iso-a8                                            \
   -medium-dimensions = 52:745                                      \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-A9-WHITE   ###############
################################################

MED_NAME=$suv:iso-a9-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO A9 white medium with size 39mm by 52mm'       \
   -medium-type = stationery                                        \
   -medium-size = iso-a9                                            \
   -medium-dimensions = 39:52                                       \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#################################################
###############   ISO-A10-WHITE   ###############
#################################################

MED_NAME=$suv:iso-a10-white
pdcreate -c medium -x"                                               \
   -descriptor = 'ISO A10 white medium with size 26mm by 37mm'       \
   -medium-type = stationery                                         \
   -medium-size = iso-a10                                            \
   -medium-dimensions = 26:37                                        \
   -medium-color = white                                             \
   -medium-sides = 2                                                 \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B0-WHITE   ###############
################################################

MED_NAME=$suv:iso-b0-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B0 white medium with size 1000mm by 1414mm'   \
   -medium-type = stationery                                        \
   -medium-size = iso-b0                                            \
   -medium-dimensions = 1000:1414                                   \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B1-WHITE   ###############
################################################

MED_NAME=$suv:iso-b1-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B1 white medium with size 707mm by 1000mm'    \
   -medium-type = stationery                                        \
   -medium-size = iso-b1                                            \
   -medium-dimensions = 707:1000                                    \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B2-WHITE   ###############
################################################

MED_NAME=$suv:iso-b2-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B2 white medium with size 500mm by 707mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-b2                                            \
   -medium-dimensions = 500:707                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B3-WHITE   ###############
################################################

MED_NAME=$suv:iso-b3-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B3 white medium with size 353mm by 500mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-b3                                            \
   -medium-dimensions = 353:500                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B6-WHITE   ###############
################################################

MED_NAME=$suv:iso-b6-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B6 white medium with size 125mm by 176mm'     \
   -medium-type = stationery                                        \
   -medium-size = iso-b6                                            \
   -medium-dimensions = 125:176                                     \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B7-WHITE   ###############
################################################

MED_NAME=$suv:iso-b7-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B7 white medium with size 88mm by 125mm'      \
   -medium-type = stationery                                        \
   -medium-size = iso-b7                                            \
   -medium-dimensions = 88:125                                      \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B8-WHITE   ###############
################################################

MED_NAME=$suv:iso-b8-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B8 white medium with size 62mm by 85mm'       \
   -medium-type = stationery                                        \
   -medium-size = iso-b8                                            \
   -medium-dimensions = 62:85                                       \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   ISO-B9-WHITE   ###############
################################################

MED_NAME=$suv:iso-b9-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B9 white medium with size 44mm by 62mm'       \
   -medium-type = stationery                                        \
   -medium-size = iso-b9                                            \
   -medium-dimensions = 44:62                                       \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#################################################
###############   ISO-B10-WHITE   ###############
#################################################

MED_NAME=$suv:iso-b10-white
pdcreate -c medium -x"                                              \
   -descriptor = 'ISO B10 white medium with size 31mm by 44mm'      \
   -medium-type = stationery                                        \
   -medium-size = iso-b10                                           \
   -medium-dimensions = 31:44                                       \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B0-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B0, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b0-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B0 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b0                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B1-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B1, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b1-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B1 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b1                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B2-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B2, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b2-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B2 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b2                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B3-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B3, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b3-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B3 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b3                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B6-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B6, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b6-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B6 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b6                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B7-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B7, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b7-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B7 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b7                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B8-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B8, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b8-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B8 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b8                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

################################################
###############   JIS-B9-WHITE   ###############
################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B9, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b9-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B9 white medium with size ???mm by ???mm'     \
   -medium-type = stationery                                        \
   -medium-size = jis-b9                                            \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#################################################
###############   JIS-B10-WHITE   ###############
#################################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        JIS-B10, so medium-dimensions is not specified...

MED_NAME=$suv:jis-b10-white
pdcreate -c medium -x"                                              \
   -descriptor = 'JIS B10 white medium with size ???mm by ???mm'    \
   -medium-type = stationery                                        \
   -medium-size = jis-b10                                           \
   -medium-color = white                                            \
   -medium-sides = 2                                                \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi



#################################################################
###############  The following are commonly used  ###############
###############         engineering media         ###############
#################################################################

#####################################
###############   A   ###############
#####################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        A, so medium-dimensions is not specified...

MED_NAME=$suv:a
pdcreate -c medium -x"                                                     \
   -descriptor = 'Engineering A size medium with size ???mm by ???mm'      \
   -medium-type = stationery                                               \
   -medium-size = a                                                        \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################
###############   B   ###############
#####################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        B, so medium-dimensions is not specified...

MED_NAME=$suv:b
pdcreate -c medium -x"                                                     \
   -descriptor = 'Engineering B size medium with size ???mm by ???mm'      \
   -medium-type = stationery                                               \
   -medium-size = b                                                        \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################
###############   C   ###############
#####################################
# NOTE:  DPA does NOT define the exact dimensions of medium of size
#        C, so medium-dimensions is not specified...

MED_NAME=$suv:c
pdcreate -c medium -x"                                                     \
   -descriptor = 'Engineering C size medium with size ???mm by ???mm'      \
   -medium-type = stationery                                               \
   -medium-size = c                                                        \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################
###############   D   ###############
#####################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:d
pdcreate -c medium -x"                                                     \
   -descriptor = 'Engineering D size medium with size 22in by 34in'        \
   -medium-type = stationery                                               \
   -medium-size = d                                                        \
   -medium-dimensions = 558.8:863.6                                        \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

#####################################
###############   E   ###############
#####################################
#NOTE: dimensions are converted to mm,  25.4mm = 1 inch

MED_NAME=$suv:e
pdcreate -c medium -x"                                                     \
   -descriptor = 'Engineering E size medium with size 34in by 44in'        \
   -medium-type = stationery                                               \
   -medium-size = e                                                        \
   -medium-dimensions = 863.6:1117.6                                       \
   -medium-sides = 1                                                       \
   " $MED_NAME
if [ $? -eq 0 ] ; then
   pddmsg 548 $MED_NAME
fi

exit 0
