BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Magdalena318
Calcite | Level 5

Dear community,

 

How could I get the values of RECFM and LRECL of an arbitrary file on Unix. 

I know that on Windows I could simply use foptname function but on Unix these options are not available.

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

UNIX (like Windows) does not have the concept of file organization, this is strictly a feature of older mainframe systems like z/OS (MVS, previously OS/360). To UNIX and Windows, a file is simply a stream of bytes.

Therefore the FINFO function cannot give you this information, as it does not exist.

For the purpose of reading a specially formatted file, the programmer needs to supply these parameters, and for this he/she needs the documentation of the fiie.

View solution in original post

2 REPLIES 2
AllanBowe
Barite | Level 11
What are you trying to achieve with the file?

The options used depend very much on what you need to do with it..
/Allan
MacroCore library for app developers
Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
Kurt_Bremser
Super User

UNIX (like Windows) does not have the concept of file organization, this is strictly a feature of older mainframe systems like z/OS (MVS, previously OS/360). To UNIX and Windows, a file is simply a stream of bytes.

Therefore the FINFO function cannot give you this information, as it does not exist.

For the purpose of reading a specially formatted file, the programmer needs to supply these parameters, and for this he/she needs the documentation of the fiie.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1105 views
  • 0 likes
  • 3 in conversation