MDTGTSUM - MD RFP Target Location Summary command
Command MDTGTSUM in library MDCMS(env) provides the ability to summarize the status of some or all target locations for the send of an RFP.
Each MDTGTSUM execution and result is logged in MDCMS/MDDTSUM.
Each result can also be passed to a routine of type command, java or program in JSON format for further processing.
MDTGTSUM Parameters
| Name | Type | Length | Description |
|---|---|---|---|
| Name | Type | Length | Description |
| APPL | CHAR | 6 | Application Code - required value |
| RFP | INTEGER | 7 | RFP Number - required value |
| LOC | CHAR | 10 | The Target Location to include in the summary *ALLDFT = All target locations defined for the RFP's level that have the Default to Send property set to Y=Yes or M=Yes for Manual Send. *ALL = All target locations defined for the RFP's level |
| LOCGRP | CHAR | 10 | The Location Group to include in the Summary. MDCMS will only send to locations that meet the value for parameter LOC and LOCGRP. *ALL = the locations to send to aren't limited to a specific group |
| RTNTYP | CHAR | 5 | The type of routine to invoke and pass the summary result to. *NONE = A routine won't be invoked with the result. The result will only be written to a record in table MDDTSUM. *CMD = Invoke a command with the JSON result. The command must consist of 1 character parameter of length 5800 with the keyword of RESULT. *JAVA = Invoke a Java class or JAR file. The parameter type (PRMTYP) must be *FILE when using java. The file path is passed as a single argument to the java class. *PGM = Call a program. 1 character parameter of length 5800 will be passed that contains the result in JSON format. |
| RTNPTH | CHAR | 160 | The path to the routine, if the routine type isn't *NONE. When type = *CMD, the path should be the command name or library name/command name and nothing else When type = *JAVA, the path should be the full IFS path of the java class or JAR file, including the file name. When type = *PGM, the path should be the program name or library name/program name and nothing else |
| PRMTYP | CHAR | 7 | The type of parameter that is passed to the command, java class or program. *STRING = The JSON structure is passed as a string. If the routine type (RTNTYP) is java, *STRING is invalid and *FILE will be used automatically. *FILE = The JSON structure will be written to an IFS file in the directory defined in parameter File Directory (FILDIR). The file name is generated automatically with naming pattern: mdtgtsum_ the path of the file, including the directory and name, are passed to the routine instead of JSON string itself. The routine can then work with the file directly. |
| FILDIR | CHAR | 160 | If the Parameter Type (PRMTYP) is set to *FILE, the IFS directory where the file should be written is to be provided here. The directory must already exist when the command is invoked. |
| ENV | CHAR | 4 | Specifies the MDCMS environment that should be used to place the Request. The ID correlates to the suffix of the MDCMS library name. For example, TEST correlates to library MDCMSTEST. *CUR = the current environment - recommended when invoking this command from an MDCMS exit point. *DFT = The default environment will be used. This correlates to library MDCMS. |
| EMSG | CHAR | 7 | Specifies if and to what extent an exception message should be returned to the calling program. An exception message occurs when an input parameter value is invalid, causing the addition of the request to fail. *DIAG = A diagnostic message will be placed in the calling program's message queue in the following format: MDSBMRFP Exception. Object= *ESCAPE = The full diagnostic message as described above will be placed in the calling program's message queue and then followed by escape message CPF0001 for which the calling program can monitor. *NONE = An exception message will not be returned to the calling program's message queue. |
Example of the JSON Format of the MDTGTSUM result
{
"application": "EXAM",
"level": 50,
"RFP": 1234567,
"RFPDescription": "Example RFP sent to 2 locations",
"locations": [
{
"id": "LOC1",
"targetLevel": 60,
"targetRFP": 5959,
"severity": 10,
"status": "INST"
},
{
"id": "LOC2",
"targetLevel": 65,
"targetRFP": 6162,
"severity": 20,
"status": "IWRN"
}
],
"maximumSeverity": 20,
"projects": [
{
"id": "PROJ1",
"task": 1565,
"subtask": 0
},
{
"id": "PROJ3",
"task": 0,
"subtask": 0
}
]
}
Severity values:
10=Ignored or Installed without Warnings
20=Installed with Warnings
25=Still Ongoing
30=Terminated due to Error