[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
General Programming Concepts: Writing and Debugging Programs

Creating SMIT Help Information for a New Task

System Management Interface Tool (SMIT) helps are an extension of the SMIT program. They are a series of helps designed to give you online information about the components of SMIT used to construct dialogs and menus. SMIT helps reside in a database, just as the SMIT executable code resides in a database. SMIT has three ways to retrieve SMIT help information:

Each of these methods provides a different way to retrieve SMIT helps from the SMIT help database.

Man Pages Method

Prerequisite Tasks or Conditions

Create a new SMIT task that requires help information.

Procedure

  1. Using any editor, create a file and enter help text inside the file. The file must adhere to the format specified by the man command. Put only one set of help information in a file.
  2. Give the help text file a title as specified by the man command.
  3. Place the help text file in the correct place in the manual subdirectory.
  4. Test the newly created file to ensure it works using the man command.
  5. Locate the file that contains the ASCII object stanza file format for the new SMIT task.
  6. Locate the help descriptor fields in the object stanzas of the file.
  7. Set the help_msg_loc help descriptor field equal to the title of the help text file. The title for the text file is also the parameter to pass to the man command. For example:
    help_msg_loc = "xx", where "xx" = title string name
    This example executes the man command with the xx title string name.
  8. Leave the rest of the help descriptor fields empty.

Message Catalog Method

Prerequisite Tasks or Conditions

Create a new SMIT task that requires help information.

Procedure

  1. Use any editor to create a file and enter help messages inside the file. The .msg file must adhere to the format specified by the "Message Facility Overview for Programming" .
    Note: An existing .msg file may also be used.
  2. Give each help message a set number (Set #) and a message number (MSG#). This allows the system to retrieve the proper help text.
  3. Use the gencat command to convert the .msg file into a .cat file. Place the .cat file in the correct directory according to the NLSPATH environment variable.
  4. Test the help messages using the dspmsg command.
  5. Locate the file that contains the ASCII object stanza file format for the new SMIT task.
  6. Locate the help descriptor fields in the object stanzas of the file.
  7. For each object stanza, locate the help_msg_id help descriptor field. Enter the Set# and Msg# values for the message in the .msg file. These values must adhere to the Messages Facility format. For example, to retrieve message #14 for set #2, set:
    help_msg_id - "2,14"
  8. Set the help_msg_loc help descriptor field to the filename of the file containing the help text.
  9. Leave the other help descriptor fields empty.

Softcopy Libraries Method

Prerequisite Tasks or Conditions

Create a new SMIT task that requires help information.

InfoCrafter must be installed on your system in order to create softcopy files.

Procedure

  1. Create a softcopy database file that tags the SMIT help information with the proper SMiT ID. SMiT IDs are hidden search strings that are given to text in a softcopy database. SMiT tags take the format of SMiTtopic#tag#, where topic#tag# is a numeric string of at least 4 digits and up to 8 digits. For example:
    SMiT0822369 is a SMiT ID tag for TCP/IP
  2. Create a softcopy library file to create a pointer to the softcopy database file. For details on the format of the library file, refer to the ispaths file.
  3. Set the help_msg_id help descriptor field to equal the numeric string of the SMiT ID tag. For example, if the SMiT identifier tag is SMiT0822369, then set:
    help_msg_id = "0822369"
  4. Set the help_msg_base help descriptor field to equal the full path name of the ispaths file created in step 2. SMIT reads the file for the softcopy database associated with the correct book.
  5. Set the help_msg_book help descriptor field to equal the value of the name field contained in the file indicated by the help_msg_base help descriptor field.

Related Information

System Management Interface Tool (SMIT) Overview for Programmers

Message Facility Overview for Programming

Understanding SMIT Screen Types , Understanding SMIT Object Classes , Understanding SMIT Aliases and FastPaths , Understanding SMIT Information Command Descriptors , and Understanding SMIT Command Generation and Execution

Adding Tasks to the SMIT Database and Debuggung SMIT Database Extensions

dspmsg command, gencat command, man command, smit command

ispaths file


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]