Go to General ledger setup and first check what is shortcut dimension 3 code and then insert entry into Dimension set entry table for example
glsetup.get;

DimSet.reset;
Dimset.init;
dimset."dimension set id" := whatever the last no. is
dimset."dimension code" := glsetup."shortcut dimension 3 code"
dimset."dimension value code" := from your import file.
dimset."dimension value Id" = if you have any from the file.
dimset."dimension name := name of the dimension
if not dimset.insert then
dimset.modify;