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

 

Hi,
I imported a file using the import utility in SAS EG and I imported the same file using the following
PROC IMPORT command and everything was good except for the format and informat values. See below.
/* Assign your library names */ libname mesahome "/sasshare/prd/AUDIT/BlackMESA/"; PROC IMPORT OUT = mesahome.blackmesa_RFC_predict_feb19_2 DATAFILE= '/sasshare/prd/AUDIT/BlackMESA/blackmesa_RFC_predict_feb19.csv' DBMS=DLM REPLACE; DELIMITER = ","; GETNAMES = YES; GUESSINGROWS=10000; RUN; Field Data Type using above code in SAS Viya Property Value Label Objvalue Name Objvalue Length 8 Type Numeric Format BEST12 Informat BEST32 Field Data Type from SAS EG import Property Value Label Objvalue Name Objvalue Length 8 Type Numeric Format BEST8 Informat BEST8

Bruce
1 ACCEPTED SOLUTION

Accepted Solutions
tsap
Pyrite | Level 9

Please see the information provided in this post:

https://communities.sas.com/t5/SAS-Studio/Import-Pipe-Delimited-File-into-SAS-Viya/m-p/551901#M7412

 

To put it simply, its possible for their to be variance when using PROC IMPORT between different SAS Interfaces (SAS EG v. SAS Viya). The example in the link is more drastic than yours, in that it completely changes the formats from character to number ( or the other way around). Where in your case the PROC IMPORT steps, across both EG and Viya, recognize the variable as character and the actual format/informat is where the variance occurs. To ensure consistency between the two, you should explicitly define the types and lengths to ensure it's the format you need instead.

 

Hope this helps.

View solution in original post

1 REPLY 1
tsap
Pyrite | Level 9

Please see the information provided in this post:

https://communities.sas.com/t5/SAS-Studio/Import-Pipe-Delimited-File-into-SAS-Viya/m-p/551901#M7412

 

To put it simply, its possible for their to be variance when using PROC IMPORT between different SAS Interfaces (SAS EG v. SAS Viya). The example in the link is more drastic than yours, in that it completely changes the formats from character to number ( or the other way around). Where in your case the PROC IMPORT steps, across both EG and Viya, recognize the variable as character and the actual format/informat is where the variance occurs. To ensure consistency between the two, you should explicitly define the types and lengths to ensure it's the format you need instead.

 

Hope this helps.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 728 views
  • 2 likes
  • 2 in conversation