FROM Clause

 

FROM clause is used in an INPUT statement without the BY NAME clause, when the field names are not the same as the variables names. The cursor can be placed only in the fields specified in the FROM clause, the next and previous fields are predefined by the order of the fields in the FROM clause. The fields and the variables must match in order and number, they must be of the same or compatible data types.

 

INPUT my_progrec.address, my_progrec_phonenumb FROM f004, f005

 

The THRU/THROUGH keywords may be used to indicate a set of the ordered record members between the two specified members (inclusive):

 

INPUT my_progrec.lname THRU my_progrec.addit_inform FROM f001, f002, f003, f004, f005, f006, f007

 

You can also use the .* notation to simplify the FROM clause if you create a screen record that includes all the fields which are used for input and the input is performed into all the members of a program record:

 

INPUT my_progrec.* FROM my_screenrec.*

 

The THRU/THROUGH keyword cannot be used in the FROM clause.