Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not sure if this is Clipper!?

Status
Not open for further replies.

MarkYoungIW

IS-IT--Management
Aug 17, 2004
12
GB
I provide IT support for our company, but I am not really a programmer (other that web design).

When I joined our company, our survey department was using a very old DOS database, which had been written for them by a programmer who has dissapeared!!

When we reached the millenium, the database started to cause trouble due to it only using 2 figure dates.

They still use the software, but struggle due to it not sorting by date properly anymore, and are always saying how useful it would be to get it fixed (and maybe into windows).

It is only now that I am transfering it to yet another computer I decided to try and find out why it only works if I put 'SET CLIPPER=v015;f255;r016;e000' in the Autoexec.bat

Does the above line mean it is written in clipper? Would it be easy to uncompile it and amend it to fix the millenium bug? And could it be ported into windows?

Any help would be very gratefully received.

Many thanks

Mark.
 
Oh, BTW. The database is called 'Skyline' just in case it was some sort of standard software.

Thanks

Mark.
 
I have tried decompiling one of the .exe's using Valkyrie Demo, and it analyised as Clipper Summer 87, but said that it couldnt recognise the linkers, so I tried Rescue 5 and that comes up with error 4,43 unrecoqnized .exe format.

Any ideas would be great.

Regards

Mark.
 
Hi, Mark.

Yes, it's Clipper.

Does Valkyrie have PLINK86 as a linker option?

If memory serves that was the default linker back then.

Not having source code may be a problem, depending on the code, decompiling can be quite successful. Whether or not it can readily be Y2K'd will depend on how dates are stored, but will require a lot of nitty little changes if dates are widely used in the system and especially if they are stored as character fields.

What is the application?

Jock
 
Hi Mark,

If you have the source or can decompile to source the fix is relatively simple. At the very beginning add the line:
SET CENTURY ON

Regards,

Mike
 
Mike,

SET CENTURY ON alone would help if the application doesn't have other Y2K-compromising things scattered everywhere, like CTOD() with hardcoded 2-digit-year dates, data entry screens with all the GETs and data formats with 2 digit only left for the year and CTOD right after, etc.

(I don't remeber all the details of Clipper, but I think I can dig out old applications, some of them being just like that - who thought back then that they will live past 1999. I guess, most of them didn't.)

Stella
 
Stella,

Yup, there are spacing issues on reports and on screen. At least the dbf already had been storing the 4 digit year.

I did confirm that ? CTOD("01/01/00") with century on errs with the output 01/01/1900. On the positive side, at least it didn't just kick me out.

Regards,

Mike
 
Send me the exe and I'll see what I can do.

email address: nocure AT hccnet DOT nl

Rob.
 
Mark,

FYI 'SET CLIPPER=v015;f255;r016;e000'
v015 - 15K allocated to memory variable table
f255 - 255 file handles
r016 - 16K allocated for buffers used in indexing and external programs ie. RUN command
e000 - no expanded memory allocated

Regards,

Mike
 
@JockMullin
I couldnt find any linker options in Valkyrie, it seems to use Blinker as default. I have had a look round the net trying to find a decompiler specifically for Summer 87, but had no luck.

@rob444
I have sent you a copy of the .exe's. Many thanks for looking at this for me.

@All
After importing the .dbf's into Access, all the dates are 4 figured, so somewhere along the line, it must be something in the program.

Thanks for all your help with this.

Regards

Mark.
 
Mike,

I did confirm that ? CTOD("01/01/00") with century on errs with the output 01/01/1900. On the positive side, at least it didn't just kick me out.

Yes, I know that. In the late 90s for about 2 years I took part in conversion of multiple legacy applications for the coming Y2K. They were in FoxPro for DOS, but most of the issues were about the same. First, we identified points of risk by extensive testing of different date handling aspects (and CTOD() use was one of them), then wrote special programs to assist ourselves in further tasks (scanning the PRGs for occurrence of those points of risk, sorting them in order of descending risk factors, fixing them automatically whenever possible, then manually one by one, etc.)


