Rational Developer for System z


Lesson 1.1: Customize the PDS RAM by adding a custom action and parameters to the model

This lesson will briefly step you through adding the HowTo custom action and its four parameters: value, string1, string2, and option, to the PDS RAM.
These parameters and actions are added to the PDS RAM by supplying the appropriate information to the CRA0VDEF file. For more information on the steps in this lesson, see the CARMA Developer's Guide, Chapter 4. Customizing a RAM API using the CAF.
  1. Start by listing the action or actions that you will want to extend to the RAM's API. For this sample, you will add a custom action, HowTo, with the following attributes:
    • Name: HowTo
    • Description: Provides an example of implementing plug-in projects with extension points
    • ActionID: 100
    • RAM ID: 00
    • Parameter list: value, string1, string2, option
    • Return Value list:
    Tip: If you are using the shipped Sample PDS with no customization, then the following values for action id and RAM id should be correct; however, if you have added or removed RAMs, custom actions, or parameters check to make sure the action id is the next available action id and the RAM id corresponds to the Sample PDS RAM. .
  2. In the description of the HowTo custom action above, there are parameters and return values listed. Each of these must be defined within the RAM as well. The descriptions of each are as follows:
    • Name: value
    • Description: a one digit numerical value
    • Parameter ID: 000
    • Ram ID: 00
    • Type: string
    • Length: 1
    • Constant: no
    • Default value: none
    • Prompt: Enter a one-digit value:
    • Name: string1
    • Description: a string of text
    • Parameter ID: 001
    • RAM ID: 00
    • Type: string
    • Length: 10
    • Constant: no
    • Default value: none
    • Prompt: Enter a short string of text:
    • Name: string2
    • Description: a string of text
    • Parameter ID: 002
    • RAM ID: 00
    • Type: string
    • Length: 10
    • Constant: no
    • Default value: none
    • Prompt: Enter a short string of text:
    • Name: option
    • Description: yes or no option
    • Parameter ID: 003
    • RAM ID: 00
    • Type: string
    • Length: 1
    • Constant: no
    • Default value: none
    • Prompt: Yes or No?
  3. Knowing the actions, parameters, and descriptions of each will help you create the declarations to include into the configurations file. Each action and parameter will be defined on its own line and its particular metadata will be specified within a predefined byte length.
    Tip: You can also define the actions and parameters without using the predefined byte sizes for metadata by using tabs as a delimiter. Be sure to consult the CARMA Developer's Guide, Chapter 4. Customizing a RAM API using the CAF for the details of this alternate format.

    For this sample, using the predefined byte sizes, the custom HowTo action is declared as:

    A00100  000,001,002,003|

    For each of the respective parameters, the declaration is:

    P00000  STRING          1               N
    P00001  STRING          10              N
    P00002  STRING          10              N
    P00003  STRING          1               N
    Note: For both actions and parameters, the first eight bytes of the record is called the record key.
  4. Make sure there are no active connections between the Sample PDS RAM, CARMA, and the host system before continuing.
  5. You should add this information to FEK.SFEKVSM2(CRA0DEF) and ensure that all record keys are in alphanumeric order. Use the JCL script located at FEK.#CUST.JCL(CRA$VDEF) to REPRO FEK.SFEKVSM2(CRA0DEF).
  6. Next, for each action and parameter you will define in the CRA0VDEF file you must define a corresponding definition in the CRA0VSTR file containing any language-dependent information about the action or parameter.
    For this sample, the custom action would be defined in the CRA0VSTR like the following:
    EN_US   00037A00100  HowTo           For demonstration. Does nothing.
    For each respective parameter in the sample, the definitions are:
    EN_US   00037P00000  value                           Enter a one-digit numerical value.
    EN_US   00037P00001  string1                         Enter a short string of text.
    EN_US   00037P00002  string2                           Enter a short string of text.
    EN_US   00037P00003  option                          Y/N?
    Note: For both actions and parameters, the first twenty-one bytes of the record is called the record key.
  7. You should add this information to the FEK.SFEKVSM2(CRA0VSTR) file and ensure that all records are in alphanumeric order. Use the JCL script located at FEK.#CUST.JCL(CRA$VSTR) to REPRO FEK.SFEKVSM2(CRA0VSTR).

References


Terms of use | Feedback



This information center is powered by Eclipse technology. (http://www.eclipse.org)