UDM - Copying ASA Text Files - zOS
Overview
UDM for z/OS provides the ability to translate and record control characters found in American Standards Association (ASA) text files.
For the purposes of this discussion, an ASA dataset is one whose record format includes an A. ASA datasets can contain fixed- or variable-length records, and can be blocked or unblocked.
Typical record formats for ASA datasets include:
- FA (fixed-length, unblocked)
- FBA (fixed-length, blocked)
- VBA (variable-length, blocked)
An ASA text file is one that contains spacing and control characters that UDM expects to generate from or translate to ASA control characters.
ASA Datasets
A distinguishing characteristic of ASA datasets is that the first position of each record (disregarding a variable-length record's RDW) contains one of the following ASA control characters. The corresponding text control character each ASA character is generated from or translated to also is provided.
ASA Character |
EBCDIC Encoding |
Text Character Sequence * |
Description |
---|---|---|---|
' ' |
x'40' |
Single end-of-line (EOL) |
Advance to the next line. |
'0' |
x'F0' |
Two EOLs |
Add a blank line after the current line. |
'-' |
x'60' |
Three EOLs |
Add two blank lines after the current line. |
'1' |
x'F1' |
New page (x'C0') |
Page break. |
'+' |
x'C6' |
Carriage return (x'0D') |
Overstrike. |
* On UNIX-based systems, an EOL is a single newline (x'0A'). On Windows systems, an EOL is a combination of a carriage return and newline (x'0D0A').
Although the ASA control character appears at the start of each physical record, it actually represents the logical end of the preceding physical record.
Transfer Operations with UDM
To translate an ASA file during a UDM transfer, the following conditions must be met:
- A text transfer must be performed (that is mode type=text must be specified).
- The file system for the z/OS session must be set to DD or DSN with the filesys command.
- The ASA dataset must have an A in its record format (for example: FA, FBA, VBA).
- The asa attribute must be yes.
- The rdw attribute (used to preserve the record descriptor word of variable-length records) must be no.
If any of these conditions is not met, UDM will transfer the ASA file as a normal text or binary file.
Translating a Text File to an ASA Dataset
The following example demonstrates uploading a text file from a Windows system to an ASA dataset on a z/OS system (some details have been omitted for clarity).
During the transfer, UDM will convert the text sequences to the corresponding ASA control characters.
Translating an ASA Dataset to a Text File
The following example demonstrates downloading an ASA dataset from a z/OS system to a text file on a UNIX-based system (some details have been omitted for clarity).
During the transfer, UDM will convert the ASA control characters to the corresponding text sequences.
In the mode command, trim=yes
is specified. This will prevent any spaces used to pad fixed-length records from being copied to the target file.
Also, the use of the asa attribute for the local transfer session instructs UDM to translate ASA control characters in the input dataset to their text equivalents. UDM also obtains the record format of the input dataset before doing any translations to make sure it contains an A. If it does not, the asa attribute is ignored.