TCP/IP
Solutions Provided
SolveWare subject TCP/IP contains the File Transfer to Another System solution. This solution facilitates file transfer to another system and sets a prerequisite condition (to be referenced by Control-M) upon successful completion of the transfer.
File Transfer to Another System
This solution facilitates file transfer to another system and sets a prerequisite condition (to be referenced by Control-M) upon successful completion.
FTP software must be present on all systems to be accessed. This solution contains a REXX procedure used to interact with the FTP software. The Control-O server used to run the REXX procedure in this solution must have a region size of at least two megabytes.
Rules
The File Transfer to Another System solution includes the Send a File using FTP rule.
Rules Structure
The following tables describe the structures of the File Transfer to Another System solution rules, as well as the following REXX procedure:
-
FTP File "Put"
Table 153 Send a File using FTP Rule Structure
Item |
Description |
---|---|
Title |
Send a File using FTP |
Name |
CTOFTPPT |
Table |
TCP/IP |
DO RULE |
CTOFTPPT destination |
DO RULE Description |
The DO RULE statement that triggers this statement must contain the arguments shown above. |
Basic Scheduling Parameters |
Always schedule this rule. |
Runtime Scheduling Parameters |
No special considerations. |
Global Variables |
None. |
Rule Logic |
The rule is triggered by a DO RULE statement in another rule. Rule arguments are parsed and a REXX procedure is invoked. (Rule arguments are described in detail in "Customization" below.) If a return code of 0 is returned from the REXX procedure, the specified condition is set. Otherwise, a message to the operator is issued. |
Rule Actions |
|
Activating the Rule |
Once scheduled, the rule remains active until deleted from Control-O. |
Recommended Mode or Category |
During the testing period activate the rule in LOG mode. When you are satisfied with the results of the rule, change the mode to PROD to avoid log messages for the rule. SolveWare Category for this rule is 1—minimal or no customization is required. |
Customization |
The following arguments must be specified in the DO RULE statement that invokes this rule:
|
Table 154 FTP File "Put" REXX Procedure Structure
Item |
Description |
---|---|
Title |
FTP File "Put" |
Name |
CTOFTPPT |
REXX Script Description |
This script opens a connection to the destination host system and transfers a specified file using that connection. |
Activating the Script |
This REXX procedure is activated using rule CTOFTPPT in this solution. |
Parameters |
Parameters destination, local-file and foreign-file are passed as arguments from the rule that activated this REXX procedure. The value of parameter userid is extracted from AutoEdit variable %%$USERID. |
Special Considerations |
|
The script allocates a password file, named userid.NETRC (where userid is the value in %%$USERID as explained above), which is read by the FTP software. Since this file contains sensitive information, it must be protected by on-site security software. The structure of this file is: MACHINE sys1 LOGIN usera PASSWORD passa. MACHINE sys2 LOGIN userb PASSWORD passb. MACHINE sys3 LOGIN userc PASSWORD passc. where
|