BookmarkSubscribeRSS Feed
ramchinna24
Obsidian | Level 7

Hi,

    Can anyone help me out please?

    I have following data set:
    data have;
    id    name country 
   100   abc   ind   


just for understanding clearly, 4th column is comments, I am adding below

comments:
"SWIFTT LIST BRUPI
ACTION REQUIRED: REASSESS ASUP TO PICKUP INCM
Refer to note dated 21/07/2016 entered by TDEMP003.
ACTION TAKEN:  I have reassessed Asupp based on the income from 25/07/2016. Asupp rate is now $69.00 ($34.50 each).
Outcome of call to client No
Letter sent: Yes

Client Number                                                                       12345
Entitlement Date                                                                25/07/2016 

Gross SA                                                             $-  
Gross Wages                                                          $823.31
Extra Income from Assets                                         $-  
TOTAL GROSS INCOME                                               $823.31


so there are 4 columns.

i want the result in word like this;

             id       100
       name       abc
    country        ind

comments    "SWIFTT LIST BRUPI
                     ACTION REQUIRED: REASSESS ASUP TO PICKUP INCM
                    Refer to note dated 21/07/2016 entered by TDEMP003.
                   ACTION TAKEN:  I have reassessed Asupp based on the income 
                   25/07/2016. Asupp rate is now $69.00 ($34.50 each).
                   Outcome of call to client No

                    Letter sent: Yes

 


                  Client number 12345

                   Entitlement
                    Date 25/07/2016                                                    

               Gross SA                                                            
              Gross Wages                                                             $823.31
              Extra Income from Assets                                            $-  
             TOTAL GROSS INCOME                                            $823.31

 

I tried with following code:

data null; set client_details;

    file " &WORK_DIR_PATH/&filename..doc" noprint lrecl=1200 print;
           put 'ID' @ 30 id /;
           put 'Client name' @30 Name /;
           put 'country' @30 country /;
           put 'comments' @30 comments ;

; run;

I am looking here for 'comments' field (4th column). i could not arrange them in order exactly that shows in the field. my reuslts are looking ugly. I mean the words and numbers are not showing in same order as in the table. so can anyone please tell how to write that big observation into multiple lines or exctly how it is showing the row.

 

1 REPLY 1
Shmuel
Garnet | Level 18

How do you mannage the comment parts? What delimiters are used to seperate the inner lines of the comment ?

Is it possible to split te comment to its part?

 

What is your code to print the output doc file ? 

Maybe sum changes to your code will do your request.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 640 views
  • 0 likes
  • 2 in conversation