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
Opal | Level 21

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
Opal | Level 21

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
Opal | Level 21

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
Opal | Level 21

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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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