Deleting files after transfer – Nlynx ETU400 User Manual

Page 122

Advertising
background image

ETU400 User Guide 011603

9-18

Entry and Exit Programs

With the PWRFROM3XB and PWRTO3XB commands, you can run any user-defined

programs before and/or after the file is transferred. Programs that run

before the file transfer occurs are called entry programs. Programs that

run after the file is transferred are called exit programs.

To use the entry and exit programs, enter the name of the program and the

library in which it resides in the ENTRYPGM and EXITPGM parameters.

NOTE: Entry and exit programs do not have to be ETU programs.
Any program you can run on the AS/400 can be executed as an entry or exit

program. Remember that if you run a power command in batch mode, any
entry and exit programs must also be able to run in batch.

Example

Suppose you have a payroll file on the host that you want to transfer to

a PC. Before you transfer the file, you want to update it with current

payroll information by running a program that outputs to the payroll

file.

At the end of the file transfer operation, you want to run a program that

sends a message notifying the system operator that the file transfer is

complete.

Enter the file transfer and translation information as you would for any

file transfer, using the PWRFROM3XB command. In the ENTRYPGM parameter,

enter the name of the entry program to be run, along with the library in

which it resides. Do the same for the EXITPGM parameter.

When you execute the PWRFROM3XB command, the following events occur in

the order shown:

the entry program runs and updates the payroll file;

the file is transferred to the PC;

the exit program runs sending a message to the system operator.

Advertising