This modelling example is based on the following use case.
There are three development test environments:
The REXX TAUSACDS creates batch JCL via ISPF file tailoring by which test data sets for one of the test environments can be allocated.
You can decide if you want to edit the batch JCL before submitting it or have it directly submitted to MVS.
This use case should be provided by an action which can be modelled as global action or as a context menu action of a test environment.
You need to specify two properties:
The type of the property is SelectValue. Under Type: Select Value in the Property view, you can specify the labels you want to see in a drop down box within the dialog for this property and the corresponding values which should be passed as input parameters to a REXX procedure.
The type of this property is Bolean.
You need to model an AWM dialog so that you can enter the input parameters for the action. The dialog should have the two properties created above as input parameters and should be a tool of type "Open Modelled Dialog" from the AWM function package.
With the model editor action "Preview Dialog" you can test how your dialog looks during runtime:
You need to model the sequential MVS data set returned by the REXX procedure as a File Descriptor. The file type is MVS_SEQ:
You can now model the ISPF command tool to call the REXX procedure.
Model the REXX procedure as an Execute ISPF Command tool with input and output parameter. The input parameter SAMPLE_PROP_UI_SelectTestEnvironment has to be modeled as a Parameter From Previous_Tool.
The output parameter should be modeled as a File type that points to the File Descriptor modeled before. This ensures that the data set name returned by the REXX procedure is used as the "Name Physical" for the sequential MVS data set during run-time.
The REXX procedure tool is modeled as follows:
You now need an MVS tool to edit the sequential MVS data set. You can model this as an Edit MVS File tool from the MVS function package. The tool has one input parameter of type File pointing to the File Descriptor modeled earlier. The parameter should be modeled as "Parameter From" Previous_Tool.
The last tool you need is the MVS tool to submit the generated JCL. You should model this as Submit JCL tool from the MVS function package. The input parameter has to be modeled in the same way as the input parameter for the tool SAMPLE_TOOL_MVS_EditJCL.
You now need to model the action calling the tools.
The action calls the four tools. The tool SAMPLE_TOOL_MVS_EditJCL has an enabling condition. This means that the tool is only called if the input parameter SAMPLE_PROP_UI_IsJCLEdited is set to true within the preceding input dialog. The tool SAMPLE_TOOL_MVS_SubmitJCL is only called if the input parameter SAMPLE_PROP_UI_IsJCLEdited is set to false.
In addition, you can add an editor action to allow you to submit the editor content as a batch job to MVS. In this case, you need to model another Submit JCL tool from the MVS function package because the tool parameter "Submit JCL from" should be "An Active Editor". When the tool parameter "Submit JCL from" is set to "An Active Editor" in the Property view the file input parameter of the tool is automatically removed in the model editor.
You need to model an action calling the tool.
This action is modeled as part of a global editor action. The global action needs a "ISA Editor Action" relationship to mark it as an editor action. In this relationship file suffix can be defined so that the editor action is only shown in the editor context menu when the edited file has a suffix contained in the blank separated list.