Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:51:48+00:00 2026-06-12T01:51:48+00:00

I have the below raw data 1,,35,000 2,100,45,000 and need the below in a

  • 0

I have the below raw data

1,,35,000  
2,100,45,000

and need the below in a dataset

1 .   35000  
2 100 45000

this would require both dsd option and using comma. informat.

How to carry this out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:51:50+00:00Added an answer on June 12, 2026 at 1:51 am

    DSD has nothing to do with this – DSD involves input like
    1,,”35,000″
    2,100,”45,000″

    If that is what you have, then you can use the : operator to read it in with the comma informat.

    data test;
    infile datalines dlm=',' dsd;
    input id
    num
    dollar :comma8.;    
    datalines;
    1,,"35,000"
    2,100,"45,000"
    ;;;;
    run;
    

    If you do not have the quotes around the field, then you will need to parse this somehow. One solution is below, which will work as long as the field with commas is the final field.

    data test;
    infile datalines dlm=',' dsd;
    input @;
    if countc(_infile_,',') =3 then do;
     _commapos = findc(_infile_,',',-1*length(_infile_));
     _infile_ = substr(_infile_,1,_commapos-1)||substr(_infile_,_commapos+1);
    end;
    input id
    num
    dollar ;
    put _all_;
    datalines;
    1,,35,000
    2,100,45,000
    ;;;;
    run;
    

    If the field your potential is in is in a consistent field, but NOT the first one, you can modify the above solution to correct it. If it’s in potentially more than one field, you have a much more difficult problem to solve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have below sample data. AID Date Title ----- ---------- ------ 1 2011-12-12 test1
I have below query I am trying to show message 'No SubSource for this
Edit: This was user error (sorry). I have answered it below. I am developing
If I have two tables as listed below, The first which shows the Raw
Need your help on the below. I have a table where I have functions
I have a data set raw.data.2010 that needs several steps of subsetting with different
Have just got a surprise and would appreciate some suggestions. The simple query below
I have a web service that returns a raw string of JSON data (sample
I have a flash app which sends raw data for a jpg image to
I have different CSV files and these files have some raw data Computer Name,Computer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.