In SAS® Clinical Standards Toolkit 1.7.1, when using the macro %define_createsrcmetafromdefine, the macro might run into an error condition.
Example:
ERROR: BY variables are not properly sorted on data set WORK.SOURCE_TABLES_DEFINE_7575.
This happens in the code that creates the source_tables data set. The following SQL code should have an order by table statement:
proc sql;
create table work.source_tables_&_cstRandom
as select
upcase("&_cstDefineDataLib") as sasref,
igd.Name as Table length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Table, _cstAttribute=VARLEN),
igdtt.TranslatedText as Label length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Label, _cstAttribute=VARLEN),
igd.TableOrder as Order,
igd.Domain,
al.Name as DomainDescription length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=DomainDescription, _cstAttribute=VARLEN),
igd.class length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Class, _cstAttribute=VARLEN),
igdl.href as xmlpath length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=xmlpath, _cstAttribute=VARLEN),
igdlt.title as xmltitle length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=xmltitle, _cstAttribute=VARLEN),
igd.Structure length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Structure, _cstAttribute=VARLEN,
igd.Purpose length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Purpose, _cstAttribute=VARLEN),
igdk.Keys,
scan(odm.creationdatetime, 1, 'T') as date length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Date, _cstAttribute=VARLEN),
comtt.TranslatedText as Comment length=%cstutilgetattribute(_cstDataSetName=&_cstTrgTableDS, _cstVarName=Comment, _cstAttribute=VARLEN),
mdv.OID as StudyVersion,
"&_cstTrgStandard" as Standard,
"&_cstTrgStandardVersion" as StandardVersion
from &_cstDefineDataLib..definedocument odm
inner join &_cstDefineDataLib..study std on std.fk_definedocument = odm.fileoid
inner join &_cstDefineDataLib..metadataversion mdv on mdv.fk_study = std.oid
inner join work.itemgroupdefs_&_cstRandom igd on igd.fk_metadataversion = mdv.oid
left join &_cstDefineDataLib..translatedtext(where=(&_cstLanguageCondition and parent='ItemGroupDefs')) igdtt on igdtt.parentkey = igd.oid
left join &_cstDefineDataLib..translatedtext(where=(&_cstLanguageCondition and parent='CommentDefs')) comtt on comtt.parentkey = igd.commentoid
left join &_cstDefineDataLib..aliases(where=(Context="DomainDescription" and parent='ItemGroupDefs')) al on al.parentkey = igd.oid
left join &_cstDefineDataLib..itemgroupleaf igdl on igdl.fk_itemgroupdefs = igd.oid
left join &_cstDefineDataLib..itemgroupleaftitles igdlt on igdlt.fk_itemgroupleaf = igdl.id
left join work.ItemGroupKeys_&_cstRandom igdk on igdk.ItemGroupOID = igd.oid
;
quit;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS Clinical Standards Toolkit | Microsoft® Windows® for x64 | 1.7.1 | | 9.4 TS1M3 | |
Linux for x64 | 1.7.1 | | 9.4 TS1M3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.