I am having problem in getting the actual length size including the trailing space/s entered.
example: '- ’
Already considered using EXAMINE/GIVING statement and with the above example the result is 2.
EXAMINE #SEARCH-VAL for ‘ ‘ GIVING LENGTH #LENGTH
I also considered the hexadecimal value of space, same result
EXAMINE #SEARCH-VAL FOR H’40’ REPLACE ‘*’ GIVING LENGTH #LENGTH
I need the actual lenght size entered by the user including trailing space/s to have a reference/ starting point on the next step to pad all trailing spaces (not entered by the user) with ‘%’ for the SQL statement.
Please advise. Thanks.