ECMS - Using IBM Workload Scheduler File Transfer Job definition XML

This document explains how to Use the IBM Workload Scheduler File Transfer Job definition XML to create/modify a File Transfer job type.

IBM Workload Scheduler File Transfer Job definition XML

Below is an IBM Workload Scheduler File Transfer Job definition in its XML representation. This is how a File Transfer job is stored in IWS (much like EventRules are also XML).

This XML can be used in TWS/WebAdmin TextEdit mode to create and modify File Transfer jobs. The benefit of doing so is that the XML representation includes the KeyPath options for use of the SSH protocol even though the TWS/WebAdmin UI does not expose those fields in its File Transfer job UI.

CAVEAT The following is based on testing against a Windows 2016 VM running the BitVise SSH server. This BitVise SSH server provides a configuration option for a local bash.exe shell. If connecting to a different type of SSH-capable server, the file paths part of the information below may be different. A quick Google search shows that it is possible to install a Powershell version of OpenSSH on WindowsOS, but https://www.openssh.com/portable.html does not reveal a WindowsOS version available. This may be why applications like BitVise exist (?).

Things of note

XML data file, with dummy data in [] brackets

This example XML uses <jsdlfiletransfer:uploadInfo>. For file downloads that XML data node is <jsdlfiletransfer:downloadInfo>.

[dynamic_workstation]#[job_name]
 TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:jsdlfiletransfer="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlfiletransfer" name="filetransfer">
  <jsdl:application name="filetransfer">
    <jsdlfiletransfer:filetransfer>
      <jsdlfiletransfer:uploadInfo>
        <jsdlfiletransfer:server>[remote.host.dns.name]</jsdlfiletransfer:server>
        <jsdlfiletransfer:localfile>[/full/path/to/local/source/files]</jsdlfiletransfer:localfile>
        <jsdlfiletransfer:remotefile>[/full/path/to/remote/target/folder]</jsdlfiletransfer:remotefile>
        <jsdlfiletransfer:localCredentials>
          <jsdl:userName>maestro</jsdl:userName>
          <jsdl:password>{aes}[xyNBNGlsKha+-actual-encrypted-password-hash-goes-here-E7HAz93N2e]</jsdl:password>
        </jsdlfiletransfer:localCredentials>
        <jsdlfiletransfer:remoteCredentials>
          <jsdl:userName>[remote_user_uid]</jsdl:userName>
          <jsdl:password/>[remote_user_pwd]</jsdl:password>
        </jsdlfiletransfer:remoteCredentials>
        <jsdlfiletransfer:certificateGroup>
          <jsdlfiletransfer:keyStoreFilePath>/tws/doit/.ssh/id_rsa</jsdlfiletransfer:keyStoreFilePath>
          <jsdlfiletransfer:password/>
        </jsdlfiletransfer:certificateGroup>
        <jsdlfiletransfer:protocol>SSH</jsdlfiletransfer:protocol>
        <jsdlfiletransfer:transferMode>binary</jsdlfiletransfer:transferMode>
      </jsdlfiletransfer:uploadInfo>
    </jsdlfiletransfer:filetransfer>
  </jsdl:application>
</jsdl:jobDefinition>
 DESCRIPTION "FT Move files to host PALLICK for conversion"
 RECOVERY STOP

File Transfer Job Type Log Entry

Follows is an IWS log entry for a successful run of a PubKey Auth SSH File Transfer Job type. Note that the TASK line, which in WINDOWS/UNIX job types shows the command/script executed, here shows runtime variables provided by IWS (which are not part of the File Transfer job type configuration) between <jsdl:variables> and </jsdl:variables>, with the complete File Transfer job XML configuration between <jsdl:application name="filetransfer"> and </jsdl:application>.

===============================================================
= JOB       : RIGID_1#JOBS[(0600 03/31/20),(JOBS)].SIADMIL_SEND_DUR-BR_TO_HOST_PALLICK_FT_7
= TASK      : <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:jsdlfiletransfer="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdlfiletransfer" name="filetransfer">
  <jsdl:variables>
    <jsdl:stringVariable name="tws.jobstream.name">JOBS</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.jobstream.id">JOBS</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.name">SIADMIL_SEND_DUR-BR_TO_HOST_PALLICK_FT_7</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.workstation">RIGID_1</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.iawstz">202003310600</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.promoted">NO</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.resourcesForPromoted">10</jsdl:stringVariable>
    <jsdl:stringVariable name="tws.job.num">721932714</jsdl:stringVariable>
  </jsdl:variables>
  <jsdl:application name="filetransfer">
    <jsdlfiletransfer:filetransfer>
      <jsdlfiletransfer:uploadInfo>
        <jsdlfiletransfer:server>pallick.doit.wisc.edu</jsdlfiletransfer:server>
        <jsdlfiletransfer:localfile>/xfer/transfers/pallick/MILWADM/*.zip</jsdlfiletransfer:localfile>
        <jsdlfiletransfer:remotefile>/c/Users/xferuser/FDrive/MILWAUKEE/imagenow/Admissions/MIL_WAK_WSH_DUR-BR/</jsdlfiletransfer:remotefile>
        <jsdlfiletransfer:localCredentials>
          <jsdl:userName>maestro</jsdl:userName>
          <jsdl:password>{aes}xyNBNGlsKha+-actual-encrypted-password-hash-goes-here-E7HAz93N2e</jsdl:password>
        </jsdlfiletransfer:localCredentials>
        <jsdlfiletransfer:remoteCredentials>
          <jsdl:userName>xferuser_ft</jsdl:userName>
          <jsdl:password/>
        </jsdlfiletransfer:remoteCredentials>
        <jsdlfiletransfer:certificateGroup>
          <jsdlfiletransfer:keyStoreFilePath>/tws/doit/.ssh/id_rsa</jsdlfiletransfer:keyStoreFilePath>
          <jsdlfiletransfer:password/>
        </jsdlfiletransfer:certificateGroup>
        <jsdlfiletransfer:protocol>SSH</jsdlfiletransfer:protocol>
        <jsdlfiletransfer:transferMode>binary</jsdlfiletransfer:transferMode>
      </jsdlfiletransfer:uploadInfo>
    </jsdlfiletransfer:filetransfer>
  </jsdl:application>
  <jsdl:resources>
    <jsdl:orderedCandidatedWorkstations>
      <jsdl:workstation>8CD1581837A911EAAE6EE316E7B0E449</jsdl:workstation>
    </jsdl:orderedCandidatedWorkstations>
  </jsdl:resources>
</jsdl:jobDefinition>
= TWSRCMAP  :
= AGENT     : RIGID_1
= Job Number: 721932714
= Tue 03/31/2020 08:29:39 CDT
===============================================================
File Transfer Upload information
Remote File:/c/Users/xferuser/FDrive/MILWAUKEE/imagenow/Admissions/MIL_WAK_WSH_DUR-BR/MIL_WAK_20200331_031007_DUR-BR.zip
Local File:/xfer/transfers/pallick/MILWADM/MIL_WAK_20200331_031007_DUR-BR.zip
Remote User:xferuser_ft
Local User:maestro
Protocol:'SSH'
Total Transfer Time:2 seconds
===============================================================
= Exit Status           : 0
= Elapsed Time (hh:mm:ss) : 00:00:04
= Tue 03/31/2020 08:29:44 CDT
===============================================================