ADDPRED
The ADDPRED instruction adds a predecessor operation to an occurrence in the current plan or in the long-term plan. It modifies the current plan or long-term plan, depending on the date and time specified or defaulted to. If the date and time being used is after the end of the current plan, then the modification will be made to the long-term plan instead of the current plan.
Table 1 describes the keywords that can be used.
Keyword | Requirement | Multiple Values Allowed | Description | Abbreviation | Format |
---|---|---|---|---|---|
APPL() | Required | No | The name of the application to be modified. | ||
OPNO() | Optional | No | The number of the operation to be modified. It defaults to the default operation number specified in the OCL program DEFOPNO. | OP | |
IADATE() | Optional¹ | No | The input arrival date of the application occurrence. IADATE(=) assumes the current date. IADATE() and IA() are mutually exclusive. | IAD | YYMMDD |
IATIME() | Optional¹ | No | The input arrival time of the application occurrence. If IADATE(=) is specified, IATIME() assumes the default input arrival time specified in the DEFIAT parameter of the EQQYRPRM member. IATIME() and IA() are mutually exclusive. | IAT | HHMM |
IA() | Optional | No | The input arrival date and time of the application occurrence. IA(=) assumes the current date and time. It defaults to the earliest or latest input arrival date and time of the application occurrence. occurrence found in the current plan, depending on the SORT parameter specified in PARMLIB or in the INIT instruction. IA() cannot be used with IADATE() or IATIME(). | YYMMDDHHMM | |
PREOPNO() | Optional | No | The predecessor operation number. It defaults to the default predecessor operation number specified in the DEFPREOPNO parameter of the EQQYRPRM member. | PO | |
PREAPPL() | Optional | No | The predecessor application name. It defaults to the application name specified in the application occurrence. | PA | |
PREIADATE() | Optional | No | The predecessor application input arrival date. It defaults to the date specified in IADATE(). | PIAD | YYMMDD |
PREIATIME() | Optional | No | The predecessor application time. It defaults to the time specified in IATIME(). | PIAT | HHMM |
Note: ¹
Mutually exclusive with another keyword. |
Examples:
- ADDPRED APPL(TEST01) OP(40) PA(TEST00)
- The default predecessor operation, DEFPREOPNO, of the application TEST00 will be added as a predecessor of the operation 40 of the application TEST01.
- ADDPRED APPL(TEST01) IAD(970708) OP(40) PO(90), PA(TEST00)
- The operation 90 of the application TEST00 will be added as a predecessor of the operation 40 of application TEST01 with the input arrival date 970708 and the input arrival time that corresponds to the default IA time, DEFIAT.
- ADDPRED APPL(TEST01)
- The default predecessor operation, DEFPREOPNO, of the application TEST01 will be added as an external predecessor of the default operation number, DEFOPNO, of the same application.
The ADDPRED instruction returns one of the following return
codes:
- RESULT = 0
- Predecessor dependency definition added.
- RESULT = 4
- Operation not found in the current plan.
- RESULT = 8
- Invalid instruction or PIF problem. Refer to the error messages.