Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Work Areas

Former Member
0 Likes
576

The following code initializes a component of my

work area called field_1. But the field is not compacted,

as I would expect. Instead it contains spaces, meaning

that I cannot simply pass it to a SQL statement without

first removing the blank spaces.

READ TABLE myTable INDEX 1 INTO myWorkArea.

myTable-field_1 = "ABC" --- Character length 10

myWorkArea-field_1 = " ABC ". -- Character length 10

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
554

Hi,

Check if the field that you are using in WHERE clause for the query has type Char10

The following code initializes a component of my

work area called field_1. But the field is not compacted,

as I would expect. Instead it contains spaces, meaning

that I cannot simply pass it to a SQL statement without

first removing the blank spaces.

READ TABLE myTable INDEX 1 INTO myWorkArea.

myTable-field_1 = "ABC" --- Character length 10

myWorkArea-field_1 = " ABC ". -- Character length 10

3 REPLIES 3
Read only

former_member191735
Active Contributor
0 Likes
554

Try assigning into string and/or use condense statement

Read only

Former Member
0 Likes
554

Normally it should not happen if your work area is line type of my table.

Read only

Former Member
0 Likes
555

Hi,

Check if the field that you are using in WHERE clause for the query has type Char10