Use Sterling B2B Integrator to Copy a File to a Sterling Connect:Direct for z/OS Node

In this sample, shown in BPML, the Sterling B2B Integrator CopyToCDMainframeNode business process passes a document to the Connect:Direct Server Adapter (PNODE) which copies the file to the Sterling Connect:Direct® for z/OS® node (SNODE). The business process functions much like a Sterling Connect:Direct process.

In the first operation of the CopyToCDMainframeNode business process, the File System Adapter collects (reads) the daily.txt file from the Sterling B2B Integrator local file system. This file becomes the primary document of the business process.

The second operation uses the CD Server Begin Session Service to establish a connection to the remote Sterling Connect:Direct node, CDZOS. The local node name of the Connect:Direct Server Adapter is Dal1CDSA. The Begin Session Service uses the remote user ID of cduser to authenticate to the Sterling Connect:Direct server. The Session Token created by the CD Server Begin Session Service identifies the session that is established with the remote Sterling Connect:Direct node. The SessionToken value in the CD Server CopyTo Service ensures that this service copies the file using the session initiated by the CD Server Begin Session Service.

The third operation uses the CD Server CopyTo Service to copy the primary document to a specific unit (3380) and volume (serial number is SYS009) on the Sterling Connect:Direct for z/OS server. SPACE information is also provided (4096, (200,40)...ROUND). The destination file name is SAMPLE.ZOS.FILE.

The last operation uses the CD Server End Session Service to terminate the session with the Sterling Connect:Direct server.

Note: To see BPML source code like the example shown below, select View > Source while using the Sterling B2B Integrator Graphical Process Modeler (GPM). To see the business process as depicted in the GPM user interface, select View > Graph.
<process name="CopyToCDMainframeNode">
  <sequence>
    <operation name="File System Adapter">
      <participant name="CollectForCD"/>
      <output message="FileSystemInputMessage">
        <assign to="Action">FS_COLLECT</assign>
        <assign to="filter">daily.txt</assign>
        <assign to="collectionFolder">C:\Collection</assign>
        <assign to="deleteAfterCollect">false</assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
    <operation name="CD Server Begin Session Service">
      <participant name="CDServerBeginSession"/>
      <output message="CDServerBeginSessionServiceTypeInputMessage">
        <assign to="." from="*"></assign>
        <assign to="RemoteUserId">cduser</assign>
        <assign to="ProcessName">Copyto</assign>
        <assign to="LocalCDNodeName">Dal1CDSA</assign>
        <assign to="RemoteCDNodeName">CDZOS</assign>
        <assign to="RemotePasswd">xxxxxxxx/assign>
        <assign to="UsingObscuredPasswd">NO</assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
        <assign to="BeginSessionResults" from="*"></assign>
      </input>
    </operation>
    <operation name="CD Server CopyTo Service">
      <participant name="CDServerCopyTo"/>
      <output message="CDServerCopyToServiceTypeInputMessage">
        <assign to="." from="*"></assign>
        <assign to="RemoteUNIT">3380</assign>
        <assign to="RemoteVOL">(SER=SYS009)</assign>
        <assign to="RemoteDISP">(NEW,CATLG)</assign>
        <assign to="RemoteFileName">SAMPLE.ZOS.FILE</assign>
        <assign to="RemoteSPACE">(4096,(200,40),,,ROUND)</assign>
        <assign to="SessionToken"
from="//BeginSessionResults/SessionToken/node()"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
    <operation name="CD Server End Session Service">
      <participant name="CDServerEndSession"/>
      <output message="CDServerEndSessionServiceTypeInputMessage">
        <assign to="." from="*"></assign>
        <assign to="SessionToken">//BeginSessionResults/SessionToken/node()
         </assign></output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>
  </sequence>
</process>