BookmarkSubscribeRSS Feed
nishSAS
Calcite | Level 5

Hello,

 

I need to creat a data set with two different layout data with different data lables.

Can somebody help me out how can i get this done by Proc SQL.

 

In attached file there is a data layout for two different data sets. I want the final data set in "Shipment file" layout form.

And the file which i am receiving is in "Received File Layout" layout.

 

With the help of this can somebody help me to solve my problem.

 

Thanks,

nishSAS

3 REPLIES 3
ballardw
Super User

Have read the file into a SAS data set yet?

You also do not supply a description of which variable in the received file goes to which in the shipment file.

 

Since your wanted layout has more variable than exist in the "received" layout you will have to explain in detail how those other variables are to be created.

nishSAS
Calcite | Level 5

We are receiving data in "Received File layout" (Refer attachment). And we need to provide the data file for further process in "Shipment file" layout format (Refer Attachment). In the received file layout there are few attributes are common which are having different name in "Shipment file" those are "Product Code = ITEM_NUMBER", "Quantity Sold (units) = QUANTITY_SOLD" & "Quantiry Returned (units) = RTURN".
So my main challenge is to create the variables which are not present in "Received File Layout" and merging the "Data Point" with "Field Name".
Another challenge is in "Field Name = ID_TYPE" which ever data appears in "Attribute 6-9" out of that on priority basis if "Attribute 6" contains any data then that data should come under field name "ELIGIBLE_CUSTOMER_D_N_OR_H_OR_NC" and the attribute name should come under field name "ID_TYPE" and so on. Numbers mentioned under "Availability" column denotes the priority of the attributes should come under "ID_TYPE" & "ELIGIBLE_CUSTOMER_D_N_OR_H_OR_NC"

 

"Layout" file contains sample data for your reference.

Patrick
Opal | Level 21

@nishSAS

So what's the concrete question you have?

You can't expect us to do all the work for you (at least I'm not going to do it) and though you need to a) show some own work and b) ask specific questions to get help where you're stuck.

 

What you need to do first is a mapping from source to target - source column/transformation rule/target colum

Once you've done the mapping you can start implementing it using SAS. First step is to read your source Excel into a SAS table.

 

....and if you get stuck on the way how to do things, i.e. how to implement a transformation rule, then come back here and ask specific questions ideally also providing actual code.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 989 views
  • 1 like
  • 3 in conversation