This example transfers a local file to the host. The Xfr400Objects property is used to create a new member in an existing library and file. The host location is specified with XfrRemoteFile and the local file is specified with Xfr400LocalFile. The PCSSendFile method performs the transfer.

Sub CreateNewMember()

 With Session

  .Xfr400UseDescriptionFile = False

  .Xfr400MemberText = "Sample description."

  .Xfr400Objects = rcCreateMember

  .Xfr400HostFileType = rcAS400Source

  .Xfr400RemoteFile = "testlib/test(sample)"

  .Xfr400LocalFile = "C:\test\sample"

  .PCSSendFile "", rcYes

 End With

End Sub