
Clarion 2.1 for dos question
Hi,
There is a quicker way to do this.
? TES:JOB_NUM = records(data)???? ! find the number of records in a file
? tes:job_num = test:job_num + 1???? !? add one
? update()?????????????????????????????????????? ! update file
? put(test)?????????????????????????????????????? ! put into file
? if error() then???????????????????????????????? ! check for any errors
??? message(error())
? end
Hope this helps
John
?
?
?
Quote:
> Hello there
> I was wondering if anyone could help me out with this little problem, let me
> first explain i am not used to clarion for dos i have taken this project
> over from someone else and am having a little trouble.? ok then i have a
> growing database with currently 10,000 records with a key field job_num this
> is currently at about 500 as the same number is used about 20 times thus
> creating about 10,000 records what i want to do is search through this
> database for this job_num when it reaches the end of the file i want it to
> then write this number into a seperate database.? I can get it to find the
> last file in the database but am unable to write this number into a new
> database file below is what i have done allready.
> ???????????? MEMBER('TEST')
> TEST1????? PROCEDURE
> ? EJECT
> ? CODE
> ? SHARE(DATA)
> ? SET(DATA)
> ?? LOOP UNTIL EOF(DATA)
> ?? NEXT(DATA)
> ? .
> ? DAT:JOB_NUM += 1????????? !?? I now want to write this field into a new
> database (which has already
> ???????????????????????????????????????????????? !?? been created) lets say
> the database file name is test and the field is
> ?????????????????????????????????????????????????? ! TES:JOB_NUM
> ? RETURN
> I know i can put this line in TES:JOB_NUM = DAT:JOB_NUM but what do i type
> next to write the record into the database file I know you can use PUT(TEST)
> but i can't get this working
> I would be thankfull for any help i get