Century Parameter(-yy)

Cool_Dude_eh

New Member
currently our century parameter is set to -yy 1920.
This is starting to create some issues in our software(QAD)
What do I need to do to get to the default of -yy 1950
Is it just a matter of changing the client scripts?
Do I have to recompile all the code?

:confused:
 

Stefan

Well-Known Member
No, it is both a client and a server parameter.

The startup parameters do state that this is also a database server parameter but only talk about client application (as far as I can read it - and AppServers / WebSpeed agents are clients as far as I'm concerned). Dates are always stored in the database as some internal format, so how does a two digit year help the database server since there's always something else talking to it? Maybe for default behavior from a SQL92 client?

On the other hand, the manual writers and proof readers seems to have gotten a bit tired at the end of the manual since some very interesting dates come along:

For this reason, Progress Software Corporation recommends that you use four digit years for hard-coated dates in programs.

I wonder when I need a hard-coated date... maybe the database server needs them... ;)
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The manual might have been better worded as: "If you cannot avoid hard-coding a date, then don't use a two-digit year." Actually, it pretty much says this in the DB admin manual:

Note: If you use a hard-coded date containing a two-digit year in a .p file, the OpenEdge
RDBMS honors the -yy parameter and expands the two-digit year to a four-digit year
during compilation. However, this might not match the run time -yy. To prevent this
problem, use four digit years for hard-coded dates in programs.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
so how does a two digit year help the database server since there's always something else talking to it?

Well, it could be talking to you, so you need to agree on your language. The DBA could be dumping or loading a .d, which includes the date format, so the server can consistently convert between the internal on-disk format and the import/export format:

Code:
.
PSC
filename=mytable
records=0000000003245
ldbname=mydb
timestamp=2008/05/08-16:10:32
numformat=44,46
dateformat=mdy-1950             <-----
map=NO-MAP
cpstream=iso8859-1
.
0000305019
 

Stefan

Well-Known Member
Well, it could be talking to you, so you need to agree on your language. The DBA could be dumping or loading a .d, which includes the date format, so the server can consistently convert between the internal on-disk format and the import/export format:

Code:
.
PSC
filename=mytable
records=0000000003245
ldbname=mydb
timestamp=2008/05/08-16:10:32
numformat=44,46
dateformat=mdy-1950             <-----
map=NO-MAP
cpstream=iso8859-1
.
0000305019

A database does not dump or load ascii .d files - a progress client does, so I still fail to see what -yy does on a database server.

Just had a quick look at the structure of the startup parameter manual, the -yy parameter is not mentioned in the applicable parameters per location section - so there is no mention of -yy in the 'openedge database server parameters (dbs)' on page 63 and further.

So I think it really is a case of someone falling asleep while writing the last pages of the manual.
 
Top