Note: The CHECK command is only available in the Cleo Harmony and Cleo VLTrader applications.
There are times when you might need to track certain events or non-events. In some cases, these requirements might come from Service Level Agreements (SLAs) that you have with your trading partners, where a given delivery performance is part of the contract. In other cases, you might want to trigger another event. In the context of the Cleo Harmony or Cleo VLTrader system, this relates to the presence and movement of files and directories. The Cleo Harmony or Cleo VLTrader file/directory/transfer checking feature accommodates this capability through the CHECK command.
The CHECK command provides a way for you to check whether certain internal or external file movement has occurred within expected time periods and within given optional criteria. For example, you can check for the following conditions:
- if an expected inbound transfer has occurred within a specified period
- if an expected outbound transfer has not occurred within a specified period
- if a file is older than a specified age
- if a directory is not older than a specified age
If the CHECK conditions are met, you can use the Execute On Check Conditions Met
property to trigger subsequent events or you can use the Email On Check Conditions Met
to send email to key personnel. Conversely, if the CHECK conditions are not met, you can use the Execute/Email On Check Conditions Not Met
properties. Note that there are no inherent pass/fail or success/error assumptions within the CHECK command. You have complete flexibility to specify the conditions for which you are looking; and, when the those conditions are met or not met, you can decide what action to take.
CHECK command advanced properties
The following properties are specific to the CHECK command. See Setting advanced host properties for a description of these properties.
Email On Check Conditions Met
Email On Check Conditions Not Met
Execute On Check Conditions Met
Execute On Check Conditions Not Met
- For the
Execute On Check Conditions Met
property, if multiple files contribute to the conditions being met, and one of the following file macros is in the system command, the command will be executed repeatedly—once for each file.%file%
%sourcefile%/%srcfile%
%sourcefilebase%/%srcfilebase%
%sourcefileext%/%sourcefileext%
%destfile%
%destfilebase%
%destfileext%
%filesize%
- The macros listed above are not available to
Execute On Check Conditions Not Met
.
See Using Macro Variable (Execute-On context).
CHECK command dialog
The Edit Command dialog box for the CHECK command is very similar to other command dialogs. However, because of its complexity, additional wizard dialogs are provided to aid in building a CHECK command. See also Compose an Action and Composing a host action
The CHECK command dialog box provides access to the many Option and Parameter settings available. They can be very powerful and can provide you with great flexibility in building your checks. For information about the Option settings, see CHECK command reference. For information about Parameter settings, see CHECK command parameters. For all parameters, if you mouse-over the associated Value cell, you will receive a brief tool-tip help message regarding the parameter.
CHECK -TRA (transfer):
CHECK -FIL (file):
CHECK -DIR (directory):
CHECK command parameters
- OccurredWithin
- Required for the transfer (-TRA) option. Indicates the time period in which the transfer for which you want to check should have occurred. The value or OccurredWithin can either be expressed explicitly as "
nn[D|H|M|S]
, where nn is a number from 1-99 and the letter following indicates days, hours, minutes, or seconds; or it can be the keyword "Yesterday" or "Today". - Age
-
This parameter is required for the file (-FIL) and directory (-DIR) options. It specifies the age condition for which the files/directories should be checked. The value of Age may be of the form "[<|>]nnn[D|H|M|S]" where nnn is a number from 0-999 and the letter following indicates days, hours, minutes, or seconds. The "<" or ">" symbol must be present to indicate whether the check is looking for ages greater than or equal to, or less than or equal to, the specified age. For example, "Age=>24H" indicates the check should look for files/directories equal to or older than 24 hours. The value of Age can also be "[<|>]Yesterday" or "[<|>]Today".
Notes:
1. To simply check for existence of a file/directory, use a parameter setting of ">0[D|H|M|S]". (It does not matter which unit is selected in this case.)
2. A parameter setting of "<0[D|H|M|S]", is really nonsensical because it is essentially looking for files/directories with future ages. This setting will be flagged as an error.
To enter this parameter, either type the string in directly or click on the cell to show the [Build...] button. The [Build...] button, if selected, will display the following wizard dialog that can be used to build the 'Age' parameter.
- Select 'Greater Than (>)' or 'Less Than (<)'.
- Select 'Today', 'Yesterday', or 'Custom'. If 'Custom' is specified, then enter a value between 0 and 999 and a unit (e.g., '10 Days' as shown above).
- To obtain a written translation of your settings, click on the [Test...] button. You will receive a dialog such as follows.
- Once you are satisfied with your settings, click the [OK] button.
- Class
- Subclass
-
These parameters, if specified, are for categorizing the result of the CHECK command (what is referred to as a “checkpoint”) within the Dashboards application SLA/KPI report.
-
Class – there are two settings for this parameter:
- SLA (Service Level Agreement) – verification of internal or external customer commitments
- KPI (Key Performance Indicator) – measurement for self-policing/self-improvement
- Subclass – this parameter is freeform and can be set to any value that has meaning within the business use case.
-
Class – there are two settings for this parameter:
- ConditionsMet
- This parameter, if specified, signals that records should be added to the transfer log when the CHECK command is executed (see Transfer Entries for CHECK Commands ). Further, this parameter indicates how to classify the result when the conditions are met. There are two settings for this parameter:
- Error - if the conditions of the CHECK are met, then the result should be classified as "Error". If the conditions of the CHECK are not met, then the result should be classified as "Success".
- Success - if the conditions of the CHECK are met, then the result should be classified as "Success". If the conditions of the CHECK are not met, then the result should be classified as "Error".
Note that the Advanced property, 'Terminate On Fail', is only honored if this parameter is set and the result of running the CHECK is classified as "Error". See Setting Advanced Host Properties for a description of 'Terminate On Fail'.
To enter this parameter, either type the string in directly or click on the cell to show a drop-down list containing available options from which you can select. If [ConditionsMet] is not specified, then the result will always be classified as "None", irrespective of whether the conditions were met or not. Also, the CHECK operation will not be added to the transfer log.
- Status
-
This parameter is only applicable to the transfer (-TRA) option. When checking for a transfer, it's possible to qualify the status of the transfer. There are three settings for this parameter:
- Delivered - this term applies to transfer statuses of 'Success', 'Warning', and 'Receipt Pending'. Although rarely seen, the 'Delete Error' and 'Delete Resolved' statuses are also included in this category.
- Completed - this term applies to transfer statuses of 'Success', and 'Warning'. Although rarely seen, the 'Delete Error' and 'Delete Resolved' statuses are also included in this category.
- Any this term applies to any transfer status, including 'Error', 'Exception', and 'Interrupted'.
To enter this parameter, either type the string in directly or click on the cell to show a drop-down list containing available options from which you can select. If [Status] is not specified, the default status is Delivered.
- Count
-
This parameter is applicable to all options (-TRA, -FIL, and -DIR). For -TRA, it indicates the minimum number of transfers records found that meet the CHECK conditions. Its value should be a number from 1-99999. For the -FIL and -DIR options, [Count] can either be the keyword, "All", or a number from 1-99999. If a number is specified, it indicates the minimum number of files/directories that should meet the CHECK conditions. If "All" is specified, it indicates that all files/directories that are found according to the path specification must meet the age criteria. This implies that if no files/directories are found according to the path, the conditions will also be met.
To enter this parameter, either type the string in directly or click on the cell to show a drop-down list containing available options from which you can select (the drop-down list is only available for -FIL/-DIR operations). If [Count] is not specified, the default value is one (1).
- Edi....
-
The [Edi....] parameters are only applicable to the transfer (-TRA) option and only when database transfer logging is enabled. They indicate additional (EDI) conditions that must be met for a particular transfer record. For the 'Edi.Interchange.Sender' and 'Edi.FunctionalGroup.Sender' parameters, the syntax is "EDI Sender:Qualifier", where Qualifier is optional. For the 'Edi.Interchange.Receiver' and 'Edi.FunctionalGroup.Receiver' parameters, the syntax is "EDI Receiver:Qualifier", where Qualifier is optional. For the 'EDI.Transaction.Type' parameter, multiple transaction types may be entered, separated by a semicolon (';') or comma (',').
If any of the [EDI...] parameters contain embedded spaces, the Edit Command dialog will automatically replace these with '\s'. Note that if you are keying the command in directly from the freeform editor on the Commands tab, you will be responsible for inserting '\s' for every embedded space. In general, when typing commands without the use of the Edit Command dialog editor, special escape sequences must be used to identify certain characters:
\s = space character
\t = tab character
\n = newline character
\r = carriage return character
\\ = slash character
To enter these parameters, either type the string in directly or, for the 'Edi…Sender' / 'Edi…Receiver' parameters, click on the cell to show the [Build...] button. The [Build...] button, if selected, will display the following wizard dialog that can be used to build the 'Edi…Sender' / 'Edi…Receiver' parameters.
If a Trading Partner Alias is selected along with ‘Use All Interchange Identifiers/Qualifiers’, then a trading partner alias variable will be used. This will match any of the Interchange Identifiers/Qualifiers configured for the Trading Partner. If ‘Use All Interchange Identifiers/Qualifiers’ is not selected, then the user can select a specific Interchange Identifier/Qualifier pair to be used. Once the selections have been made and the [OK] button is selected, then the selection will be placed in the appropriate field depending on which [Build…] button was selected.
CHECK command search scope
The CHECK -TRA command is available within any host, including the local user and local commands hosts. When run, its scope of search is determined by the host\mailbox from which it is run. For example, a CHECK -TRA command run from a mailbox-based action within 'Looptest FTP\myMailbox
' will search for transfers occurring within host, 'Looptest FTP', and mailbox, 'myMailbox'. Likewise, aCHECK -TRA command run from a host-based action within 'Looptest FTP
' will search for transfers occurring within any mailbox of host, 'Looptest FTP
'.
The CHECK -FIL or CHECK -DIR commands are also available in any host, including local user and local commands hosts. However, CHECK -FIL/-DIR commands are not tied to any specific host or mailbox. They may check for any file or directory within the file system.
CHECK command reference
Check to see if a transfer has occurred within a given specification, or check the age of file or directory.
CHECK –TRA|-FIL|-DIR -IN|-OUT -VER -REC "source" | "destination" | "path"
OccurredWithin= | Age=
[Class]=SLA|KPI
[Subclass]=
[ConditionsMet]=
[Status]=
[Count]=
[Edi.Interchange.Sender]=
[Edi.Interchange.Receiver]=
[Edi.FunctionalGroup.Sender]=
[Edi.FunctionalGroup.Receiver]=
[Edi.Transaction.Type]=
- -TRA
- Check that a transfer has occurred.
- -FIL
- Check a file age or existence.
- -DIR
- Check a directory age or existence.
- -IN
- Check an inbound transfer. This option is only applicable to
CHECK -TRA
operations. - -OUT
- Check an outbound transfer. This option is only applicable to
CHECK -TRA
operations. - -VER
- This option is only applicable to
CHECK -FIL
andCHECK -DIR
operations. In addition to loggingFILE
elements for files/directories that meetCHECK -FIL/-DIR
requirements, also log informationalFILE
elements for those files that match the path but do not meet the other requirements, for example, age. - -REC
- Recursively search all subdirectories. This option is only applicable to
CHECK -FIL/-DIR
operations. Note that it is the last path token (file or directory) that is searched for in recursive operations. "source"
-
Local source path for an outbound (
-OUT
) transfer check.- The path can be to a filename or to a directory.
-
*
and?
, or a regular expression, are supported in filename, as well as each level of the path. See Using wildcards and regular expressions for additional information. Wildcards are only available on the CHECK command. - The final token of the path should be explicitly specified, either as a specific name or a wildcard/regular expression.
- If you specify a relative path, it uses the default outbox for remote hosts and the user home directory for local user mailbox-based actions. For local user host-based actions, the default root directory is used.
- Macro variables are supported. See Using Macro Variables (Source File context) for a list of the applicable macros.
"destination"
-
Local destination path for an inbound (
-IN
) transfer check.- The path can be to a filename or to a directory.
-
*
and?
, or a regular expression, are supported in filename, as well as each level of the path. See Using wildcards and regular expressions for additional information. Wildcards are only available on the CHECK command. - The final token of the path should be explicitly specified, either as a specific name or a wildcard/regular expression.
- If you specify a relative path, it uses the default inbox for remote hosts and the user home directory for local user mailbox-based actions. For local user host-based actions, the default root directory is used.
- Macro variables are supported. See Using Macro Variables (Destination File context) for a list of the applicable macros.
If the path contains a space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("...").
"path"
-
Local path for a file/directory check.
- The path can be to a filename or to a directory.
-
*
and?
, or a regular expression, are supported in filename, as well as each level of the path. See Using wildcards and regular expressions for additional information. Wildcards are only available on the CHECK command. - The final token of the path should be explicitly specified, either as a specific name or a wildcard/regular expression. When a file (
-FIL
) path ends with/
or\
, a*
is automatically added to the path. - If you specify a relative path, it uses the default inbox for remote hosts and the user home directory for local user mailbox-based actions. For local user host-based actions, the default root directory is used.
- Macro variables are supported. See Using Macro Variables (Source File context) for a list of the applicable macros.
If the path contains a space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("...").
Comments
0 comments
Please sign in to leave a comment.