Mark,
After importing the .dbf's into Access, all the dates are 4 figured
Of course they are, if they stored as dates and not as character strings. The way Clipper Summer '87 (and all xBase family) stores dates requires them to be complete dates (they could display as 2-digit depending on settings). It's how they are interpreted and handled, that's what matters. If, for example, data entry of your application allows users to enter only 2 digits, chances are if they entered 04 the date stored in the table will have year 1904. Therefore, incorrect sorting order and other problems.

Stella
 
Having dates stored as date fields helps a lot. However some db designs have used char fields which is a real problem.

Unfortunately Summer '87 didn't support the SET EPOCH, which can be a 1 line fix in many clipper 5 apps.

If source code can be found or rebuilt then try compiling under clipper 5 - it may or may not work, usually depending on the size of the symbol table. If it does then set epoch and date input problems are solved. CTOD has always worked if you supply the full 4-char year. Leaving century off avoids spacing problems on screens and reports.

If it won't compile under clipper 5 then you will be faced with a lot of changes when dates are input, which as Stella says can be a real pain.

You heard the one about the corpsicle who gets revived in the year 9999? He asks why they revived him after all this time and is told "we understand you know Clipper".

Jock
 
Jock,

You heard the one about the corpsicle who gets revived in the year 9999? He asks why they revived him after all this time and is told "we understand you know Clipper".

Where I read it it was Cobol. Here is just a few:


But a Clipper programmer could face a similar problem, I guess.

Stella
 

Jock,

By the way, your last post doesn't show your handle. In the last couple of days I've already seen this on another forum. Weird. Could be due to all the changes.

 
Hi, Stella

Yeah, I noticed I attained nonentityhood. Don't know how that happened, but after I submitted ALL the threads in the forum showed as *NEW*, so I figured it forgot who I was.

I know it was really Cobol, but that would be off-topic (grin). Besides, I wouldn't want to admit I know Cobol(or Fortran II, or Algol, or Lisp) - that would be showing my age.

Thanks for the links.

I will now try for the third and last time to submit this response. If all three subsequently appear, I deny all responsibility. But something wierd seems to happen when I submit post ("page cannot be displayed").

Jock
 

Jock,

Yes, I noticed what you describe. It kind of did forget you; it has thrown you out as a logged in member, but left you in the forum as a guest. I had to log in again. (I don't use "Remember me" option.)

But something wierd seems to happen when I submit post ("page cannot be displayed").
Noticed that one, too. Had to go back one step, copy my post to MS Word, log in back, then repost it from Word.

Besides, I wouldn't want to admit I know Cobol(or Fortran II, or Algol, or Lisp) - that would be showing my age.
Not to me. I grew up and went to school not in USA (where I live now), so the time frames seem to be drastically different and epochs mixed up for me. I punched my college assignments on punch cards on those typewriter-like machines - in late '80s.

Stella

 
rob444 has been kind enough to look at the program, and so far has informed me that most of the files are Summer 87 files linked with Warplink 1.50. I take it to decompile these I would need Warplink 1.50?

Sorry for so many questions, as I said in my first post, I am far from being a programmer, sovery much in the dark with this (although enjoying learning a little)!!

Thanks for everyones help again. Certainly going to recommend this forum (been much more helpful than most!!)

Regards

Mark.
 
rob444 has kindly explained to me the linker thing. Gradually getting an understanding of this now.

Mark
 
After looking around, I havent found a single decompiler that works with Warplink 1.50. Is this the case, or are there any tools that could decompile this.

Many thanks

Mark
 
One thing more on dates. I used in my old programs the system date date() to default the date on an input screen. Here is the rub stanley, without Epoch set the date shows up as 01/20/04 however if the client changes that date for example to 01/21/04 for say a packing slip that he is post dateing because he is shipping it the next day. The date reverts to 1904. That's why I have databases that have scattered random 1904 dates mixed in with 2004 dates, ahhh it's the little things that should make us happy but they just make me cringe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top