What is the INPUT?--- Input is having two datasets that were attached
What do you want to do?--- It is a simple modification of a variable title1, where the we need to concatenate (tabno from TAB dataset to title1 variable in TAB dataset) and also (figno from FIG dataset to title1 variable in FIG dataset), and this need to be done in two different datasteps, but we need to have a same macro for this to resolve.
Does it generate any code? What code? the below is the code that was done within a datatep, but we need to do that by resolving the same within a macro. The actual logic that i am trying to do is creating the variable tabnox and fignox in two different datasteps and that's all, but the requirement is to do that using a macro by adding version date and also adding the warning message if there is any other special characters in tabno or figno variable apart from '.'.
data test.tab; set tab; if index(upcase(tabno),'X') then delete; if tabno="" then delete; tabnox=compbl('Table '||tranwrd(tabno,'.0','.')||title1); drop title1; rename tabnox=title1; run;
data test.fig; set fig; if index(upcase(figno),'X') then delete; fignox=compbl('Figure '||tranwrd(figno,'.0','.')||title1); drop title1; rename fignox=title1; run;
What do the datasets you provided have to to with the requirements? The datasets were the raw datasets where we need to work
Is the requirement to compare the two datasets? Its not comparison, its a modification of a variable title1 variable in both the datasets TAB and FIG, the logic is given above, but we need the above as a macro with few other additions like warning message for invalid special characters.
Is the requirement to actually produces the figures and tables listed in those datasets? How would you do that? The datasets are used to produce tables and figures and we have got many other macros that work on these two datasets to produce tables and listings.
... View more