m_jcl_select_file_arc
The "mapping" feature is not supported in this module when used by RestAPI!
In the interactive mode this module allows you to select files you want to add to your JCL/PROC/SYSIN process from the archive. When this process starts via REST-API then it is silent (not visible at all) and all the input must by provided via JSON object. In this case it is necessary to specify all information needed, which means: source system and library, target system and library, check system and members. Source files can be specified with wildcards in dataset/member names. Also versions can be specified, but they are optional and can't be used together with wildcards. When they are missing then the latest versions of selected files are used.It is also possible to optionally specify mapping using map_source_system, map_source_library, map_target_system and map_target_library. By default this mapping is not used.
Example 1 (imports archived JCL members with wildcards in their names and without versions)
As the interrupt parameter is specified and equals true then the process is interrupted after requested members are imported to the process by m_jcl_select_file_arc module. This allows you to open the process in interactive mode and check the result.
The import element must be an object, which must contain these items:
check_system
Specifies the system where members are checked (where SmartJCL runs). It must be one of systems defined in system_mapping array.
items
specifies members to be imported. Each of them is described by an object with target key:
The example imports all members matching OPC* member mask that exist in P391D.HOS.TEST library on SYSH_ID system.
The target and source libraries are equal (there is no mapping).
SmartJCL analysis runs on SYSH_ID system.
the process is interrupted after the members have been imported.
Example 2 (imports archived JCL members without wildcards in their names. Some of imported members have versions specified)
As the interrupt parameter is specified and equals true then the process is interrupted after requested members are imported to the process by m_jcl_select_file_arc module. This allows you to open the process in interactive mode and check the result.The import element must be an object, which must contain these items:
check_system
Specifies the system where members are checked (where SmartJCL runs). It must be one of systems defined in system_mapping array.
items
Specifies members to be imported. Each of them is described by an object with target key. The format of files (specified as an array of strings) is SYS/DSN(MEM) or SYS/DSN(MEM)/MainVersion.SubVersion when versions are explicitly specified.
The example imports the latest versions of TEST1 and TEST2 members and 3.1 version of TEST3 member from P391D.HOS.TEST library on SYSH_ID system.
The target and source libraries are equal (there is no mapping).
SmartJCL analysis runs on SYSH_ID system.
The process is interrupted after the members have been imported.
Example 3 (imports deleted members ABC and DEF)
When the process config allows to process also deleted members then they can be imported into m_jcl_select_file_arc module when deleted=true is set. In this example two deleted members are loaded. The process immediately continues after successful import because interrupt=false is set:
Example 4 (using the mapping feature)
When you specify any of map_source_system, map_source_library, map_target_system and map_target_library then the appropriate standard values (without map_ prefix) are replaced with mapped ones just before the module ends. This way you can select a file from a library but save it somewhere else. You can therefore copy a file instead of changing it.In this example the latest version of TEST1 and 3.1 version of TEST3 members from P391D.HOS.TEST library are loaded from the archive. The target location is not the same but is changed to P391D.COPY.JOBLIB.
Last updated