Project

sas2yaml

0.0
No commit activity in last 3 years
No release in over 3 years
Converts a SAS Input file into a YAML file which details each column along with its type, length, and start column.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

~> 0.4.0
 Project Readme

Sas2Yaml

This gem installs a CLI program, sas2yaml which will (attempt) to read in a SAS input statement and turn it into a YAML file with the name of each variable along with its position in a fixed-width file, length, and type (assuming that information is available).

This gem was developed in order to decipher the fixed-width file structure of SEER Medicare SAS input statement files and works (fairly) well in processing those files. Your mileage almost certainly will vary.

Installation

Add this line to your application's Gemfile:

gem 'sas2yaml'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sas2yaml

Usage

sas2yaml file1.sas file2.sas ...

For each file listed, a lot of output will hit your screen, the program will hopefully not bomb out, and you'll end up with files named "file1.yml" and "file2.yml" (from the example above).

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake false to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Thanks

  • Outcomes Insights, Inc.
    • Many thanks for allowing me to release a portion of my work as Open Source Software!
  • Ruby
    • For being such an awesome language that it can pretend to be another (and much more awful) language cough SAS cough.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/outcomesinsights/sas2yaml.