Send Objects Using FTP (SENDOBJ)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Send Objects Using FTP (SENDOBJ) command Creates a Save File containing the objects specified on the OBJ parameter and then transfers that save file to a remote location using the FTP protocol. It optionally issues an FTP remote command (RCMD) that runs the RSTOBJ command on the remote system to restore the objects. It uses the COZTOOLS' FTPFILE command under the covers to send the save file.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
RMTSYS Send to remote system or IP Character value Required, Positional 1
USER Remote User profile Name, *CURRENT Required, Positional 2
PWD Remote password Character value, *USER Required, Positional 3
OBJ Object(s) Single values: *ALL
Other values (up to 300 repetitions): Generic name, name
Required, Positional 4
LIB Library Name Required, Positional 5
OBJTYPE Object type(s) Single values: *ALL
Other values (up to 300 repetitions): Character value, *GPM, *PF, *DSPF, *PHY, *LGL
Optional, Positional 6
SAVF Save file options Element list Optional, Positional 7
Element 1: Save file Qualified object name
Qualifier 1: Save file Name, COZSENDOBJ, *OBJ, *OBJLIB
Qualifier 2: Library Name, QTEMP, QGPL
Element 2: Clear existing save file *CLEAR, *REPLACE, *YES, *NONE
TGTRLS Target Release for SAVOBJ Character value, *CURRENT, *PRV Optional, Positional 8
RESTORE Restore objects after transfer *NO, *YES Optional, Positional 9
RSTLIB Restore to library Name, *SAVLIB Optional, Positional 10
DTACPR Data compression *DEV, *NO, *YES, *LOW, *MEDIUM, *HIGH Optional, Positional 11
SAVACT Save while active *NO, *YES, *LIB, *SYNCLIB, *SYSDFN Optional, Positional 12
SAVACTWAIT Save active wait time Element list Optional, Positional 13
Element 1: Object Locks wait (seconds) 0-99999, 120, *NOMAX
Element 2: Pending record changes 0-99999, *LOCKWAIT, *NOCMTBDY, *NOMAX
Element 3: Other pending changes 0-99999, *LOCKWAIT, *NOMAX
SAVACTMSGQ Save while active msg queue Qualified object name Optional, Positional 14
Qualifier 1: Save while active msg queue Name, *NONE, *WRKSTN
Qualifier 2: Library Name, *LIBL, *CURLIB
ALWOBJDIF Allow object differences Single values: *NONE, *COMPATIBLE, *COMPAT, *ALL, *YES
Other values (up to 4 repetitions): *AUTL, *FILELVL, *OWNER, *PGP
Optional, Positional 15
MBROPT Data base member option *MATCH, *ALL, *NEW, *OLD Optional, Positional 16
OMITOBJ Objects to omit Values (up to 300 repetitions): Element list Optional, Positional 17
Element 1: Object Qualified object name
Qualifier 1: Object Generic name, name, *ALL, *NONE
Qualifier 2: Library Generic name, name, *ALL
Element 2: Object type Character value, *ALL
Element 3: Object attribute Generic name, name, *ALL
PASV Passive mode *AUTO, *ACTIVE, *PASV, *EPASV, *NONE, NONE, *NO Optional, Positional 18
UPDHST Update save history *NO, *YES Optional, Positional 19
Top

Send to remote system or IP (RMTSYS)

Specifies remote location name or IP address where the save file is sent. This value must exist in your DNS or your HOSTS file (CFGTCP option 10) or an IP address must be used.

This is a required parameter.

character-value
Specifies the remote location to connect with.
Top

Remote User profile (USER)

Specifies the user profile (user ID) used by FTP to log onto the remote location.

This is a required parameter.

*CURRENT
The User Profile of the user running the command is used as the FTP user ID.
name
Specify the user profile id that FTP should use to log onto the remote location.
Top

Remote password (PWD)

Specifies the FTP password for the remote user ID. If this is another IBM i system, then the User ID's FTP password is the same as their standard user profile password when signing on via 5250.

This is a required parameter.

*USER
When PWD(*USER) is specified, the User Profile specified on the USER parameter is used as the FTP password.
character-value
Specify the FTP password for the user profile specified on the USER parameter.
Top

Object(s) (OBJ)

Specifies a list of one or more objects to be transferred to the remote location. Full, generic or *ALL names are supported.

This is a required parameter.

Single values

*ALL
All the objects in the library specified on the LIB parameter are saved and transferred to the remote location.

Other values (up to 300 repetitions)

generic-name
Specify the generic name of the objects to be transferred to the remote location. Up to 300 generic object names may be specified.
name
Specify up to 300 individual object names to be transferred to the remote location.
Top

Library (LIB)

Specifies library containing the objects to be transferred.

This is a required parameter.

name
Specify the name of the library containing the objects identified on the OBJ parameter. By default, this is the same library into which the objects are restored when RESTORE(*YES) is specifed and the RSTLIB parameter is not specified.
Top

