evesely
1st February 2002, 15:49
Without going through a bunch of cumbersome select statements, is there an easy way to determine if a column is mandatory in the data dictionary? I've looked at rdi.column -- this may be it, but I'm not sure what some of the "flag" values represent.
~Vamsi
1st February 2002, 19:32
table ttcibd001
function main()
{
long offset, size, dept, type, flag, ret
long ref_mode
string domain_name(14), default_val
string ref_column(18), ref_mess
ret = rdi.column("tcibd001.item", domain_name, offset,
size, dept, type,
flag, default_val)
ret = rdi.reference("tcibd001.item", ref_column, ref_mode, ref_mess)
if bit.in(DB.FILLED, flag) or ref_mode = 1 then
message("Mandatory field")
endif
if not bit.in(DB.FILLED, flag) and ref_mode = 2 then
message("Mandatory only if not empty")
endif
}
|******************** end of script ***********************************
Standard disclaimers apply :).
evesely
1st February 2002, 19:36
I thought that perhaps it was the DB.FILLED bit, but the documentation I have doesn't say what it is.
Thanks, ~Vamsi!