Databases Reference
In-Depth Information
6 In the Path field, specify a path to the file that contains the edited code. The
server in the Host field must be able to resolve this path. You can enter this path
or use the Browse button to display a file-selection window.
7 After specifying the path, click OK to save your changes.
The specified user-written code is retrieved whenever code for this transformation is
generated. From that point forward, the edited code is used in the job code generation
(until you re-select the Automatically create source code option on the Process
tab). For more details about specifying user-written code for a transformation, see the
topic “Specifying User-Written Source Code for a Transformation Within a Job” in the
Help for SAS Data Integration Studio.
Adding a User-Written Code Transformation to the Process Flow for a
Job
To create a process flow for a job, you can drag and drop transformations from the
Process Library tree into the Process Editor. If the predefined transformations in the
Process Library tree do not meet your needs for a step in a specific job, you can write a
SAS program that performs the desired task, add a User-Written Code transformation
to the process flow, and then specify the location of the new code in the metadata for the
User-Written Code transformation.
After the transformation has been inserted, you update its metadata so that it
specifies the location of your user-written code. When the job is executed, the
user-written code is retrieved and executed as part of the job.
You can base your SAS program on code that is generated for one or more standard
transformations in SAS Data Integration Studio, or you can use some other SAS
code-generation tool such as SAS Enterprise Guide to help build the initial code.
The following steps assume that you have already created a process flow, that you
have already written and tested the desired SAS program, that you are ready to add
the User-Written Code transformation to the flow, and that the flow displays in the
Process Editor.
1 Drag a User-Written Code transformation from the Process Library and drop it
into the appropriate location in the process flow.
2 Right-click the icon for the User-Written Code transformation and select
Properties from the pop-up menu.
3 On the Source tab, either paste the revised code as metadata or specify the path to
the saved code (if you plan to maintain user-written code in an external location).
4 Make any final edits of the code; be sure the input and/or output table names are
correct. Use &SYSLAST if the input is to refer to the output from the predecessor
step, and specify &_OUTPUT as your output table name if your output is a single
work dataset being used to feed the successor step.
5 Manually define columns on the Mapping tab if other steps are to follow. Use the
Quick Propagate option on the Mapping tab and apply further edits to define the
output columns correctly.
When SAS Data Integration Studio generates all code for a job, it can automatically
generate the metadata for column mappings between sources and targets. However,
when you specify user-written code for part of a job, you might have to manually define
the column metadata for that part of the job that the user-written code handles. SAS
Data Integration Studio needs this metadata to generate the code for the part of the job
that comes after the user-written code step.
 
 
Search WWH ::




Custom Search