MVS Edit a Data Set Created by a REXX Procedure

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.

The REXX has just one input parameter which defines the test environment by a integer value:
1
Unit Test
2
Integration Test
3
System Test
(1 = , 2 = , 3 = ). The REXX writes the created batch JCL in a sequential MVS data set and returns the name of this data set.

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 a global action or as a context menu action of a test environment.

You need to specify two properties:

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.


UI GetJCLGenInput

With the model editor action "Preview Dialog" you can test how your dialog looks during run time:


Create Data Set Dialog Preview

You need to model the sequential MVS data set returned by the REXX procedure as a File Descriptor. The file type is MVS_SEQ:


File_GenJCL

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 parameters. 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:


REXX GenerateJCL

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.


Edit MVS File

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.


Submit JCL

You now need to model the action calling the tools.


Generate JCL

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 enable 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.


Submit JCL

You now need to model an action calling the tool.


Submit Edited JCL

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 the file suffix can be specified 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.


Editor Action JCL