Help using Base SAS procedures

Mainframe to Unix

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 444
Accepted Solution

Mainframe to Unix

Hi
If I m.running sas on Unix can i still import or read in files from mainframe or even my local.machine?

Thx

Accepted Solutions
Solution
‎02-15-2017 07:03 PM
Super User
Posts: 3,250

Re: Mainframe to Unix

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


All Replies
Solution
‎02-15-2017 07:03 PM
Super User
Posts: 3,250

Re: Mainframe to Unix

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  

Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

Yea simple data files ( text n numbers)
So i can read them in in a date step but i cannot import them?
Super User
Posts: 11,341

Re: Mainframe to Unix

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.

Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

And if i need to read them in as a binary file how do i specify it. Is it with the infile statement ?
Super User
Posts: 3,250

Re: Mainframe to Unix

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.

Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

Thank you all! Much appreciated
Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

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
Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

I was hoping to automate that process so i hope i wont need to move the files manually
Super User
Posts: 3,250

Re: Mainframe to Unix

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

Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

Thanks. But can i still specify a binary format from within sas?
Super Contributor
Super Contributor
Posts: 444

Re: Mainframe to Unix

Ok just checked on sas.com and i can specify it all
Thank you
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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