Define the field containing the string to be searched on a REC parameter or work field, as appropriate.
Define a work field to receive the number of bytes counted.
Issue a CALL to CULLUS46 in type 7 logic:
Col
2
▼
RPT-nn7sssCALLUS46(search-field-name search-character-qv range-namesearch-length-vn)
Rpt-nn, coded in columns 2 and 3, specifies a 2-digit number in the range 00 through 99 that identifies the CA Culprit report.
Sss, coded in columns 5 through 7, specifies a 3-digit number indicating the sequence number of the type 7 parameter.
Search-field-name (ARG1) requires the name of the input or work field that contains the field to be searched.
Search-character-qv (ARG2) requires an alphanumeric literal, enclosed in single quotation marks, that specifies the target character for the search.
Range-name (ARG3) requires the name of an 8-byte numeric work field that receives the number of characters searched. A value of -1 indicates that no search character is found.
Search-length-vn (ARG4) requires a numeric literal or the name of an 8-byte numeric work field that specifies the number of bytes to search before encountering the target character (search-character-qv).