This module shows files that are ready to be copied to the target libraries. The files originate from the previous activity (in 2 and more step processes) or are inserted directly in the approve module. The module started via REST-API is useful mainly in the second case. Files can be provided via input JSON object and imported to the process. It is also possible to continue in the process just after import is done or to interrupt it for later access in interactive mode. You can import JCL, PROC and SYSIN files via REST-API, as is illustrated by the following examples.
As interrupt element is specified and equals true then the process is interrupted after requested members are imported to the process by m_jcl_approve module. This allows you to open the process in interactive mode and check the result. The import element must be an object, which can contain these items:
Specifies what to do when an imported member already exists in the process (optional, the default value is "error"). Possible values are:
error - an error is written to the log and the module fails
skip - the member is not imported
overwrite - the existing member is overwritten.
contains masks of JCL members that are imported (optional)
contains masks of PROC members that are imported (optional)
contains masks of SYSIN members that are imported (optional)
jcl, proc and sysin objects must contain mask item, which must be an array of elements in SYS/DSN(MEM) format. The system must exist in system_mapping configuration option in hos_config2.php. DSN is a library where members are read from (wildcards are not allowed here). Members can contain wildcards. All members matching the specified masks are imported.
The following example imports members from SYSH_ID system and P391D.HOS.TEST library matching OPC* mask. The members are imported as JCL objects. When a member that already exists in the process exists also in the library, it is skipped and the old one remains unchanged in the process.
In this example members matching the masks specified in jcl object are imported as JCL members. Procedures matching the mask in proc object are imported as PROC members and sysin files matching masks in sysin object are imported as SYSIN members. If any of the imported members already exists in the process then it is overwritten. When the module succeeds to import members then the next task automatically starts, as interrupt option equals false. If all the following tasks are silent (require no interaction) then the activity runs to its end (is set as Complete when finished).
You can import SYSIN members with any LRECL. The module recognizes LRECL of the dataset that contain imported SYSIN members and stores this information together with the member to the database.