Special Information For Year 2000 Programming - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Developing Compaq COBOL Programs
1.5 Using Program Switches
On OpenVMS, to test the previous program on an OpenVMS Alpha system,
compile and link it and then type the following:
$ DEFINE COB$SWITCHES 12
$ RUN TSW
The output is as follows:
**TEST SWITCHES**
SWITCH 12 IS ON
**END**
To test the previous program on a Tru64 UNIX system, compile and link it and
then type the following:
% setenv COBOL_SWITCHES 12
% tsw
The output is as follows:
**TEST SWITCHES**
SWITCH 12 IS ON
**END**

1.6 Special Information for Year 2000 Programming

Even subsequent to the turn of the millennium, there still exist potential
disruptions in previously problem-free software where there are instances of a
two-digit year field that should be a four-digit field. Programmers need to correct
all such fields, as Compaq cannot prevent problems that originate in application
code.
Two-digit year formats used in controlling fields, or as keys in indexed files,
can cause program logic to become ambiguous. It is a fundamental rule to use
four-digit years instead of two-digit years in areas where sequential operations
are driven from these values or for comparison of these values.
Compaq COBOL provides programmer access to four-digit and two-digit year
formats:
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
2-digit
2-digit
1–62 Developing Compaq COBOL Programs
FUNCTION CURRENT-DATE
FUNCTION DATE-OF-INTEGER
FUNCTION DATE-TO-YYYYMMDD
FUNCTION DAY-OF-INTEGER
FUNCTION DAY-TO-YYYYDDD
FUNCTION INTEGER-OF-DATE
FUNCTION INTEGER-OF-DAY
FUNCTION TEST-DATE-YYYYMMDD
FUNCTION TEST-DAY-YYYYDDD
FUNCTION WHEN-COMPILED
FUNCTION YEAR-TO-YYYY
ACCEPT FROM DATE
ACCEPT FROM DAY

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents