ITEM: G2553L

I need help customizing smit.


Question:

I am trying to customize my smit menus using the ODM commands.  There is 
a field on the Backup Files in a Filesystem menu that allows the user to 
select the destination of the backup output (tape, disk, file etc.)  I 
want to be able to hard code that option to be tape.  I have been trying 
to find the object that I need to change with the "odmget -q command", 
but I am getting error messages.  I may not be looking in the right place,
or may not have the correct syntax.


Response:

In order to take a look at all the "Backup Files in a Filesystem" stanzas
you should use the following odmget command:

  odmget -q "id=backupOpts" sm_cmd_opt

You will probably want to redirect the output to a file.  The stanza for 
the "Backup DEVICE or FILE" reads as follows:

sm_cmd_opt:
        id_seq_num = "010"
        id = "backupOpts"
        disc_field_name = ""
        name = "Backup DEVICE or FILE\\n\\
  (example: /dev/rfd0)"
        name_msg_file = "smit.cat"
        name_msg_set = 21
        name_msg_id = 25
        op_type = ""
        entry_type = "t"
        entry_size = 0
        required = "+"
        prefix = "target="
        cmd_to_list_mode = ""
        cmd_to_list = ""
        cmd_to_list_postfix = ""
        multi_select = ""
        value_index = 0
        disp_values = ""
        values_msg_file = ""
        values_msg_set = 0
        values_msg_id = 0
        aix_values = ""
        help_msg_id = "051104"
        help_msg_loc = ""
        help_msg_base = ""
        help_msg_book = ""

PLEASE NOTE: SMIT customization is generally a ConsultLine activity and 
providing a complete solution for you would be billed under ConsultLine.
If you need more information on ConsultLine, call 1-800-225-5249.

However, here an example that may provide the functionality you require.
This is an example only and is not supported by IBM.  You should use this
code only as a sample to base your stanza on...  If you require additional
help in customizing your SMIT screens, it will need to be done on a 
ConsultLine basis.

sm_cmd_opt:
        id_seq_num = "010"
        id = "backupOpts"
        disc_field_name = ""
        name = "Backup DEVICE or FILE\\n\\
  (example: /dev/rmt0)"
        name_msg_file = "smit.cat"
        name_msg_set = 21
        name_msg_id = 25
        op_type = "l"
        entry_type = "t"
        entry_size = 0
        required = "+"
        prefix = "target="
        cmd_to_list_mode = ""
        cmd_to_list = "echo /dev/rmt0"
        cmd_to_list_postfix = ""
        multi_select = ""
        value_index = 0
        disp_values = "/dev/rmt0"
        values_msg_file = ""
        values_msg_set = 0
        values_msg_id = 0
        aix_values = ""
        help_msg_id = "051104"
        help_msg_loc = ""
        help_msg_base = ""
        help_msg_book = ""

The changes are in the fields: name, op_type, cmd_to_list, and 
disp_values.  This stanza causes the default value of "Backup DEVICE or 
FILE" to be /dev/rmt0.  This value can be changed by the user, if he/she 
so wishes.

The commands used to replace this are:

1) Backup your SMIT ODM files:

   cd /etc/objrepos
   mkdir SMIT
   cp sm* SMIT

2) Get the stanza to change:

   odmget -q "id_seq_num=010 and id=backupOpts" sm_cmd_opt > \\
     /tmp/sm_cmd_opt.010

3) Edit the file and make appropriate changes to the stanza:

   vi /tmp/sm_cmd_opt.010

4) Delete the old stanza from the ODM:

   odmdelete -q "id_seq_num=010 and id=backupOpts" -o sm_cmd_opt

5) Add the new stanza to the ODM:

   odmadd /tmp/sm_cmd_opt.010

Now, you should be able to test out your changes.


Support Line: I need help customizing smit. ITEM: G2553L
Dated: January 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:50
Comments or suggestions? Contact us