Object type(s) (OBJTYPE)

Specifies the object types to be transferred or the special value *ALL to indicate that all object types that match the object names specified on the OBJ parameter are transferred.

Single values

*ALL
Objects of any type are included in the save/transfer option.

Other values (up to 300 repetitions)

character-value
Specify the objects types to be transferred to the remote location. Any of the valid IBM i object types may be specified.
*GPM
A special value that, when specified translates to *PGM.
*PF
A special value that, when specified translates to *FILE.
*DSPF
A special value that, when specified translates to *FILE.
*PHY
A special value that, when specified translates to *FILE.
*LGL
A special value that, when specified translates to *FILE.
Top

Save file options (SAVF)

Specifies name of the save file where the objects are saved for transfer to the remote location. NOTE: When this save file is sent to the remote location, it replaces any existing save file with the same name in the same library as this save file.

Element 1: Save file

Qualifier 1: Save file

COZSENDOBJ
The default save file name is COZSENDOBJ (Cozzi Tools Send Object) in the QGPL library.
*OBJ
The save file name is the same as the first object on the list of object names. If the first object is a generic name, the asterisk is stripped off the name and the resulting name is used as the save file name.
*OBJLIB
The library name specified on the LIB parameter is used as the save file name.
name
Specify the name of save file to be created and into which the objects specified on the OBJ and LIB parameters are saved.

Qualifier 2: Library

name
Specify the name of library into which the save file is created.

Element 2: Clear existing save file

*CLEAR or *YES
If the save file exists, it is cleared before the save operation is performed. *REPLACE, *CLEAR and *YES and *ALL are substancially similar operations and provide for compatability with IBM SAVOBJ commands and user preferences.
*REPLACE
If the save file exists, it is deleted and a new one is created before the save operation is performed.
*NONE
The save file is not cleared before the save operation is performed. If the save operationg encounters data in the save file, and inquiry message is sent to the user, requesting they decide with to cancel or clear the save file and proceed with the save operation.
Top

Target Release for SAVOBJ (TGTRLS)

Specifies IBM i release level for the save operation. This option controls the earliest release on which the saved objects may be restored. If the objects are not compiled to at least this target release level, the save operation will skip those objects.

*CURRENT
Objects that may be saved/restored at the current IBM i operating system level are saved.
*PRV
Objects that may be saved/restored at the IBM i operating system level one earlier than the current release level on the system where the save operation is being performed, is used as the target release level.
character-value
Specify the earliest target release level for the objects that are saved with this command.
Top

Restore objects after transfer (RESTORE)

Specifies whether objects saved and transferred to the remote system are restored onto that remote system after being transferred.

*NO
Objects are not restored after the save file is transferred to the remote system.
*YES
Objects are Restored via the RSTOBJ command onto the remote system. The SENDOBJ command uses the FTP RCMD statement to send a RSTOBJ command to the remote system, to perform the restore operation.
Top

Restore to library (RSTLIB)

Specifies the library into which the saved objects are restored when the RESTORE(*YES) parameter is specified.

*SAVLIB
By default, the same library from which the objects are saved, is the library into which they are restored.
name
Specify the name of a different library into which the saved objects are restored.
Top
Top

Save while active (SAVACT)

Specifies the amount of time to wait for an object that is in use, or for transactions with pending changes to reach a commit boundary, before continuing the save operation.

*NO
Objects that are in use are not saved. Objects cannot be updated while being saved.
*LIB or *YES
Objects in a library can be saved while they are in use by another job. All of the objects in a library reach a checkpoint together and are saved in a consistent state in relationship to each other.
*SYNCLIB
Objects in a library can be saved while they are in use by another job. All of the objects and all of the libraries in the save operation reach a checkpoint together and are saved in a consistent state in relationship to each other.
*SYSDFN
Objects in a library can be saved while they are in use by another job. Objects in a library may reach checkpoints at different times and may not be in a consistent state in relationship to each other.
Top

Save active wait time (SAVACTWAIT)

Specifies the amount of time to wait for an object that is in use, or for transactions with pending changes to reach a commit boundary, before continuing the save operation.

Element 1: Object Locks wait (seconds)

120
The system waits 120 seconds for each object lock.
*NOMAX
The system waits forever for each object lock.
0-99999
Specify the number of seconds to wait for each individual object lock before continuing the save operation.

Element 2: Pending record changes

*LOCKWAIT
For help on this option see the SAVOBJ command helptext.
*NOCMTBDY
For help on this option see the SAVOBJ command helptext.
*NOMAX
For help on this option see the SAVOBJ command helptext.
0-99999
For help on this option see the SAVOBJ command helptext.

Element 3: Other pending changes

*LOCKWAIT
For help on this option see the SAVOBJ command helptext.
*NOMAX
For help on this option see the SAVOBJ command helptext.
0-99999
For help on this option see the SAVOBJ command helptext.
Top

