NCONTAIN


1 NCOntain(number,+ , match)

If the numeric value of any of the match arguments is equal to the numeric value of number, NCONTAIN returns 1. Otherwise, NCONTAIN returns 0.

Example 1

If the current record contains a packed decimal value of value of 10, 20, or 30 starting at byte 8, print the record.
if nco(fld(8,P),10,20,30) then print(inrec,'CHAR')

Example 2

If the current record contains a zoned decimal value of 11, 12, or 13 starting at byte 10, drop the record from processing.
if nco(fld(10,5,Z),11,12,13) then exit 'DROP'

Related tasks