z/OS file.File Deployment
Objective
This guide walks you through deploying text files to z/OS systems using Digital.ai Deploy. Two key tasks:
- Automatic Text File Transcoding: Ensuring that text files are automatically converted to the z/OS-compatible EBCDIC (CP1047) encoding format.
- Placeholder Replacement: Replacing placeholders in configuration files with actual values for z/OS environment.
Before You Begin
Ensure you have:
- Digital.ai Deploy running instance.
- SSH/SFTP credentials: These credentials are essential for establishing a secure connection between your Digital.ai Deploy server and the z/OS system where the application will be deployed.
What Do You Have?
Let's assume you have two files that need to be deployed to z/OS:
- File with Placeholders:
textfilewithphUTF8.txt
– This file contains placeholders like ${APP_NAME} and ${VERSION} that need to be replaced during deployment. - File without Placeholders:
nophutf8.txt
– A simple text file without any placeholders, but still needs to be converted to the correct EBCDIC format for z/OS compatibility.
How Does It Work?
Follow the steps below to deploy these files with proper transcoding and placeholder replacement.
Set Up Your Connection to z/OS
To begin the deployment process, you first need to establish a connection to your z/OS environment. For more information, see Connect to a z/OS Host.
Configure File Encoding Settings
Configure the following settings to handle file encoding during deployment:
Text File Transcoding
In your type-defaults.properties
file:
# Define which files should be transcoded to EBCDIC
udm.BaseDeployableFolderArtifact.textFileNamesRegexToTranscode=.+\.(txt|properties|xml|conf)
# Exclude binary files from transcoding
udm.BaseDeployableFolderArtifact.excludeFileNamesRegexToTranscode=.+\.(jpg|png|pdf|zip)
Placeholder Handling
Configure placeholder scanning:
# Define which files should be scanned for placeholders
udm.BaseDeployableFolderArtifact.textFileNamesRegex=.+\.(txt|properties|xml|conf)
Here's a step-by-step.
Step 1 - Log into Digital.ai Deploy
Step 2 - Set Up Infrastructure
- Navigate to Infrastructure >
> New > overthere > ZosHost
- Configure the host:
- Name: Your z/OS host name
- Address: Host address
- Port: SSH port (usually 22)
- Username: SSH username
- Password: SSH password
- Test the connection using Check connection
Step 3 - Create Environment
- Go to Environment >
> New > Environment
- Configure:
- Name: Environment name (e.g.,
zos-prod
) - Containers: Select your z/OS infrastructure
- Name: Environment name (e.g.,
Step 4 - Create and Deploy Package
- Go to Applications >
> New > Application.
- Enter a name for the application.
- Under the application, create a new deployment package:
- Right-click the application you created, then select New > Deployment Package.
- Name the package with a version number, for example,
1.0.0
.
Step 5 - Create Application
Add deployment artifacts:
- Right-click the application version, then select New > file.File / file.Folder / file.Archive.
- Your artifacts can include text files that contain placeholders.
Step 6 - Deploy Package
- In the deployment package, select Deploy with environments ZosHost.
- Monitor the deployment to verify successful file transfer and placeholder replacement.
- Transcode the text file to EBCDIC before the file transfer if the target environment is z/OS.