Install a File Transfer agent
You can use this document as a step-by-step guide to install an agent on the source mainframe.
Topics
- Step 1: Create a zFS data set for the M2-agent
- Step 2: Format the data set as zFS
- Step 3: Mount the filesystem
- Step 4: Verify the mount
- Step 5: Enter OMVS
- Step 6: Set the agent installation directory environment variable
- Step 7: Set the work directory environment variable
- Step 8: Create the work directory
- Step 9: Copy the agent tar file and copy the work directory
- Step 10: Assume the root user
- Step 11: Finish the agent installation
Step 1: Create a zFS data set for the M2-agent
Create a zFS for the M2-agent installation using the JCL below.
//DEFINE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * DEFINE CLUSTER (NAME(yourhlq.M2AGENT.ZFS) - VOLUMES(*) - LINEAR CYL(1000 200))
Step 2: Format the data set as zFS
After creating the data set, format it as a zFS filesystem.
One way to do that is using the following Job Control Language (JCL):
//FORMAT EXEC PGM=IOEAGFMT,PARM='AGGRNAME(yourhlq.M2AGENT.ZFS),FORMAT,AGGRSIZE(1200)' //SYSPRINT DD SYSOUT=A
Submit this job and check if it completed successfully.
Step 3: Mount the filesystem
To mount the filesystem, use the MOUNT
command. You can mount the filesystem in
command line in ISPF or in batch.
For example:
MOUNT FILESYSTEM('yourhlq.M2AGENT.ZFS') TYPE(ZFS) MODE(RDWR) MOUNTPOINT('/usr/lpp/aws/m2-agent')
Step 4: Verify the mount
Verify that the filesystem is correctly mounted using D OMVS,F
command or by
checking within Unix System Service (USS).
Step 5: Enter OMVS
Use the following command to enter OMVS:
TSO OMVS
Step 6: Set the agent installation directory environment variable
Use the following command to set the agent installation directory environment:
export AGENT_DIR=/usr/lpp/aws/m2-agent
Note
Mount point is defined in step 3.
Step 7: Set the work directory environment variable
Use the following command to set the work directory environment variable:
export WORK_DIR=$AGENT_DIR/tmp
Step 8: Create the work directory
Use the following command to set the work directory environment:
mkdir -p $WORK_DIR
Step 9: Copy the agent tar file and copy the work directory
Download the agent tar file from AWS using the M2 agent
link
The transfer mechanism will depend on your environment, but make sure that the tar file is transferred in binary mode.
Step 10: Assume the root user
Use the following command to assume root user:
su
Step 11: Finish the agent installation
Follow these steps to finish the agent installation.
-
Set the m2-agent version environment variable to the version currently being installed using the following command:
export M2_AGENT_VERSION=1.0.0
-
Extract the agent tar package using the following command:
tar -xpf m2-agent-package-$M2_AGENT_VERSION.tar -C $AGENT_DIR
-
Create a
current-version
symbolic link to the current agent installation directory with the following command:ln -s $AGENT_DIR/m2-agent-v$M2_AGENT_VERSION $AGENT_DIR/current-version
-
Update and submit
CPY#PDS
to create the File Transfer agent data sets.Note
JCL uses the
SYS2.AWS.M2 HLQ
.To create the File Transfer agent, set parameter lines 000006-000012. Also, update the three symbolic variables
HLQ
,VOLSER
, andAGNTPATH
to be used later in the JCL:oedit $AGENT_DIR/current-version/installation/CPY#PDS submit $AGENT_DIR/current-version/installation/CPY#PDS
Note
This JCL is tailored for setting up certain aspects of the agent installation on the mainframe. It allocates necessary data sets and then copies specific files from the Unix filesystem to these data sets.