Job Management Partner 1/Software Distribution Client Description and User's Guide
The external program processing for collection is the processing that is started before or after remote collection. The external program processing for collection is divided into the external program processing before collection, which is executed before collection, and the external program processing after collection, which is executed after collection.
This subsection describes the procedure for using the external program processing for collection, notes on creating the external program processing for collection, and a creation example.
- Organization of this subsection
- (1) Procedure
- (2) Note on creating the external program processing for collection
- (3) Example of creating the external program processing for collection
(1) Procedure
To use the external program processing for collection:
- Create the program of the external program processing for collection.
Create the external program processing for collection to return the following return codes after the processing.
Normal end: 0
Abnormal end: Other than 0
- In the collection-information file, set the following attributes:
Use the absolute path name to specify the external program processing for collection.
APbeforeCollect path-name-of-external-program-processing-before-collection APafterCollect path-name-of-external-program-processing-after-collection
(2) Note on creating the external program processing for collection
- You can create the external program processing for collection in any directory. The path name must be 63 characters or less when the absolute path name is used.
- The data output by the external program processing for collection to the standard output or the standard error output is stored in /NETMRDS/rdsprm/CF.LOGF or /var/opt/NETMDMW/rdsprm/CF.LOGF (for HP-UX). To output this data to a console or other location, specify so in the external program processing for collection.
- Grant the execution permission for the external program processing for collection.
- When the external program processing for collection is executed, the standard input is allocated to /dev/null. Therefore, do not include the processing for data entry from the standard input in the external program processing for collection.
- No operand is specified when the external program processing for collection is started.
(3) Example of creating the external program processing for collection
The following shows an example for creating an external program processing for collection.
- External program processing before collection (/local/usr/etc/cat_files)
This processing combines multiple files and creates a single collected resource file (/tmp/DataFile).
- External program processing after collection (/local/usr/etc/logprint)
This processing deletes the collected resource file (/tmp/DataFile) created by the external program processing before collection and acquires the history of completed remote collection in the log file.
- Specifying the collection-information file
ResourceName DATA-FILE PathName /tmp/DataFile PathType RESOURCE : APbeforeCollect /local/usr/etc/cat_files APafterCollect /local/usr/etc/logprint
- Contents of the external program processing before collection
DATADIR=/local/usr/data /bin/cat $DATADIR/DataFile_1 \ $DATADIR/DataFile_2 \ $DATADIR/DataFile_3 >/tmp/DataFile exit $?
- Contents of the external program processing after collection
/bin/rm /tmp/DataFile DATE= '/bin/date' /bin/echo "Collection completed ($DATE)" >>/local/usr/data/CF_LOG exit 0
All Rights Reserved. Copyright (C) 2009, Hitachi, Ltd.