Redwood Documentation

Product Documentation

 

›Command Line Tools

RunMyJobsPlatform Agents

External Platforms

  • Connecting Redwood Server to External Platforms

Credentials

  • Storing Credentials
  • Credential Protocols

Platform Process Servers

  • On-site Platform Process Servers
  • Cloud Platform Agents
  • Using the Wizard to Create Process Servers
  • Configuring Platform Agents
  • Spool Host Agents
  • The Environment of Platform Agent OS Processes
  • Processing Platform Processes
  • Process Server Services
  • Configuring Agentless Process Servers
  • Automatically Updating Platform Agents
  • Enabling TLS
  • Creating Monitoring Checks
  • Configuring Load Balancing on Platform Agents
  • Platform Agent Registry Entries
  • Monitoring Servers with Platform Process Servers

UNIX Agents

  • UNIX Process Servers
  • UNIX Process Server Configuration Data
  • File Events on UNIX
  • Creating UNIX Process Servers (Advanced)
  • Choosing a User Switching Security Mode
  • Controlling Unix Platform Agents
  • Uninstalling Redwood Server Platform Agents from UNIX

Windows Agents

  • Creating a Microsoft Windows Process Server
  • File Events on Microsoft Windows Process Servers
  • Configuration of a Microsoft Windows Process Server
  • Managed Services
  • Configuring Platform Agents on Microsoft Windows
  • Automating Windows tasks that require a desktop window
  • Uninstalling Redwood Server from Microsoft Windows

Agent Definition Types

  • Using the BASH Definition Type
  • Using the KSH Definition Type
  • Using the CSH Definition Type
  • Using the Perl Definition Type
  • Using the Python Definition Type
  • Using the PowerShell Definition Type
  • Using the Visual Basic Script Definition Type
  • Using the CMD Definition Type
  • Using the R Process Definition Type
  • Using the DCL Definition Type
  • Using Platform Definition Types
  • Using the OS Native Definition Type
  • Microsoft Windows Definition Types
  • Using the SQLPLUS Definition Type
  • Using the FTP Definition Type
  • Using the Groovy Definition Type

Command Line Tools

  • Command Line System Tools
  • jtool
  • jcat
  • jdescription
  • jevent
  • jecho
  • jftp
  • JFTP Return Codes
  • jgetcredential
  • jgetfile
  • jgetpar
  • jjoin
  • jlink
  • jlog
  • jmail
  • jmessage
  • jmonitor
  • jputfile
  • jregister
  • jrfc
  • jscp
  • jtool screenshot
  • jscript
  • jsecret
  • jsleep
  • jsplit
  • api-tool.jar

OpenVMS Process Servers

  • Creating HP OpenVMS Process Servers
  • Installing the Platform Agent on HP OpenVMS
  • Configuring HP OpenVMS Process Servers
  • File Events on HP OpenVMS
  • HP OpenVMS Definition Types

AS/400 Connector

  • IBM AS/400 Connector Architecture
  • Setting up the IBM AS/400 Connector
  • Creating an IBM AS/400 Process Server
  • Files on AS/400 Raise Events
  • Using the AS/400 Definition Type
  • Redwood Server OS Support
  • IBM z/OS Definition Types
  • Using the JCL_FTP Definition Type
  • IBM z/OS System Tools

Reference

  • Balancing the Load
  • Credential Protocols
← jgetcredentialjgetpar →

jgetfile, jtool getfile

This platform agent tool is used to retrieve a file from the central Redwood Server or a platform agent.

Syntax

jgetfile  [-h|-?|-help] [-l <loglevel>] [-f <logfile>] -j|-job-context|<connfile> -o|-output <output-file>
          -s|-serverpath <path> [-a|-append] [-direct only|fallback|never] [-r|-retries <retries>]
          [-d|-delay <delay>] [-retry-server ...] [-retry-other ...] [-[no]compression] [-[no]verbose]
          [-[no]protect] [-tempdir <dir>]
ArgumentsDefaultDescription
-h, -?, -help

