Reply to Re: language Translater

Your name:

Reply:


Posted by Kees Boer on 07/01/05 09:49

Hi, Andrew!

No, I don't use COBOL any more, but I kind of liked the language in the
sense that if you don't mind typing, I liked how it was so easy to read and
understand what was going on. What I didn't like was all the moving and
picture statements. Actually, I think my favorite language for database
processing has got to be the old dBase/FoxPro language. I worked with that
for 8 or 9 years and got to be very good at it and fast.

I could put a system together in 4 hours with menus and everything. I still
wonder, why it all has got to become so complicated. In dBase if you want to
open a database file, you would just say: "use inventor." There was no
connecting and all of the other stuff you had to do. With Foxpro, you could
use SQL statements, but you were able to make them in their query manager
and then just copy and paste them right into the code. For some reason, it
all has gotten a lot more complicated. I don't understand, because it was
supposed to be gotten simpler.

Oh, well, I'm rambling. It's 2:45 AM here.

Thank you for the code! I appreciate it. How do you do skip to the next
record and position yourself at the top? I need to do that, because I need
to write a Ctrl-Break type program. If I have gotten 32 records processed, I
need to start a new webpage.

Thanks!

Kees


"Andrew @ Rockface" <andrew@rockface-records.co.uk> wrote in message
news:da2nl2$arp$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> In news:VO4xe.81320$gc6.55013@okepread04,
> Kees Boer <keesboer@integrity-computing.net> wrote:
>> Hi, does someone know of a language translater that translates COBOL
>> or XBase languages into PHP?
>>
>> A lot of times, I know how to do something in other languages, but I
>> have a hard time finding the commands in PHP, while looking through
>> the tutorials. It will tell me all sorts of stuff that is
>> interesting, but not what I want to know.
>>
>> What I mean is this for instance.
>>
>> I am looking for a way to do this in PHP after I've done the query and
>> gotten all of the records into a recordset.
>>
>> Go to top of file.
>> Do while not EOF
>> Read Record
>> Process Record
>> Skip to next Record
>> End do.
>
> Do you still use COBOL? I haven't even seen any code written in it since
> my
> college days :) I guess you still need to put specific characters in
> specific columns. A weird-ass language, but as you say, it's file handling
> was pretty good.
>
> Anyway, assuming you're talking about a text file:
>
> http://uk.php.net/manual/en/function.file.php
>
> $lines = file('filename');
> foreach ($lines as $line_num => $line) {
> process line...
> }
>
> OR:
>
> http://uk.php.net/manual/en/function.fopen.php
>
> $fh = fopen('filename', 'r');
> while(! feof($fh)) {
> process line...
> }
> fclose($fh);
>
>> This is very standard data processing, but I'm having a hard time
>> finding the commands in PHP tutorials for going to the top of the
>> recordset. Testing to see whether one is at the end of the recordset
>> and skipping to the next record.
>>
>> Maybe PHP doesn't work like that and I'm just stuck into the old ways
>> of doing things.
>>
>> Kees
>
> --
> Andrew @ Rockface
> np: Blind Blake - Police Dog Blues
> www.rockface-records.co.uk
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация