syteline progress programming tutorial

aaronhome86

New Member
Anyone can tell me where can i get the progress programming tutorial?
i am a new user on progress programming. Wish to know the syntax description of the program.

find symix.employee where symix.employee.emp-num = t-emp-num
and t-emp-num > "" and (symix.employee.term-date = ?
or symix.employee.term-date > today) no-lock no-error.

Can anyone let me know what is the meaning on the bold part?

sorry for the noob question.

thanks.
 

TomBascom

Curmudgeon
The FIND is looking for terminated employees where the employee number is not blank and where the termination date is either unknown (? is like a SQL NULL) or in the future. If it finds such a record it will make the buffer available to the program without locking it in the database -- that means you can read and display the fields but not update them. The no-error makes it so that if an error occurs (such as no records exist that meet the criteria) the FIND will quietly terminate without complaining.

After a no-error your code should be testing to see if a record was found. Something like this:

Code:
find symix.employee where symix.employee.emp-num = t-emp-num
and t-emp-num > "" and (symix.employee.term-date = ?
or symix.employee.term-date > today) no-lock no-error.

if available( symix.employee ) then
  do:
    display symix.employee.emp-num symix.employee.term-date.
  end.
 else
  do:
    message "Oops!  Nobody is queued to be fired.".
  end.
 
Top