{smcl} {* 13aug2009}{...} {hi:help callst} {hline} {title:Title} {cmd:callst} {hline 2} Call StatTransfer from Stata {title:Syntax} {p 8 17 2} {cmdab:callst} [{help altpath:{it:alt-path}}] {cmd:,} [ {cmdab:d:estination(}{help altpath:{it:alt-path}}{cmd:)} {opt c:onfig(SToptions)} ] {pmore}Where {it:SToptions} are of the form: {pmore2}[{opt type(file-type)}] {pmore2}[{opt keep(varlist)}] {pmore2}[{opt drop(varlist)}] {pmore2}[{opt where(expression)}] {pmore2}[{opt set(setup-option)} [{opt set(setup-option)} {cmd:...}]] {pmore2}[{opt dbr(parameters)}] [{opt dbw(parameters)}] {pmore2}[{opt copy(table/worksheet/cells/member)}] {title:Description} {pstd}{cmd:callst} invokes StatTransfer to copy data into and out of Stata data files (ie, extension {cmd:.dta}). There should seldom be a reason to invoke this command directly, since other commands (e.g., {cmd:usel}, {cmd:savel}, {cmd:mergel}) automatically make use of {cmd:callst}'s capabilities. {pstd}The command's main parameter is the source, or data file {it:to be translated}. When the transfer is from an ODBC data source (and only then), no main parameter is supplied. {pstd}For setting the default behavior of StatTransfer when used from Stata, see {bf:Remarks}, below. {title:Options} {phang}{cmdab:d:estination(}{help altpath:{it:alt-path}}{cmd:)} specifies a pathname for the newly translated data. If {opt d:estination()} is not specified, the new name and location will the the same as the original file, with only the extension changed. (Usually, that would be to {cmd:.dta}) {phang}{opt c:onfig(SToptions)} passes configuration information along to StatTransfer. There are six possible suboptions: {phang2}{opt type(file-type)} specifies the format of the foreign data, whether source or destination. This sub-option is only needed when the file extension is ambiguous (or misleading). {helpb callst##type:see below} {phang2}{opt keep(varlist)} specifies variables from the orignating file to be kept. A Stata {varlist} should generally work; variables with odd characters should be single-quoted. {phang2}{opt drop(varlist)} specifies variables from the orignating file to be kept. A Stata {varlist} should generally work; variables with odd characters should be single-quoted. {phang2}{opt where(expression)} is the equivalent of a Stata {bf:if} clause, specifying observations to keep. The format is slightly different. {helpb callst##where:see below} {phang2}{opt set(setup-option)} passes along StatTransfer {cmd:SET} commands. Any number of {opt set()} sub-options may be included in {opt c:onfig()}. For example: {cmd:config(set(preserve-case Y) set(read-sas-fmts N))}. {phang2}{opt copy(table/worksheet/cells/member)} specifies, for some file types, which part of the file to use. {helpb callst##piece:see below} {title:Remarks} {pstd}Remarks are divided into sections for the various {opt config(SToptions)} suboptions, and (sometime in the future) on default configuration. {marker type} INCLUDE callst_type {title:Also see} {psee}Online: help for {help usel}, {help savel}, {help mergel} {pstd}Contact: {browse "mailto:elliott.lowy@va.gov":Elliott Lowy}