BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
genius99
Calcite | Level 5

I am trying to load data with the data files attached,

 this is my code

 

data Orders;
    infile "C:/Users/100355202/Desktop/Orders.txt" dsd dlm = " ";
    input OrderID CustomerID :$20. EmployeeID :$20. OrderDate :mmddyy10. 
          RequiredDate :mmddyy10. ShippedDate :mmddyy10. ShipVia Freight 
          ShipName :$20. ShipAddress :$20. ShipCity :$20. ShipRegion :$20. 
          ShipPostalCode :$20. ShipCountry :$20. ;
run;

this is what I should get as the output

ord.PNG

but I am getting this as the output

out.PNG Can you help me figure out what I am missing for it t work?

 

I am receiving these notes

not.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16
Thank you @genis99, Could you mark this solution as accepted so that it will help future users.
Thanks,
Jag

View solution in original post

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

could you try the tab delimitation '09'x

 

data Orders;
    infile "C:/Users/100355202/Desktop/Orders.txt" dsd dlm = "09"x;
    input OrderID CustomerID :$20. EmployeeID :$20. OrderDate :mmddyy10. 
          RequiredDate :mmddyy10. ShippedDate :mmddyy10. ShipVia Freight 
          ShipName :$20. ShipAddress :$20. ShipCity :$20. ShipRegion :$20. 
          ShipPostalCode :$20. ShipCountry :$20. ;
run;
Thanks,
Jag
genius99
Calcite | Level 5

That worked out, thank you.

Jagadishkatam
Amethyst | Level 16
Thank you @genis99, Could you mark this solution as accepted so that it will help future users.
Thanks,
Jag

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3317 views
  • 0 likes
  • 2 in conversation