Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
need help on SAS, new line is coming in a column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
sushidas
Warnings : 2

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Thu Jan 31, 2013 12:41 am    Post subject: need help on SAS, new line is coming in a column
Reply with quote

Hello,

I am written below code to create s xls output with 3 tabs, my xls with 3 tabs are getting created successgully, only issue is that field COVERAGETYPE is not getting displayed like other columns though it has values. The reason looks like it has newline. I have attached the spreadshhet for the reference, please see the COVERAGETYPE field in 1st and 3 rd tab.

Can someone please advise, how can I either remove this newline from COVERAGETYPE column or else add new line to each column.

Code:
DATA ONNMS;                                               
INFILE SASIN;                                             
                                                           
INPUT                                                     
      SUBSID  $14-23 LASTNAME $43-67 FIRSTNAME $26-40     
      GROUP $70-75 SUBGROUP $78-80 COVERAGETYPE $85-93     
      EFFECTIVEDATE $96-103;                               
                                                           
  IF _N_ < 5 THEN DELETE;                                 
                                                           
DATA ONLOCAL;                                             
INFILE SASIN2;                                             
                                                           
INPUT                                                     
      SUBSID   $57-65 COVERAGE $14-20 LASTNAME $35-48     
      FIRSTNAME $23-32 MI $51-51;                         
                                                           
  IF _N_ < 6 THEN DELETE;                                 
                                                           
DATA ONCOB;                                               
INFILE SASIN3;                                             
INPUT                                                           
      SUBSID  $3-12 LASTNAME $31-55 FIRSTNAME $14-28           
      GROUP $58-63 SUBGROUP $66-68 COVERAGETYPE $73-81         
      EFFECTIVEDATE $84-91 COBRAINDICATOR $96-96;               
                                                               
  IF _N_ < 5 THEN DELETE;                                       
                                                               
  ODS LISTING CLOSE;                                           
  ODS TAGSETS.EXCELXP BODY="W061229"                           
    PATH =O1PDSE(URL=NONE)                                     
    RECORD_SEPERATOR=NONE;                                     
  RUN;                                                         
                                                               
  PROC PRINT DATA=ONNMS NOOBS;                                 
  VAR SUBSID  / STYLE={TAGATTR="\0000000000"};                 
  VAR LASTNAME FIRSTNAME;                                       
  VAR GROUP  / STYLE={TAGATTR="\000000"};                       
  VAR SUBGROUP  / STYLE={TAGATTR="\000"};                       
  VAR COVERAGETYPE EFFECTIVEDATE;                               
  RUN;                                                         
                                                               
  PROC PRINT DATA=ONLOCAL NOOBS;                               
  VAR SUBSID  / STYLE={TAGATTR="\000000000"};                   
  VAR COVERAGE  LASTNAME;                                       
  VAR FIRSTNAME MI;                                             
  RUN;                                                         
                                                               
  PROC PRINT DATA=ONCOB NOOBS;                                 
  VAR SUBSID  / STYLE={TAGATTR="\0000000000"};                 
  VAR LASTNAME;                                                 
  VAR FIRSTNAME;                                               
  VAR GROUP  / STYLE={TAGATTR="\000000"};                       
  VAR SUBGROUP  / STYLE={TAGATTR="\000"};                       
  VAR COVERAGETYPE;                                             
  VAR EFFECTIVEDATE COBRAINDICATOR;                             
  RUN;                                                         
    ODS TAGSETS.EXCELXP CLOSE;                                 
  ODS TAGSETS.EXCELXP CLOSE;   
  ODS LISTING ;               
RUN;
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jan 31, 2013 1:48 am    Post subject: Reply to: need help on SAS, new line is coming in a column
Reply with quote

do not post attachment very few people are able to download and see them.
the attachment was deleted and Your topic was edited to provide better readability using the code tags
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Thu Jan 31, 2013 12:20 pm    Post subject:
Reply with quote

Enrico,
With all due respect, If the TS is generating an Excel file and wants to explain the scenario, the only possibility is to post the Excel, even a screenshot/copy paste of text wont help since the underlying XML has to be looked at.
Quote:
the attachment was deleted
Now no one can see it :-(
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us