Micropatterns to load the system date
The ADT and ADC micropatterns load the system date into a constant, and possibly a field indicated in the operands. The AD6 and AD8 micropatterns, which are specific to the OnLine Systems Development and Client/Server functions, load the system date into a field that is indicated in the operands.
Input format
*!ADX "XXXXXX"
where- *! is the required start tag of the micropattern. The
* must be entered in column 7, reserved for the comments in the COBOL code, and the
! must be entered in column 8.Note: If you press CTRL + space bar in the PDP COBOL editor, the content assist facility displays the list of the micropatterns that are adapted to the entity and to the position in the COBOL code (WORKING-STORAGE SECTION or PROCEDURE DIVISION). The micropatterns that are used only to retrieve the Pacbase data are not included in the list. Each micropattern in the list is documented. If you double-click one of them, the start tag and the identifier of the micropattern are inserted in the code. You must then complete its declaration.
- ADX is the micropattern identifier: ADT, ADC,AD6, or AD8.
- " " must frame the operands.
- XXXXXX is the operand. It is a field into which the system date is loaded. This operand is optional for ADT et ADC.
ADT and ADC micropatterns
These micropatterns can be inserted in the COBOL code of a Program, Screen, or Server with the PDP COBOL editor, or in the code of a Macro with the PDP Macro editor.
ADT calls the system date without the century. The date is loaded into the DATOR constant and possibly in the field that is indicated in the operands.
ADC calls the system date with the century. The date is loaded into the DATCE constant and possibly in the field that is indicated in the operands.
The Generated date format on the Library Definition specifies the format into which the system date will be displayed.
- The COBOL code that corresponds to the micropattern declaration after the start tag,
- The date-related data in the WORKING-STORAGE SECTION.
AD6 and AD8 micropatterns
These micropatterns can be inserted in the COBOL code of a Screen or Server with the PDP COBOL editor.
AD6 loads the system date into the six-character date entered as the operand. The date is loaded as MMDDYY or DDMMYY, according to the value of the Generated date format on the Library Definition.
AD8 loads the system date into an eight-character date that is entered as the operand. The date is loaded as MM/DD/YY or DD/MM/YY, according to the value of the Generated date format on the Library Definition.