DATA Step, Macro, Functions and more

Append text?

Reply
N/A
Posts: 0

Append text?

Hi!

If I have a text 'Cust name is john smith'. the second time when i process I find that there is some more information that can be added - ' Cust name is john smith . did some cash transaction' . Can I just append the last line 'did some cash transaction' to the initial text? Or will I have to replace the initial text?

The reason I am asking is there is a lot of pre-processing involved to come up with the text, say there are 100 triggers. Now when only one more trigger is added, I have to append this information. It would be easier to append information so that I will not have to collect the information corresponding to the first 100 triggers in addition to this new one. But if we cannot append text in SAS I will have to collect every single info again

Thanks!
N/A
Posts: 0

Re: Append text?

Is this sas table column or title/footnote of the report ?
N/A
Posts: 0

Re: Append text?

Sorry , forgot to mention that this MSG_txt will be a column of the table.
Super Contributor
Super Contributor
Posts: 3,174

Re: Append text?

Given your prior post, I suspect that this is a SAS CHARACTER type variable you are working with here - please confirm? If yes, look at using the CATT function (one of the concatenate functions) in a SAS assignment statement within a DATA step. You will likely use something like CATT or CATS and you will probably append your additional data to an existing SAS variable, based on some IF / THEN ; code.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:
cat function site:sas.com
Ask a Question
Discussion stats
  • 3 replies
  • 115 views
  • 0 likes
  • 2 in conversation