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

Programming Logic

Former Member
0 Likes
482

Hi,

I have a question which I think is dumb but I was unable to think of any easy way out. I have a string which contains spaces with an uneven count between them for example

wa_test = 'firstname"space"lastname#"space"#"space" #address"space"#'.here space means ''.

and # is the delimiter. The wa_test would be written to an outbound file later. We need the space between the first name and the last name but we do not need any spaces between the hashes or before the # indicator, the key word condense would remove all the spaces which I do not want. Any ideas would be appreciated and rewarded.

Regards

Vick

Message was edited by: vick vennav

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
444

split wa_test at '#' into name dummy1 dummy2 dummy3 address dummy4.

nae would have the required result.

Regards,

Ravi

4 REPLIES 4
Read only

Former Member
0 Likes
444

TRANSLATE WA_TEST USING '# '.

CONDENSE WA_TEST. "tHIS WOULD DELETE ONLY EXTRANEOUS SPACES ONLY.

Regards,

Ravi

Read only

0 Likes
444

Ravi,

I need the # operator or am I not doing it right.

Regards

Vick

Read only

Former Member
0 Likes
445

split wa_test at '#' into name dummy1 dummy2 dummy3 address dummy4.

nae would have the required result.

Regards,

Ravi

Read only

0 Likes
444

Ravi,

Thanks for your time and effort, I was using condense no-gaps instead of just using condense. I know its dumb of me, I will give u full points regardless.

Regards

Vick