Knowledge Base > Automation Engine and Target Systems > OS/400 > Agent for OS/400 - FileTransfer Support

OS/400 Agent - File Transfer Support

There are some peculiarities that must be considered when you use file transfers with an OS/400 agent.

You must start OS/400 agents of version 9.00A or later as a multi-threaded process in order to use the new file transfer protocol. Doing so requires the agent's JOBD parameter ALWMLTTHD to be set to "YES".

Note that IFS is only supported in combination with the new file transfer protocol.

The new file transfer is handled in threads which includes that you can only use the following file systems:

For the new file transfer protocol:
The OS commands CRTPF and ADDPFM are used to transfer the files. This means that you can now directly specify the CRTPF parameters in the file transfer's attributes.
CRTPF is used when you newly create a file. ADDPFM is processed when the file already exists and you only want to add a member.
An error that occurs in a file transfer that is not clear for AE (such as: "CPF0001 - Error found on ADDPFM command"). This can refer to an error that has occurred while these commands have been processed. In this case, you will find more detailed information in the job log which is directly stored in the OS.

File Specification

QSYS file system

The following syntax applies for file transfers:

Library name/file name(member name)

The wildcard characters * and ? can be used in file and member names. * stands for any number of characters (even no character) and ? for exactly one character.

No member name must be indicated if wildcard characters are used in the file name.

Detailed information about wildcards is provided in the chapter that describes partially qualified file transfers.

For example:

To transfer all file members of TEST:

AE/TEST(*)
or
AE/TEST()

To transfer all file members of TEST whose names start with the letter "A":

AE/TEST(A*)

To transfer all file members of TEST whose names consist of 3 characters, start with an "A" and end on "B":

AE/TEST(A?B)

To transfer the file member ABC of TEST:

AE/TEST(ABC)

To transfer all files whose names start with TEST:

AE/TEST*

IFS file system 

IFS (Integrated File System) is a UNIX-based file system. IFS files must always be specified with an absolute path (starting from the root) and a final file name.
If the file specification includes a / character, the agent assumes that an IFS file is concerned.

For example:

/home/AE/test.txt

The wildcard characters * and ? can be used to process partially qualified file transfers. They can be used as necessary within the path and/or file name.

In an individual file transfer, the path and file name are not case-sensitive. Therefore, the following two specifications are identical:

/home/AbC.txt
/HOME/ABC.txt

Uppercase and lowercase letters are distinguished in wildcard file transfers. The following two specifications differ from each other:

/home/AB*
/home/ab*

(Note: An exception is QOpenSys, here wildcard file event paths are not case-sensitive.)


Attributes

Depending on the file system, you can specify all attributes that are supported by OS/400 for the file transfer's destination. Note that you must separate several attributes with a comma. Invalid specifications are ignored.

QSYS file system

The OS/400 agent is able to transfer the file types *FILE and SAVF. Other ones such as *PGM, *RPG, *CLLE must be collected in SAVF files before they can be transferred. 

The following applies for SAVF file transfers: 

For all other files, the following applies:

You can use the option Keep original file attributes in the FileTransfer object in order to transfer the source's file attributes for the destination file(s). Doing so requires the source and destination agent to have the same operating system (in this case OS/400) and Automation Engine version 9.00A (or later). Otherwise, this setting will be ignored.

The following file attributes can be transferred:

The parameter order is irrelevant.

Examples:
This example creates a file with a record length of 256 bytes and enters the text 'FT File' as a description:
RCDLEN(256) TEXT('FT File')

The second example creates a file with a maximum number of members without a size limit and reuses deleted records:
MAXMBRS(*NOMAX) SIZE(*NOMAX) REUSEDLT(*YES)

Additionally, you can use the specific parameter TRIM=YES in the Attributes field of the file transfer's source. This option is not a real file attribute but a UC4-specific function. It automatically removes blanks that are used at the beginning and end of each line of the files that should be transferred. This option cannot be used in combination with the IFS file system.

Additionally, you can use the specific parameter TRIM=YES in the Attributes field of the file transfer's source. This option is not a real file attribute but an AE-specific function. It automatically removes blanks that are used at the beginning and end of each line of the files that should be transferred. This option cannot be used in combination with the IFS file system.

IFS file system:

The following two original IFS file attributes can be used in the destination file(s):

The following example creates a file with the codepage (ccsid) 550 which has the attribute READ-ONLY:
ccsid=550, readonly=YES

IFS: You can also pass the attributes of the original file on to the target file provided that this is defined in the FileTransfer object. The attributes "readonly", "hidden", "system" and "archive" can also be used across platforms or from Windows files. You can also override these attributes when you specify the target file. The attributes "ccsid" and "codepage" only apply to OS/400 files.

 

 

See also:

FileTransfer tab