18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Simple Form<br />

DATE.CONVERT (DC)<br />

In the next example, TRAN-DATE with the format YYMMDD is validated. GLB.STATUS<br />

will contain five asterisks (*****) if the date is invalid. There is no output conversion.<br />

<br />

The simple form of the DATE.CONVERT; command uses the System Data item<br />

GLB.TOTAL, and is based upon the fixed base date of January 1, 1957. The relative day<br />

number for the base date is zero.<br />

DATE.CONVERT; TO.DATE takes the relative day number from GLB.TOTAL, converts it to<br />

a date, and moves the result into the specified data item. DATE.CONVERT; TO.ALPHA<br />

works in the same way. With both variants, the form of the data item determines the form<br />

of the result date (alphanumeric or numeric form). For more details on valid edit types, see<br />

‘‘Data Item Formats’’, earlier in this section.<br />

DATE.CONVERT; TO.DAYNUMBER takes the date contained in the data item, converts it<br />

to a relative day number, and moves the result into GLB.TOTAL.<br />

If the date involved is invalid, GLB.STATUS is set to *****. Alternatively, the GLB.STATUS;<br />

command may be used to direct the result to a data item. It is important to test for an error<br />

whenever the DATE.CONVERT; command is used.<br />

Syntax of the Simple Form<br />

Restrictions<br />

DDD DDBDD DDBDD DD4<br />

3 3<br />

CDDDD DDDDD4<br />

3 3<br />

@DDDD DDDDY<br />

You cannot use the simple form of the DATE.CONVERT; command with:<br />

$ 8-digit dates<br />

$ Hankaku-Katakana characters<br />

The handling of signed numerics in Group items by the DATE.CONVERT; command varies,<br />

depending on the compiler implementation. If you use numeric items within a Group for<br />

handling dates, they should be unsigned.<br />

v 1-81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!