{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# DATA Step Structure \n", "\n", "`DATA` steps are declared by the keyword `data` followed by an output dataset that SAS will write to. The output dataset may be a temporary file (no `libname`). In most applications, you will specify an input dataset using the `set` statement. This is the data SAS will read in, manipulate, and save to the output file. The `set` and `data` file can be the same file. You can also append multiple datasets together by listing multiple inputs to the `set` statement. To conclude the `data` step you use a `run` statement.\n", "\n", "```sas\n", "data library.out_filename;\n", " set library.in_filename;\n", " /* data step statements go here */\n", "run;\n", "```\n", "\n", "You can append `in_filename_1` and `in_filename_2` like so\n", "\n", "```sas\n", "data library.out_filename;\n", " set library.in_filename_1 library.in_filename_2;\n", " /* data step statements */\n", "run;\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }