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 Application
- Navigate to Applications >
> New > Application
- Add deployable files:
- For files with placeholders:
- Target path:
/your/zos/path
- Enable placeholder replacement
- Target path:
- For files without placeholders:
- Target path:
/your/zos/path
- File transcoding will happen automatically based on your configuration
- Target path:
- For files with placeholders:
Step 5 - Create and Deploy Package
- Create a deployment package from your application
- Deploy to your z/OS environment
- Monitor the deployment for successful file transcoding and placeholder replacement
Step 6 - Verification
After deployment:
- Check that text files are properly encoded in EBCDIC
- Verify that placeholders have been replaced with correct values
- Confirm file permissions and ownership on z/OS
Troubleshooting
Common issues and solutions:
- If files appear corrupted, verify transcoding patterns
- For placeholder issues, check the placeholder syntax and defined values
- For connection issues, verify SSH/SFTP credentials and firewall settings