Show this help and exit
-l <loglevel>${JCS_LOGLEVEL:-info}Set the logging level; defaults to environment variable ${JCS_LOGLEVEL} or info when the environment variable is not set.
-f <logfile>${JCS_LOGFILE:-stderr}Log to file instead of stderr; defaults to environment variable ${JCS_LOGFILE} or stderr when the environment variable is not set.
-j, -job-context, <connfile>

Obtain environment from job-context or use a jsecret connection file
-o, -output <output-file>

Output file
-s, -serverpath <path>

Specification or path on server.
-a, -append

Append retrieved output to any existing file
-direct only|fallback|neverfallbackRetrieve file directly from agent for file originating from platform agent
-r, -retries <retries>10Retries
-d, -delay <delay>10Retry delay
-retry-server ...300-550,!400,!401,!500Retry when statuscode is in this list when answer is from server or agent
-retry-other ...300-550Retry when statuscode is in this list when answer is not from server or agent
-[no]compression

Whether to allow or disallow compression
-[no]verbose

Show progress during upload (in job description in job context)
-[no]protect

Fail if connection is not encrypted (using HTTPS) - the secure connection between the platform agent and the target server should be set-up prior to using this parameter.
-[no]convert

Convert file from --network to --filedata characterset
-tempdir <dir>

Temporary directory for file during download

Specifying files

The -s switch accepts the following syntax:

  • "<step>, Job <x>:<file>" - retrieve the file named <file> from chain process number <x> of the step named <step> in the chain.
  • "<jobid>:<file>" - retrieve the output file named <file> from the process with ID <jobid>.
  • "parent:<file>" - retrieve the output file named <file> of the parent.
  • "/document/<full_path>" - retrieve the contents of the document using the document's full path.
  • "/event/<EventId>" - fetch the file content that raised <EventId>.
  • "/job/<jobid>/<file>" - equivalent to <jobid>:<file>.
  • "/library/<Partition>.<Name>/resource/<path>" - download an individual resource (file) from one of the sources in the library.
  • "/library/<Partition>.<Name>/jar/<Name>" - download an entire jar from the library.
  • "/processserver/<Partition>.<Name>/<path>" - fetch the content of <path> on the process server <Partition>.<Name>. Only works for platform agent process servers. The <path> must either be inside DataRootDirectory, or in a list of allowed sources defined on the agent itself (net configuration file server_root).
note

parent does not work in chains, as the parent of a chain process is always the step, which usually does not produce output.

TLS Arguments

The arguments require the -protect argument.

ArgumentEnvironment VariableDescription
-tlsv1_3, -tls13JCS_SSL_METHOD=tlsv1_3Use TLS v1.3 secured connection.
-tlsv1_2, -tls12JCS_SSL_METHOD=tlsv1_2Use TLS v1.2 secured connection.
-tlsv1_1, -tls11JCS_SSL_METHOD=tlsv1_1Use TLS v1.1 or better secured connection.
-tlsv1, -tlsJCS_SSL_METHOD=tlsv1Use TLS v1.0 or better secured connection (default).
-sslv3, -sslJCS_SSL_METHOD=sslv3Use SSL v3 or better secured connection.
-cipherlist <text>JCS_SSL_CIPHERLISTSet list of available ciphers.
-passphrase <text>JCS_SSL_PASSPHRASESet passphrase for private key.
-key <file>JCS_SSL_KEYPATHSet private key.
-cert <file>JCS_SSL_CERTIFICATE_PATHSet public certificate.
-ca <file_path>JCS_SSL_TRUSTED_CERTIFICATE_FILETrusted CA certificates path or file.
-[no]verifyJCS_SSL_VERIFY_CERT(Do not) verify peer (server or client) certificate.
-verify-names <namelist>JCS_SSL_VERIFY_SERVER_NAMES, JCS_SSL_VERIFY_CLIENT_NAMESVerify peer (server or client) certificate hostname against list.

Securing Connections

When you transfer files between agent and wish to use the parameters, you have to ensure the agents and central server are configured for secure communication. When you transfer files between the agent and the central server in on-site environments, you have to configure the central server for secure communication.

  • Securing Platform Agent Connections
  • on-site-related topic Securing Central Redwood Server Connections

