Copy a File to an Existing zOS Sequential Data Set
Copy a File to an Existing z/OS Sequential Data Set
These examples copy, in text mode, one sequential file to another. This is the simplest form of data transfer.
DD File System
For this first z/OS example, the following is a line-by-line explanation:
- Line 1 turns on command echo, which results in each command being written prior to processing.
- Line 2 sets the error condition value on which script processing halts. Any error greater than or equal to warn halts script processing.
- Line 3 opens a session between the local UDM Manager and a remote UDM server running on host sol9. The host sol9 is given the logical name of unix. The open command also provides user credentials for the UDM server to verify and, if successfully verified, specifies the user ID with which the UDM server executes.
- Line 4 changes the local file system from the default of DSN to DD. The file system type dictates the syntax and semantics of file specifications, such as in the copy command.
- Line 5 changes the current directory of the UDM server unix running on host sol9.
- Line 6 changes the transfer mode type from binary (the default) to text. Text mode transfers will translate between code pages (for example, ASCII and EBCDIC) and process the end-of-line characters.
- Line 7 is the copy command that actually moves the data between systems. It copies file data10.txt on server unix to the local UDM Manager ddname APOUT. Recall that line 4 sets the local file system type to DD; hence, APOUT is referencing a ddname.
- Line 8 executes the quit command, which closes all sessions and exits UDM with the highest exit code set.
DSN File System
The DSN file system example is basically the same as the DD file system example, with these changes:
- Removal of the filesys command (line 4 in the DD file system example), since the default file system for the z/OS manager is DSN.
- Addition of line 6, which sets the local attribute createop. createop controls how a file is created. By default, its value is new, indicating that only new files are created and existing files are not written over (replaced). In this example, the value is being set to replace, which specifies that if the file exists, it should be replaced; otherwise, it is created.
Components
Universal Data Mover Manager for z/OS