Download presentation
Presentation is loading. Please wait.
Published byBrandon Bell Modified over 9 years ago
1
A program for exporting SAS datasets to Argus Johan Heldal Statistics Norway
2
SAS macro TOARGUS Reads a SAS dataset Outputs a.csv file, ’;’ separated Creates an ARGUS meta data file (.rda) –Applies to both Mu and Tau Creates an INPUT statement (.sas) for reading a safe file from Mu back to SAS. An open code for anybody to improve.improve
3
How to run TOARGUS %LET LIBNAME = NIH; * The libname for the SAS dataset; %LET INPATH = REMOTE '$METODER/1253/NIH_kartlegging/wk12' SERVER=ovibos; * Path to the SAS dataset; %LET DATASET = utvalg; * The name of the SAS dataset; %LET OUTPATH = H:\ESSnet\Confidentiality; * Directory for.csv and.rda files; %LET KEEP = t_senter kjonn barn sivstand samtykke retur res utland land fylke alder; * The variables to be transferred; /* Run the macro. */ %INCLUDE "H:\ESSnet\Confidentiality\SAS-Argus\ToArgus.sas"; %TOARGUS;
4
The metafile (utvalg.rda) ";" t_senter 2 kjonn 1 barn 8. sivstand 1 samtykke 1 retur 1 res 1 utland 4 land 4 fylke 4 alder 8. Metadata specific for confidentiality should be specified in ARGUS i.e. sample weight, holding indicator, request, household identifier, suppressweight etc.
5
The input file (.sas) INFILE &OUTPATH\&DATASET..saf DELIMITER=';' DSD; INPUT t_senter : $CHAR2. kjonn : $CHAR1. barn : 8. sivstand : $CHAR1. samtykke : $CHAR1. retur : $CHAR1. res : $CHAR1. utland : $CHAR4. land : $CHAR4. fylke : $CHAR4. alder : 8. ;
6
Next to do Write code for generation of codelist files (.cdl) from associated SAS-formats. Write SAS macro for generation of tabular input to Tau. –The table with relevant information and metafile.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.