BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Hi
If I m.running sas on Unix can i still import or read in files from mainframe or even my local.machine?

Thx
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

What sort of files? Data files, SAS datasets or something else? If mainframe data files then you need to be very careful as they could contain mainframe-specific data formats like packed decimal or packed binary. You can still read these on Unix if you transfer them from the mainframe in binary format. If the files are just text or numbers then probably a non-binary transfer would be OK. Reading PC files is no issue as both Unix and PCs use the ASCII data representation standard. Mainframe uses EBCDIC  

View solution in original post

11 REPLIES 11
SASKiwi
PROC Star

What sort of files? Data files, SAS datasets or something else? If mainframe data files then you need to be very careful as they could contain mainframe-specific data formats like packed decimal or packed binary. You can still read these on Unix if you transfer them from the mainframe in binary format. If the files are just text or numbers then probably a non-binary transfer would be OK. Reading PC files is no issue as both Unix and PCs use the ASCII data representation standard. Mainframe uses EBCDIC  

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Yea simple data files ( text n numbers)
So i can read them in in a date step but i cannot import them?
ballardw
Super User

Both should work if either one does. I suspect there may be some fun involved with paths though. And servers can throw in complications as the paths have to be as seen by the server.

I'm not fond of Proc Import as there is too much guessing going on.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
And if i need to read them in as a binary file how do i specify it. Is it with the infile statement ?
SASKiwi
PROC Star

You would have to copy your data files to Unix first perhaps using FTP with the BINARY option then use the S370**** informats on your SAS INPUT statement to read the data.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Thank you all! Much appreciated
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
They already have the paths in the code but they been running it on EG and i feel more comfortable running it on unix so wanted to make sure i can still read in from mainframe and the local machine as they like to keep the files there
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
I was hoping to automate that process so i hope i wont need to move the files manually
SASKiwi
PROC Star

You can FTP from SAS. Check with IT admin regarding how you can access the mainframe and its data from Unix.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Thanks. But can i still specify a binary format from within sas?
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Ok just checked on sas.com and i can specify it all
Thank you

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 1636 views
  • 4 likes
  • 3 in conversation