Copy a Set of Files to an Existing zOS Partitioned Data Set

Copy a Set of Files to an Existing z/OS Partitioned Data Set

These examples copy (in text mode, and using the * wildcard) multiple files with one copy command to an already allocated partitioned data set (PDS) on a z/OS system.

The file names used to create the member names in the destination PDS are the source file names.

However, note that file names on UNIX and Windows file systems often have a file extension as part of their name. A file extension is a suffix separated from the file's base name with a period (for example, BASE.TXT). The period in the file extension is not a valid character in PDS member names, so UDM must be instructed to remove the file extensions before copying them into the PDS.

The truncext attribute is used to instruct UDM to remove file name extensions from the source file prior to using the name as the destination member name.

This example assumes that the remote UNIX directory /opt/app/data contains the following list of files:

The result of the copy operation will create the following members in PDS APP.DATA.PDS:

  • DATA001
  • DATA002
  • DATA003

DD File System

//S1     EXEC UDMPRC
//APOUT  DD DSN=APP.DATA.PDS,DISP=SHR
//UNVSCR DD *
1  set  _echo=yes _halton=warn
2  open  unix=sol9 user=top098 pwd=p100m
3  filesys  local=dd
4  cd  unix=/opt/app/data
5  mode  type=text
6  attrib  local truncext=yes
7  copy  unix=*.txt local=apout
8  quit  /*

DSN File System

//S1     EXEC UDMPRC
//UNVSCR DD *
1 set _echo=yes _halton=warn
2 open unix=sol9 user=top098 pwd=p100m
3 cd unix=/opt/app/data
4 mode type=text
5 attrib local truncext=yes
6 copy unix=*.txt local='app.data.daily'
7 quit 
/*

Components

Universal Data Mover Manager for z/OS