谢谢各位大神了,真的是没有一点想法啊。感谢
Input requirement:
Write a macro called XSCAN which has 3 positional parameters:
· STRING – A text string containing a list of words.
· DELIMITER – A single character used to separate the words in STRING.
· WORD_NUMBER-An integer specifying the Nth word in STRING. If the value is positive, count from the left of the string. If the value is negative, count backward from the right of the string.
Processing requirement:
Derive the substring of STRING which starts with the Nth word in STRING, as described in the WORD_NUMBER parameter above.
Output
The substring should be printed to the SAS Log when the macro is called.
Examples:
Call
%xscan(a bb ccc dddd bb eeeee, %str( ), 1)
Result
a bb ccc dddd bb eeeee