Copy a File to a New IBM i Data Physical File

Copy a File to a New IBM i Data Physical File

This example copies, in text mode, a file from a remote UNIX system to a data physical file on IBM i. The Data Physical File does not exist on IBM i; UDM is instructed to create it.

The file type created defaults to a Data Physical File. The Data Physical File is allocated based on the local UDM allocation attributes. UDM provides default attributes that can be changed to meet local requirements. The UDM defaults, as delivered, create a Data Physical File with a logical record length of 92 and maximum members of 1.

This example changes the record length to 80, and the maximum members to unlimited (nomax), in order to demonstrate how to set allocation attributes.

LIB File System

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 rcdlen=80 maxmbrs=nomax
6 copy unix=data10.txt local=MYLIB/APPDATA(DAILY)
7 quit 

Almost all data set allocation attributes can be specified as UDM attributes giving you the ability to dynamically allocate any supported Data Physical File.

Care should be taken that conflicting allocation attributes are not specified. The results of the allocation should be checked to verify they meet your intentions. Although UDM checks attribute values, some values are provided by the system from sources that UDM cannot verify and can result in invalid or unintentional attribute combinations.

Components

Universal Data Mover Manager for IBM i