BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
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
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
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.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1548 views
  • 0 likes
  • 3 in conversation