DDS for printer files


DATE (Date) keyword in printer files

Use this field-level keyword to display the current date or the current system date as a constant field 6 or 8 bytes long. You can specify the location of the field, the DATE keyword, and optionally, the CDEFNT, CHRSIZ, COLOR, EDTCDE, EDTWRD, FNTCHRSET, FONT, HIGHLIGHT, UNDERLINE, or TEXT keyword. Positions 17 through 38 must be blank.

The format of the keyword is:

DATE([*JOB | *SYS] [*Y|*YY])

The *JOB value causes the current job date to be printed. If you do not specify a parameter, *JOB is used. The *SYS parameter causes the current system date to be printed.

If you specify *Y, 2 digits represent the year in the date format that the DATFMT job attribute designates. If you specify *YY, 4 digits represent the year in the date format that the DATFMT job attribute designates. If you do not specify a parameter, *Y is specified by default.

The W edit code on the EDTCDE keyword returns a correctly formatted date only if a four digit year (*YY) is requested, and the job attribute DATFMT is YMD.

If you specify EDTCDE(Y) for a DATE field, separators are added according the date format of the DATFMT job attribute. For example, using EDTCDE(Y) when the DATFMT job attribute specifies *MDY changes the date from

mmddyy

to

mm/dd/yy

The slashes (/) represent the job attribute DATSEP at run time and the job attribute DATFMT determines the order of the month, day, and year. (DATFMT can be *SYSVAL, indicating that your program is to retrieve the date from the system value QDATFMT, or MDY, DMY, YMD, or JUL, where M=month, D=day, Y=year, and JUL=Julian.)

Field length depends on the following:

  1. The format of the DATFMT job attribute.
  2. Whether or not the date field includes separators. The EDTCDE keyword controls separators.
  3. The number of digits that represent the year. The DATE keyword controls the number of year digits.

If the DATFMT specified for the job is *JUL (Julian), you cannot use the EDTWRD keyword to edit the result.

Option indicators are not valid for this keyword. However, option indicators can be used to condition the field associated with this keyword.

Example:

The following example shows how to specify the DATE keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R REC01
     A                                  1 56
     A                                      DATE
     A  21                              2 56
     A                                      DATE(*JOB *Y)
     A  22                              2 56
     A                                      DATE EDTCDE(Y)
     A  23                              2 56
     A                                      DATE(*JOB) EDTCDE(Y)
     A  24                              2 56
     A                                      DATE(*SYS)
     A  25                              2 56
     A                                      DATE(*SYS *YY) EDTCDE(Y)
     A

The job date is printed without editing on line position 56.

The job date is also printed without editing if option indicator 21 is on. The job date is printed with editing if either option indicator 22 or 23 is on. The system date is printed without editing if option indicator 24 is on. The system date is printed with editing and a 4 digit year if option indicator 25 is on.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]