![]() |
Copyright © Cloud Software Group, Inc. All rights reserved |
To perform these actions, you use the executeBeforeProcess and executeAfterProcess configuration parameters; these parameters are found in the FileType section, FILE_OPTIONS element in the configuration file for either FilePublisher or FileSubscriber.If you want to have a program called, you must include the IBM i command call as part of the parameter. If you specify a valid command or program name that is not in the FilePublisher’s or FileSubscriber’s library list, then you must include the library name in the parameter.
• FilePublisher When FilePublisher has a file that is to be published, FilePublisher executes the command or program. You must provide for a parameter that FilePublisher returns to the command or program. When FilePublisher executes the command, it supplies the name of the file that is to be published as a parameter.
• FileSubscriber When FileSubscriber has an output file to be generated, FileSubscriber executes the command or program. You must provide for a parameter that FileSubscriber passes to the command or call program. When FileSubscriber invokes the command, it passes the name of the file as a parameter.Suppose that you want to call a CL program named PROCFILE, which is in a library named PGMLIB, before you publish a file. In the FileType section, FILE_OPTIONS element of the FilePublisher configuration file, you would include the executeBeforeProcess parameter and include the file name, as follows:When the CL program is called, the CL variable &FILENAME contains the name of the library and the file that are to be published. For example, if the file to be published is FT111, and the library name of the output library is TIBRVOUT:
• FilePublisher When FilePublisher has finished publishing a file, FilePublisher executes the command or program. You must provide for two parameters that FilePublisher returns to the command or program. When FilePublisher executes the command or program, it supplies the name of the file that was published and the file status as parameters. The file name parameter passed includes the library name. The file status parameter is 0 if the file was published successfully, or 1 if there was an error publishing the file.
• FileSubscriber When FileSubscriber has finished generating an output file, FileSubscriber executes the command or program. You must provide for two parameters that FileSubscriber returns to the command or program. When FileSubscriber executes the command, it supplies the name of the file that was written and the file status as a parameter. The file name parameter passed includes the library name. The file status parameter is “0” if the file was processed successfully, or “1” if there was an error processing the file.
![]() |
Copyright © Cloud Software Group, Inc. All rights reserved |