Save while active msg queue (SAVACTMSGQ)

Specifies the message queue that the save operation uses to notify the user that the checkpoint processing for a library is complete. A separate message is sent for each library to be saved when the *SYSDFN or *LIB value is specified for the Save active (SAVACT) parameter. When *SYNCLIB is specified for the SAVACT parameter, one message is sent for all libraries in the save operation.

Qualifier 1: Save while active msg queue

*NONE
For help on this option see the SAVOBJ command helptext.
*WRKSTN
For help on this option see the SAVOBJ command helptext.
name
For help on this option see the SAVOBJ command helptext.

Qualifier 2: Library

*LIBL
For help on this option see the SAVOBJ command helptext.
*CURLIB
For help on this option see the SAVOBJ command helptext.
name
For help on this option see the SAVOBJ command helptext.
Top

Allow object differences (ALWOBJDIF)

Specifies whether or not to include the ALWOBJDIF parameter on the remote RSTOBJ command. This parameter is ignored when RESTORE(*NO) is specified. This parameter specifies whether differences are allowed between the saved objects and the restored objects.

Single values

*NONE
Objects being restored must be at the same level as those that exist on the system or they are not restored. New objects are restored.
*COMPATIBLE or *COMPAT
This allows objects with differences to be restored. This is the recommended choice when differences exist, verses using *ALL which is a wholesale replacement.
*ALL or *YES
The objects are restored regardless of any differences they may have. When this option is selected, the Database File option of MBROPT must also be specified, even if no database files are being restored. This is a RSTOBJ restriction, not a SENDOBJ issue.

Other values (up to 4 repetitions)

*AUTL
Authorization list differences are allowed.
*FILELVL
File level id and member level id differences are allowed.
*OWNER
Object owner differences are allowed.
*PGP
Primary group user profile differences are allowed.
Top

Data base member option (MBROPT)

Specifies, for database files that exist on the system, which members are restored. If *MATCH is used, the member list in the saved file must match, member for member, the current version on the system. All members are restored for files that do not exist when the file is restored.

Note that when ALWOBJDIF(*ALL) is specified, MBROPT(*MATCH) is not allowed, even when no database files are being restored.

*MATCH
The saved members are restored if the lists of saved members match the list of member in the exsting file. If the file is new, this parameter is effectively ignored.
*ALL
All members in the saved file are restored.
*NEW
Only new members (those not in the existing database file) are restored.
*OLD
Only existing members (those that exist in both the saved database file and the existing database file) are restored.
Top

Objects to omit (OMITOBJ)

Specifies a list of objects to excluded from the save operation.

You can specify 300 object or generic object names for this parameter.

Element 1: Object

Qualifier 1: Object

*NONE
No objects are excluded from the save/restore operation.
*ALL
All objects in the given library of the specified object type are excluded.
generic-name
Objects whose names begin with the specified character pattern and match the object type are excluded from the save/restore operation.
name
Specify the name of 1 or more objects that are excluded from the save/restore operation.

Qualifier 2: Library

*ALL
Specify the library name that contains the excluded object. For the SENDOBJ command, only one library is used for the SAVE portion of the operation, therefore this parameter's influence on the save/restore operation is based on the value specified for the SAVLIB parameter.
generic-name
Specify the generic name of a library that contains the objects to be excluded.
name
Specify the name of library that contains the objects to be excluded. For the SENDOBJ command, only one library is used for the SAVE portion of the operation, therefore this parameter's influence on the save/restore operation is based on the value specified for the SAVLIB parameter.

Element 2: Object type

*ALL
All object types that match the specified object name are excluded.
character-value
Specify the IBM i Object Type, including but not limited to: *FILE, *PGM, *CMD, *SRVPGM, *MENU, etc.

Element 3: Object attribute

*ALL
The object subtype ("Object Attribute") is not used to exclude objects.
attribute
Specify the object attribute of the objects to exclude. This parameter primarily works with *FILE object types. Where PF, LF, DSPF and SAVF are considered files. But can also be used to excluded objects with other types, such as RPGLE, SQL*, CLLE, etc.
Top

Passive mode (PASV)

Specifies the FTP transfer mode. Normally Passive Mode is customarily used when transferring with FTP. However, some networks or routers require the use of ACTIVE FTP mode. This parameter allow you to send or avoid sending the PASV or EPASV commands to the remote FTP server.

*AUTO
The mode is decided by the two computers sending and receiving the data. Typically this will default to Passive mode if the hardware is up to date.
*ACTIVE or *NONE
Active mode FTP transfer is used. This is typically much slower but allows the transfer to work with older equipment.
*PASV
This is the perferred transfer mode for FTP. It is typically faster than Active mode as it allows more than one port to be used for the transfer.
*EPASV
Extended Passive mode is used. This is an IBM i protocol but is not widely implemented.
Top
Top

Examples

None
Top

Error messages

Unknown
Top