Proxy Settings

The following environment variables are used to retrieve proxy server connection details:

  • HTTP_PROXY - The URL to the proxy server, https://proxy.example.com:3128
  • PROXY_USER - The user for the proxy server, ignored if HTTP_PROXY is not set
  • PROXY_PASSWORD - The password for the proxy user, ignored if HTTP_PROXY is not set
  • NO_PROXY - Enforce a direct connection
note

These environment variables override the settings in the connection file.

Configuration

You must ensure that the central server is accessible from the host where jgetfile is run. If you wish to use the -protect switch, you must configure the platform agent HTTP servers to use HTTPS and trust each-others certificate; if you have an on-site installation, you must ensure the central Redwood server also trusts the certificate.

Process Server Parameters and Environment Variables

You use the ${<name>} syntax to specify process server parameter values; note that if you shell interprets ${<val>} then you will have to escape the expression according to your shell. The special ${LISTALL} variable contains a list of all environment variable and process server parameters. Any process server parameter that has remote set to true can be accessed in this way.

This can be used outside of job-context, however, only environment variables are available.

note

jgefile expects a correctly escaped [environment] variable name for your shell, you must ensure the shell does not evaluate the variable. See examples are available below.

Examples

Retrieve a file named stdout.log from the first chain process of step 2 in the chain

jtool getfile -j -o stdout.new -s "Step 2, Job 1:stdout.log"

Retrieve the stdout.log file from the process with jobid 123

jtool getfile -j -o stdout.new -s 123:stdout.log

Retrieve the output file from the parent job

jtool getfile -j -o stdout.new -s parent:stdout.log

Retrieve several files from different chain processes in the same chain and append them to one big file

jtool getfile -j -o stdout.new -s "Step 1, Job 1:stdout.log"
jtool getfile -j -a -o stdout.new -s "Step 1, Job 2:stdout.log"
jtool getfile -j -a -o stdout.new -s "Step 2, Job 1:stdout.log"
jtool getfile -j -a -o stdout.new -s "Step 2, Job 2:stdout.log"
jtool getfile -j -a -o stdout.new -s "Step 2, Job 3:stdout.log"

Retrieve a document with the path

jgetfile -j -o document.txt -s '/document/doc:MyPartition:/MyPartition2.SomeApplication/A_Document.txt'

Retrieve the file that triggered file event with raise sequence 1234

jgetfile -j -o input.txt -s "/event/1234"

Retrieve the class file for the class com.redwood.scheduler.custom.functions.Utilities in library MyPartition.Custom_Utilities

jgetfile -j -o Utilities.class -s "/library/MyPartition.Custom_Utilities/resource/com/redwood/scheduler/custom/functions/Utilities.class"

Retrieve the JAR file named Myjar with Description Import_jar.jar (the filename of the uploaded file) in library MyPartition.Custom_Utilities

jgetfile -j -o Myjar.jar -s "/library/MyPartition.Custom_Utilities/jar/Myjar"

Retrieve a file from process server myPartition.MSLN_UNIXS7 and put it into a directory named after the InputDirectory process server parameter, the file server_root contains this line: c:\\redwood.

jgetfile -j -o '${InputDirectory}'/document.txt -s "/processserver/myPartition.MSLN_WINS7/C:\redwood\myfile.txt"

Alternative with forward slashes as path separator, works on MS Windows as well

jgetfile -j -o ${BustWatchDirectory}\document.txt -s "/processserver/myPartition.MSLN_WINS7/C:/redwood/myfile.txt"
jgetfile -j -o ${BustWatchDirectory}\document.txt -s "/processserver/myPartition.MSLN_UNIXS7//redwood/myfile.txt"

See Also

  • Command Line System Tools
  • Securing Platform Agent Connections
  • on-site-related topic Securing Central Redwood Server Connections
← jgetcredentialjgetpar →
  • Syntax
    • Specifying files
    • TLS Arguments
    • Securing Connections
    • Proxy Settings
  • Configuration
  • Process Server Parameters and Environment Variables
  • Examples
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |