DATA Step, Macro, Functions and more

Read flat files on tape (MVS*)

Reply
N/A
Posts: 0

Read flat files on tape (MVS*)

How do you read flat files on tape within the PC-SAS environment?

I've found out that you can add "tape", as engine, to the libname statement but is that all. Maybe that only applies to existing SAS datasets, not flat files?

Br,
Dante
SAS Super FREQ
Posts: 8,743

Re: Read flat files on tape (MVS*)

Hi:
Partly the type of syntax you use will depend on how you are reading the "flat file" from tape -- what operating system has the tape drive physically attached. Was the tape created on the mainframe or on Unix? Is the tape file really a flat/sequential file or a VSAM file or a SAS transport file? You indicated that you were reading flat files. It is possible to read flat files or "raw data" stored on tape with SAS.

Here is an example of reading a tape file on UNIX:
http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/a000455940.htm
http://support.sas.com/documentation/cdl/en/hostvms/62450/HTML/default/a002222873.htm
(I only found doc on the TAPE engine for Open VMS, not Windows)
And here are some other notes:
http://support.sas.com/techsup/technote/ts473.pdf
http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/mvs-allexf-eft.htm

If you're going to be using a tape device attached to an MVS system, you might need to use SAS/Connect to set up your PC code to run on the MVS system so the tape can be mounted and read. Or, use techniques similar to those described here: http://www2.sas.com/proceedings/sugi27/p108-27.pdf to read the tape file.

This may be a question best answered by Tech Support, as they can help you with the correct syntax for your particular configuration, operating system, location of tape drive and type of file.

cynthia
Super Contributor
Super Contributor
Posts: 3,174

Re: Read flat files on tape (MVS*)

If not mentioned in the links provided by Cynthia, the SAS FILENAME FTP engine is a possibility to read data directly from z/OS MVS operating system, however you will need to have an FTP privilege to mount a tape defined for your remote host system.

Also, considerations must be made for the DCB attributes as well for the remote host file type you are reading -- not an issue if straight F/FB/V/VB though.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Read flat files on tape (MVS*)

Don't forget that MVS uses the EBCDIC character set instead of ASCII, so text fields will need translating before you can see them correctly on the PC. FTP gives you the option to do this, but there may be complexities if you have a mixture of text and binary.
Ask a Question
Discussion stats
  • 3 replies
  • 422 views
  • 0 likes
  • 3 in conversation