Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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

Senior Member


Joined: 14 Mar 2007
Posts: 10692
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: 1691
Location: Tiruppur, India

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 Print next line strings when a condit... tgmuntor DFSORT/ICETOOL 9 Wed May 20, 2020 9:08 pm
No new posts Need SQL for two latest records havin... Q5P418 DB2 10 Sun May 10, 2020 8:24 am
No new posts Submit Print Job For PDS Member With ... AllenSieracki TSO/ISPF 17 Fri Apr 10, 2020 9:31 pm
No new posts Issue while fetching a column(Nullabl... VINAY PALLELA DB2 18 Tue Mar 31, 2020 9:33 pm
No new posts To fetch value separated by commas fr... vinu78 DB2 3 Fri Feb 28, 2020 12:56 pm

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