IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

need help on SAS, new line is coming in a column


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 31, 2013 1:48 am
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: 1742
Location: Tirupur, India

PostPosted: Thu Jan 31, 2013 12:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
Search our Forums:

Back to Top